Skip to content

Commit

Permalink
Update specs to convert angle units to deg
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Oct 28, 2022
1 parent 256f50d commit d15e990
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 95 deletions.
21 changes: 2 additions & 19 deletions spec/core_functions/color/adjust_color/units.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ DEPRECATION WARNING: $hue: Passing a unit other than deg (60in) is deprecated.

To preserve current behavior: calc($hue / 1in)

See https://sass-lang.com/d/color-units
See https://sass-lang.com/d/function-units

,
1 | a {b: adjust-color(red, $hue: 60in)}
Expand All @@ -53,26 +53,9 @@ a {b: adjust-color(red, $hue: 60rad)}

<===> hue/angle/output.css
a {
b: yellow;
b: #00b4ff;
}

<===> hue/angle/warning
DEPRECATION WARNING: $hue: Passing a unit other than deg (60rad) is deprecated.

You're passing 60rad, which is currently (incorrectly) converted to 60deg.
Soon, it will instead be correctly converted to 3437.7467707849deg.

To preserve current behavior: calc($hue * 1deg/1rad)
To migrate to new behavior: 0deg + $hue

See https://sass-lang.com/d/color-units

,
1 | a {b: adjust-color(red, $hue: 60rad)}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> saturation/percent/input.scss
Expand Down
21 changes: 2 additions & 19 deletions spec/core_functions/color/adjust_hue.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ DEPRECATION WARNING: $degrees: Passing a unit other than deg (60in) is deprecate

To preserve current behavior: calc($degrees / 1in)

See https://sass-lang.com/d/color-units
See https://sass-lang.com/d/function-units

,
1 | a {b: adjust-hue(red, 60in)}
Expand All @@ -133,26 +133,9 @@ a {b: adjust-hue(red, 60rad)}

<===> units/angle/output.css
a {
b: yellow;
b: #00b4ff;
}

<===> units/angle/warning
DEPRECATION WARNING: $degrees: Passing a unit other than deg (60rad) is deprecated.

You're passing 60rad, which is currently (incorrectly) converted to 60deg.
Soon, it will instead be correctly converted to 3437.7467707849deg.

To preserve current behavior: calc($degrees * 1deg/1rad)
To migrate to new behavior: 0deg + $degrees

See https://sass-lang.com/d/color-units

,
1 | a {b: adjust-hue(red, 60rad)}
| ^^^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> named/input.scss
Expand Down
21 changes: 2 additions & 19 deletions spec/core_functions/color/change_color/units.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ DEPRECATION WARNING: $hue: Passing a unit other than deg (60in) is deprecated.

To preserve current behavior: calc($hue / 1in)

See https://sass-lang.com/d/color-units
See https://sass-lang.com/d/function-units

,
1 | a {b: change-color(red, $hue: 60in)}
Expand All @@ -53,26 +53,9 @@ a {b: change-color(red, $hue: 60rad)}

<===> hue/angle/output.css
a {
b: yellow;
b: #00b4ff;
}

<===> hue/angle/warning
DEPRECATION WARNING: $hue: Passing a unit other than deg (60rad) is deprecated.

You're passing 60rad, which is currently (incorrectly) converted to 60deg.
Soon, it will instead be correctly converted to 3437.7467707849deg.

To preserve current behavior: calc($hue * 1deg/1rad)
To migrate to new behavior: 0deg + $hue

See https://sass-lang.com/d/color-units

,
1 | a {b: change-color(red, $hue: 60rad)}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> saturation/percent/input.scss
Expand Down
21 changes: 2 additions & 19 deletions spec/core_functions/color/hsl/three_args/units.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ DEPRECATION WARNING: $hue: Passing a unit other than deg (60in) is deprecated.

To preserve current behavior: calc($hue / 1in)

See https://sass-lang.com/d/color-units
See https://sass-lang.com/d/function-units

,
1 | a {b: hsl(60in, 100%, 50%)}
Expand All @@ -70,31 +70,14 @@ a {b: hsl(60rad, 100%, 50%)}

<===> hue/angle/output.css
a {
b: hsl(60deg, 100%, 50%);
b: hsl(197.7467707849deg, 100%, 50%);
}

<===> hue/angle/output-libsass.css
a {
b: yellow;
}

<===> hue/angle/warning
DEPRECATION WARNING: $hue: Passing a unit other than deg (60rad) is deprecated.

You're passing 60rad, which is currently (incorrectly) converted to 60deg.
Soon, it will instead be correctly converted to 3437.7467707849deg.

To preserve current behavior: calc($hue * 1deg/1rad)
To migrate to new behavior: 0deg + $hue

See https://sass-lang.com/d/color-units

,
1 | a {b: hsl(60rad, 100%, 50%)}
| ^^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

<===> hue/angle/warning-libsass

<===>
Expand Down
21 changes: 2 additions & 19 deletions spec/core_functions/color/hwb/three_args/units.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,9 @@ a {b: color.hwb(1rad, 30%, 40%)}

<===> hue/rad/output.css
a {
b: #994e4d;
b: #99964d;
}

<===> hue/rad/warning
DEPRECATION WARNING: $hue: Passing a unit other than deg (1rad) is deprecated.

You're passing 1rad, which is currently (incorrectly) converted to 1deg.
Soon, it will instead be correctly converted to 57.2957795131deg.

To preserve current behavior: calc($hue * 1deg/1rad)
To migrate to new behavior: 0deg + $hue

See https://sass-lang.com/d/color-units

,
2 | a {b: color.hwb(1rad, 30%, 40%)}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
'
input.scss 2:7 root stylesheet

<===>
================================================================================
<===> hue/non_angle/input.scss
Expand All @@ -51,7 +34,7 @@ DEPRECATION WARNING: $hue: Passing a unit other than deg (1in) is deprecated.

To preserve current behavior: calc($hue / 1in)

See https://sass-lang.com/d/color-units
See https://sass-lang.com/d/function-units

,
2 | a {b: color.hwb(1in, 30%, 40%)}
Expand Down

0 comments on commit d15e990

Please sign in to comment.