Skip to content

Commit

Permalink
chore: run sass function migration
Browse files Browse the repository at this point in the history
  • Loading branch information
hugo-vrijswijk committed Oct 22, 2024
1 parent c165771 commit bf11da4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions packages/elements/src/components/app/theme.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "sass:map";
@use "sass:string";
@use 'sass:color';

// Prismjs theming (code highlighting) =====================================
Expand Down Expand Up @@ -134,9 +136,9 @@
$stroke-color: '#{$stroke-color}';

// Escape leading '#' (url encode %23)
$index: str-index($stroke-color, '#');
$index: string.index($stroke-color, '#');
@if $index eq 1 {
$stroke-color: '%23' + str-slice($stroke-color, 2);
$stroke-color: '%23' + string.slice($stroke-color, 2);
}
@return url("data:image/svg+xml;charset=UTF8,<svg xmlns='http://www.w3.org/2000/svg' height='3' width='6'><g fill='#{$stroke-color}'><path d='m5.5 0-3 3H1.1l3-3z'/><path d='m4 0 2 2V.6L5.4 0zM0 2l1 1h1.4L0 .6z'/></g></svg>");
}
Expand Down Expand Up @@ -206,7 +208,7 @@
--mut-primary-#{$range}: #{hexToRGB($value)};
}

--mut-body-bg: #{map-get($grayRanges, 50)};
--mut-body-bg: #{map.get($grayRanges, 50)};

--mut-white: var(--mut-gray-50);

Expand Down
3 changes: 2 additions & 1 deletion packages/elements/src/components/file/file.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "sass:list";
@use 'sass:map';

@import '../../style/code.css';
Expand All @@ -17,7 +18,7 @@ $mutant-themes: (
$mutant-squiggly: 'Survived', 'NoCoverage';

@each $status, $theme in $mutant-themes {
@if (index($mutant-squiggly, $status) == null) {
@if (list.index($mutant-squiggly, $status) == null) {
.mte-selected-#{$status} .mutant.#{$status} {
border-color: #{$theme};
border-bottom-width: 2px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $width: 2.9em;
}

@function rad($angle) {
$unit: unit($angle);
$unit: math.unit($angle);
$unitless: math.div($angle, $angle * 0 + 1);
// If the angle has 'deg' as unit, convert to radians.
@if $unit == deg {
Expand Down

0 comments on commit bf11da4

Please sign in to comment.