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

Update specs to convert angle units to deg #1831

Merged
merged 1 commit into from
Oct 28, 2022
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
25 changes: 6 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 @@ -48,31 +48,18 @@ See https://sass-lang.com/d/color-units

<===>
================================================================================
<===> hue/angle/options.yml
:ignore_for:
- libsass

<===> hue/angle/input.scss
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
25 changes: 6 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 @@ -128,31 +128,18 @@ See https://sass-lang.com/d/color-units

<===>
================================================================================
<===> units/angle/options.yml
:ignore_for:
- libsass

<===> units/angle/input.scss
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
25 changes: 6 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 @@ -48,31 +48,18 @@ See https://sass-lang.com/d/color-units

<===>
================================================================================
<===> hue/angle/options.yml
:ignore_for:
- libsass

<===> hue/angle/input.scss
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