Skip to content

Commit

Permalink
Merge pull request #12622 from beephotography/tech/sass-deprecations
Browse files Browse the repository at this point in the history
Fix warnings from `dart-sass` for color values with &.#{$name}
  • Loading branch information
joeworkman authored Sep 27, 2024
2 parents 8db0458 + c3a4c3a commit 344a897
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion scss/components/_badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $badge-font-size: 0.6rem !default;
color: $badge-color;

@each $name, $color in $badge-palette {
&.#{$name} {
&.#{"" + $name} {
background: $color;
color: color-pick-contrast($color, ($badge-color, $badge-color-alt));
}
Expand Down
6 changes: 3 additions & 3 deletions scss/components/_button-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@ $buttongroup-radius-on-each: true !default;

@each $name, $color in $button-palette {
@if($button-fill != $filling) {
$individual-selector: ' #{$buttongroup-child-selector}.#{$name}';
&.#{$name} #{$buttongroup-child-selector}, &#{$individual-selector} {
$individual-selector: ' #{$buttongroup-child-selector}.#{"" + $name}';
&.#{"" + $name} #{$buttongroup-child-selector}, &#{$individual-selector} {
@include button-fill-style($filling, $color, auto, auto);
}
}
@else {
&.#{$name} #{$buttongroup-child-selector} {
&.#{"" + $name} #{$buttongroup-child-selector} {
@include button-fill-style($filling, $color, auto, auto);
}
}
Expand Down
4 changes: 2 additions & 2 deletions scss/components/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ $button-responsive-expanded: false !default;
@include button-fill-style($filling);

@each $name, $color in $button-palette {
&.#{$name} {
&.#{"" + $name} {
@include button-fill-style($filling, $color, auto, auto);
}
}
Expand Down Expand Up @@ -402,7 +402,7 @@ $button-responsive-expanded: false !default;
}

@each $name, $color in $button-palette {
&.#{$name} {
&.#{"" + $name} {
&::after {
border-top-color: $color;
}
Expand Down
2 changes: 1 addition & 1 deletion scss/components/_callout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ $callout-link-tint: 30% !default;
@include callout;

@each $name, $color in $foundation-palette {
&.#{$name} {
&.#{"" + $name} {
@include callout-style($color);
}
}
Expand Down
2 changes: 1 addition & 1 deletion scss/components/_label.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ $label-radius: $global-radius !default;
color: $label-color;

@each $name, $color in $label-palette {
&.#{$name} {
&.#{"" + $name} {
background: $color;
color: color-pick-contrast($color, ($label-color, $label-color-alt));
}
Expand Down
2 changes: 1 addition & 1 deletion scss/components/_progress-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
@include progress-container;

@each $name, $color in $foundation-palette {
&.#{$name} {
&.#{"" + $name} {
.progress-meter {
background-color: $color;
}
Expand Down
2 changes: 1 addition & 1 deletion scss/forms/_progress.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ $progress-radius: $global-radius !default;
}

@each $name, $color in $foundation-palette {
&.#{$name} {
&.#{"" + $name} {
// Internet Explorer sets the fill with color
color: $color;

Expand Down

0 comments on commit 344a897

Please sign in to comment.