Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ran sass-migrator on files with deprecation warnings #1564

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion es-ds-styles/scss/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ textarea.form-control {
// server side validation.

@each $state, $data in variables.$form-validation-states {
@include forms.form-validation-state($state, map-get($data, color), map-get($data, icon));
@include forms.form-validation-state($state, map.get($data, color), map.get($data, icon));
}

// Inline forms
Expand Down
10 changes: 5 additions & 5 deletions es-ds-styles/scss/_functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ $yiq-text-light: #fff !default; // Copied from $white
@return $value1;
}

@if meta.type-of($value1) == number and meta.type-of($value2) == number and comparable($value1, $value2) {
@if meta.type-of($value1) == number and meta.type-of($value2) == number and math.compatible($value1, $value2) {
@return $value1 + $value2;
}

Expand All @@ -178,7 +178,7 @@ $yiq-text-light: #fff !default; // Copied from $white
@return $value1;
}

@if meta.type-of($value1) == number and meta.type-of($value2) == number and comparable($value1, $value2) {
@if meta.type-of($value1) == number and meta.type-of($value2) == number and math.compatible($value1, $value2) {
@return $value1 - $value2;
}

Expand Down Expand Up @@ -217,15 +217,15 @@ $yiq-text-light: #fff !default; // Copied from $white
}
}
$result: $result * $factor * $sign;
$dividend-unit: unit($dividend);
$divisor-unit: unit($divisor);
$dividend-unit: math.unit($dividend);
$divisor-unit: math.unit($divisor);
$unit-map: (
"px": 1px,
"rem": 1rem,
"em": 1em,
"%": 1%
);
@if ($dividend-unit != $divisor-unit and map-has-key($unit-map, $dividend-unit)) {
@if ($dividend-unit != $divisor-unit and map.has-key($unit-map, $dividend-unit)) {
$result: $result * map.get($unit-map, $dividend-unit);
}
@return $result;
Expand Down
2 changes: 1 addition & 1 deletion es-ds-styles/scss/_list-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
//
// Change the layout of list group items from vertical (default) to horizontal.

@each $breakpoint in map-keys(variables.$grid-breakpoints) {
@each $breakpoint in map.keys(variables.$grid-breakpoints) {
@include breakpoints.media-breakpoint-up($breakpoint) {
$infix: breakpoints.breakpoint-infix($breakpoint, variables.$grid-breakpoints);

Expand Down
2 changes: 1 addition & 1 deletion es-ds-styles/scss/_popover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
color: variables.$popover-header-color;
background-color: variables.$popover-header-bg;
font-weight: variables.$popover-header-font-weight;
border-bottom: variables.$popover-border-width solid darken(variables.$popover-header-bg, 5%);
border-bottom: variables.$popover-border-width solid color.adjust(variables.$popover-header-bg, $lightness: -5%);
@include border-radius.border-top-radius(variables.$popover-inner-border-radius);

&:empty {
Expand Down
4 changes: 2 additions & 2 deletions es-ds-styles/scss/mixins/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@

&:checked {
~ .custom-control-label::before {
border-color: lighten($color, 10%);
@include gradients.gradient-bg(lighten($color, 10%));
border-color: color.adjust($color, $lightness: 10%);
@include gradients.gradient-bg(color.adjust($color, $lightness: 10%));
}
}

Expand Down
9 changes: 5 additions & 4 deletions es-ds-styles/scss/vendor/_rfs.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "sass:map";
@use "sass:math";
@use "sass:meta";
@use '../variables';
Expand Down Expand Up @@ -52,8 +53,8 @@ $rfs-base-font-size-unit: math.unit($rfs-base-font-size);

@function divide($dividend, $divisor, $precision: 10) {
$sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);
$dividend: abs($dividend);
$divisor: abs($divisor);
$dividend: math.abs($dividend);
$divisor: math.abs($divisor);
@if $dividend == 0 {
@return 0;
}
Expand Down Expand Up @@ -86,8 +87,8 @@ $rfs-base-font-size-unit: math.unit($rfs-base-font-size);
"em": 1em,
"%": 1%
);
@if ($dividend-unit != $divisor-unit and map-has-key($unit-map, $dividend-unit)) {
$result: $result * map-get($unit-map, $dividend-unit);
@if ($dividend-unit != $divisor-unit and map.has-key($unit-map, $dividend-unit)) {
$result: $result * map.get($unit-map, $dividend-unit);
}
@return $result;
}
Expand Down
13 changes: 7 additions & 6 deletions es-ds-styles/scss/vue/components/_form-input.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "sass:color";
@use "../../variables" as v;
@use "../../mixins/border-radius";
@use "../../mixins/box-shadow";
Expand Down Expand Up @@ -155,13 +156,13 @@ input[type="color"].form-control:disabled {
// Pseudo-elements must be split across multiple rulesets to have an affect
&:focus {
&::-webkit-slider-thumb {
box-shadow: 0 0 0 1px v.$body-bg, 0 0 0 v.$input-btn-focus-width lighten($color, 35%);
box-shadow: 0 0 0 1px v.$body-bg, 0 0 0 v.$input-btn-focus-width color.adjust($color, $lightness: 35%);
}
&::-moz-range-thumb {
box-shadow: 0 0 0 1px v.$body-bg, 0 0 0 v.$input-btn-focus-width lighten($color, 35%);
box-shadow: 0 0 0 1px v.$body-bg, 0 0 0 v.$input-btn-focus-width color.adjust($color, $lightness: 35%);
}
&::-ms-thumb {
box-shadow: 0 0 0 1px v.$body-bg, 0 0 0 v.$input-btn-focus-width lighten($color, 35%);
box-shadow: 0 0 0 1px v.$body-bg, 0 0 0 v.$input-btn-focus-width color.adjust($color, $lightness: 35%);
}
}

Expand All @@ -170,7 +171,7 @@ input[type="color"].form-control:disabled {
background-image: none;

&:active {
background-color: lighten($color, 35%);
background-color: color.adjust($color, $lightness: 35%);
background-image: none;
}
}
Expand All @@ -184,7 +185,7 @@ input[type="color"].form-control:disabled {
background-image: none;

&:active {
background-color: lighten($color, 35%);
background-color: color.adjust($color, $lightness: 35%);
background-image: none;
}
}
Expand All @@ -203,7 +204,7 @@ input[type="color"].form-control:disabled {
background-image: none;

&:active {
background-color: lighten($color, 35%);
background-color: color.adjust($color, $lightness: 35%);
background-image: none;
}
}
Expand Down
3 changes: 2 additions & 1 deletion es-ds-styles/scss/vue/components/_table.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "sass:string";
@use "../variables";
@use "../../variables" as v;
@use "../../mixins/breakpoints";
Expand Down Expand Up @@ -279,7 +280,7 @@ $bv-escaped-characters: (("<", "%3c"), (">", "%3e"), ("#", "%23"));
// But if we want to preserve backwards compatibility with v4.3, we leave this in
// See https://codepen.io/kevinweber/pen/dXWoRw
@function bv-escape-svg($string) {
@if str-index($string, "data:image/svg+xml") {
@if string.index($string, "data:image/svg+xml") {
@each $char, $encoded in $bv-escaped-characters {
$string: str-replace($string, $char, $encoded);
}
Expand Down
Loading