-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1608 from sass/angle-units
Add specs for angle unit deprecations
- Loading branch information
Showing
34 changed files
with
1,104 additions
and
352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
<===> options.yml | ||
--- | ||
:warning_todo: | ||
- libsass | ||
|
||
<===> | ||
================================================================================ | ||
<===> hue/deg/input.scss | ||
a {b: adjust-color(red, $hue: 60deg)} | ||
|
||
<===> hue/deg/output.css | ||
a { | ||
b: yellow; | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> hue/unitless/input.scss | ||
a {b: adjust-color(red, $hue: 60)} | ||
|
||
<===> hue/unitless/output.css | ||
a { | ||
b: yellow; | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> hue/unknown/input.scss | ||
a {b: adjust-color(red, $hue: 60in)} | ||
|
||
<===> hue/unknown/output.css | ||
a { | ||
b: yellow; | ||
} | ||
|
||
<===> hue/unknown/warning | ||
DEPRECATION WARNING: $hue: Passing a unit other than deg is deprecated. | ||
|
||
To preserve current behavior: $hue / 1in | ||
|
||
See https://sass-lang.com/d/color-units | ||
|
||
, | ||
1 | a {b: adjust-color(red, $hue: 60in)} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
' | ||
input.scss 1:7 root stylesheet | ||
|
||
<===> | ||
================================================================================ | ||
<===> hue/angle/input.scss | ||
a {b: adjust-color(red, $hue: 60rad)} | ||
|
||
<===> hue/angle/output.css | ||
a { | ||
b: yellow; | ||
} | ||
|
||
<===> hue/angle/warning | ||
DEPRECATION WARNING: $hue: Passing a unit other than deg 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: $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 | ||
a {b: adjust-color(red, $saturation: -10%)} | ||
|
||
<===> saturation/percent/output.css | ||
a { | ||
b: #f20d0d; | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> saturation/unitless/input.scss | ||
a {b: adjust-color(red, $saturation: -10)} | ||
|
||
<===> saturation/unitless/output.css | ||
a { | ||
b: #f20d0d; | ||
} | ||
|
||
<===> saturation/unitless/warning | ||
DEPRECATION WARNING: $saturation: Passing a number without unit % is deprecated. | ||
|
||
To preserve current behavior: $saturation * 1% | ||
|
||
, | ||
1 | a {b: adjust-color(red, $saturation: -10)} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
' | ||
input.scss 1:7 root stylesheet | ||
|
||
|
||
<===> | ||
================================================================================ | ||
<===> saturation/unknown/input.scss | ||
a {b: adjust-color(red, $saturation: -10in)} | ||
|
||
<===> saturation/unknown/output.css | ||
a { | ||
b: #f20d0d; | ||
} | ||
|
||
<===> saturation/unknown/warning | ||
DEPRECATION WARNING: $saturation: Passing a number without unit % is deprecated. | ||
|
||
To preserve current behavior: $saturation / 1in * 1% | ||
|
||
, | ||
1 | a {b: adjust-color(red, $saturation: -10in)} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
' | ||
input.scss 1:7 root stylesheet | ||
|
||
|
||
<===> | ||
================================================================================ | ||
<===> lightness/percent/input.scss | ||
a {b: adjust-color(red, $lightness: 10%)} | ||
|
||
<===> lightness/percent/output.css | ||
a { | ||
b: #ff3333; | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> lightness/unitless/input.scss | ||
a {b: adjust-color(red, $lightness: 10)} | ||
|
||
<===> lightness/unitless/output.css | ||
a { | ||
b: #ff3333; | ||
} | ||
|
||
<===> lightness/unitless/warning | ||
DEPRECATION WARNING: $lightness: Passing a number without unit % is deprecated. | ||
|
||
To preserve current behavior: $lightness * 1% | ||
|
||
, | ||
1 | a {b: adjust-color(red, $lightness: 10)} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
' | ||
input.scss 1:7 root stylesheet | ||
|
||
|
||
<===> | ||
================================================================================ | ||
<===> lightness/unknown/input.scss | ||
a {b: adjust-color(red, $lightness: 10in)} | ||
|
||
<===> lightness/unknown/output.css | ||
a { | ||
b: #ff3333; | ||
} | ||
|
||
<===> lightness/unknown/warning | ||
DEPRECATION WARNING: $lightness: Passing a number without unit % is deprecated. | ||
|
||
To preserve current behavior: $lightness / 1in * 1% | ||
|
||
, | ||
1 | a {b: adjust-color(red, $lightness: 10in)} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
' | ||
input.scss 1:7 root stylesheet | ||
|
Oops, something went wrong.