-
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.
[Color 4] Add tests to match updated spec (#1995)
- Loading branch information
Showing
45 changed files
with
3,176 additions
and
121 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<===> legacy/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(rgb(none 0 0), $red: 10)} | ||
|
||
<===> legacy/error | ||
Error: $red: Because the CSS working group is still deciding on the best behavior, Sass doesn't currently support modifying missing channels (color: rgb(none 0 0)). | ||
, | ||
2 | a {b: color.adjust(rgb(none 0 0), $red: 10)} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
' | ||
input.scss 2:7 root stylesheet | ||
|
||
<===> | ||
================================================================================ | ||
<===> modern/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(lab(none 0 0), $lightness: 10%)} | ||
|
||
<===> modern/error | ||
Error: $lightness: Because the CSS working group is still deciding on the best behavior, Sass doesn't currently support modifying missing channels (color: lab(none 0 0)). | ||
, | ||
2 | a {b: color.adjust(lab(none 0 0), $lightness: 10%)} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
' | ||
input.scss 2:7 root stylesheet | ||
|
||
<===> | ||
================================================================================ | ||
<===> powerless/legacy/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(grey, $hue: 10deg, $space: hsl)} | ||
|
||
<===> powerless/legacy/error | ||
Error: $hue: Because the CSS working group is still deciding on the best behavior, Sass doesn't currently support modifying missing channels (color: hsl(none 0% 50.1960784314%)). | ||
, | ||
2 | a {b: color.adjust(grey, $hue: 10deg, $space: hsl)} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
' | ||
input.scss 2:7 root stylesheet | ||
|
||
<===> | ||
================================================================================ | ||
<===> powerless/modern/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(grey, $hue: 10deg, $space: lch)} | ||
|
||
<===> powerless/modern/error | ||
Error: $hue: Because the CSS working group is still deciding on the best behavior, Sass doesn't currently support modifying missing channels (color: lch(53.5850134522% 0 none)). | ||
, | ||
2 | a {b: color.adjust(grey, $hue: 10deg, $space: lch)} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
' | ||
input.scss 2:7 root stylesheet | ||
|
||
<===> | ||
================================================================================ | ||
<===> alpha/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(rgb(0 0 0 / none), $alpha: 0.1)} | ||
|
||
<===> alpha/error | ||
Error: $alpha: Because the CSS working group is still deciding on the best behavior, Sass doesn't currently support modifying missing channels (color: rgb(0 0 0 / none)). | ||
, | ||
2 | a {b: color.adjust(rgb(0 0 0 / none), $alpha: 0.1)} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
' | ||
input.scss 2:7 root stylesheet |
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 |
---|---|---|
@@ -1,8 +1,151 @@ | ||
<===> input.scss | ||
<===> identical/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(oklch(50% 0.2 0deg), $space: lab)} | ||
|
||
<===> identical/output.css | ||
a { | ||
b: oklch(50% 0.2 0deg); | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> legacy/to_legacy/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(pink, $saturation: -5%, $space: hsl)} | ||
|
||
<===> legacy/to_legacy/output.css | ||
a { | ||
b: rgb(253.425, 193.575, 204.025); | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> legacy/to_modern/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(pink, $chroma: -0.01, $space: oklch)} | ||
|
||
<===> output.css | ||
<===> legacy/to_modern/output.css | ||
a { | ||
b: rgb(249.5073873455, 194.8272088475, 204.1290090118); | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> modern/to_legacy/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(lab(50% 10 -20), $saturation: 5%, $space: hsl)} | ||
|
||
<===> modern/to_legacy/output.css | ||
a { | ||
b: lab(48.2797960499% 13.4192461856 -26.2119638245); | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> modern/to_modern/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(lab(50% 10 -20), $chroma: 0.01, $space: oklch)} | ||
|
||
<===> modern/to_modern/output.css | ||
a { | ||
b: lab(49.8635566117% 11.8934236813 -23.2342925555); | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> powerless/legacy/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(hsl(0deg 0% 50%), $space: lab)} | ||
|
||
<===> powerless/legacy/output.css | ||
a { | ||
b: hsl(0, 0%, 50%); | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> powerless/modern/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(oklch(50% 0 0deg), $space: lab)} | ||
|
||
<===> powerless/modern/output.css | ||
a { | ||
b: oklch(50% 0 none); | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> missing/legacy/same/implicit/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(rgb(none none none))} | ||
|
||
<===> missing/legacy/same/implicit/output.css | ||
a { | ||
b: rgb(none none none); | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> missing/legacy/same/explicit/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(rgb(none none none), $space: rgb)} | ||
|
||
<===> missing/legacy/same/explicit/output.css | ||
a { | ||
b: rgb(none none none); | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> missing/legacy/analogous/legacy/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(hsl(none 50% 50%), $space: hwb)} | ||
|
||
<===> missing/legacy/analogous/legacy/output.css | ||
a { | ||
b: hsl(0, 50%, 50%); | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> missing/legacy/analogous/modern/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(rgb(none none none), $space: display-p3)} | ||
|
||
<===> missing/legacy/analogous/modern/output.css | ||
a { | ||
b: black; | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> missing/modern/same/implicit/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(color(srgb none none none))} | ||
|
||
<===> missing/modern/same/implicit/output.css | ||
a { | ||
b: color(srgb none none none); | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> missing/modern/same/explicit/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(color(srgb none none none), $space: srgb)} | ||
|
||
<===> missing/modern/same/explicit/output.css | ||
a { | ||
b: color(srgb none none none); | ||
} | ||
|
||
<===> | ||
================================================================================ | ||
<===> missing/modern/analogous/input.scss | ||
@use 'sass:color'; | ||
a {b: color.adjust(color(srgb none none none), $space: display-p3)} | ||
|
||
<===> missing/modern/analogous/output.css | ||
a { | ||
b: color(srgb none none none); | ||
} |
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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.