Skip to content

Commit

Permalink
Merge pull request #43 from pepabo/fix-deprecated-sass-coding
Browse files Browse the repository at this point in the history
Global built-in functionsは将来的に廃止されるので対応する
  • Loading branch information
piyoppi authored Oct 31, 2024
2 parents 1478e9f + 08a5875 commit 47534a2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/adapter/functions/_helpers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ $available-hexadecimal-chars: "0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
$background-luminance: -compose-luminance($background) + 0.05;
$foreground-luminance: -compose-luminance($foreground) + 0.05;

@return math.div(max($background-luminance, $foreground-luminance), min($background-luminance, $foreground-luminance));
@return math.div(math.max($background-luminance, $foreground-luminance), math.min($background-luminance, $foreground-luminance));
}

// 輝度を計算する
Expand Down
8 changes: 4 additions & 4 deletions packages/callout/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
margin-block-end: 0;
}

@include -state-style(map-get($options, color));
@include -size-style(map-get($options, size));
@include -state-style(map.get($options, color));
@include -size-style(map.get($options, size));

&.-color-informative {
@include -state-style(informative);
Expand Down Expand Up @@ -66,7 +66,7 @@
color: adapter.get-semantic-color($state, 800);

._leading:after {
content: map-get(variables.$icon-map, $state);
content: map.get(variables.$icon-map, $state);
}
}

Expand All @@ -75,7 +75,7 @@
line-height: adapter.get-line-height($level: $size, $density: normal);

._body {
gap: adapter.get-spacing-size(map-get(variables.$title-margin-map, $size));
gap: adapter.get-spacing-size(map.get(variables.$title-margin-map, $size));
}
}

Expand Down
10 changes: 5 additions & 5 deletions packages/snackbar/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@

display: flex;
align-items: center;
font-size: adapter.get-font-size(map-get($options, size));
padding: adapter.get-spacing-size(map-get($options, size));
gap: adapter.get-spacing-size(map-get($options, size));
border-radius: adapter.get-radius-size(map-get($options, size));
font-size: adapter.get-font-size(map.get($options, size));
padding: adapter.get-spacing-size(map.get($options, size));
gap: adapter.get-spacing-size(map.get($options, size));
border-radius: adapter.get-radius-size(map.get($options, size));
box-shadow: adapter.get-elevation-box-shadow(1);
visibility: hidden;
opacity: 0;
translate: 0 10%;
transition: all 0.4s;
@include -state-style(map-get($options, color));
@include -state-style(map.get($options, color));

&.-color-positive {
@include -state-style(positive);
Expand Down

0 comments on commit 47534a2

Please sign in to comment.