forked from sass/sass-spec
-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
color is legacy #4
Closed
Closed
Changes from 5 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
17e8664
added tests for legacy colors and non-legacy colors
SondraE e59e75e
add note that new function won't be implemented in libsass
SondraE af984a0
added too many, too few, and type errors
SondraE 7f6b962
revised based on Stacy's comments about commas, file name, and adding…
SondraE 1f44744
removed unneeded error message info and fixed named and rec
SondraE f54710c
added missing error inputs
SondraE 1d041c1
switched blue to a on too many arguments error and added use sass col…
SondraE 7ddb751
[Color 4] Update tests for Color Level 4 (#1846)
nex3 cb479d5
Merge branch 'feature.color-4' into color-is-legacy
dvdherron 1ae8fbb
Generate error outputs
nex3 a4fa86a
Poke CI
nex3 ad0145c
fix too few and named tests
stacyk 017ff98
Use feature branches for testing the JS API (#1853)
nex3 c2cf2ed
Merge branch 'feature.color-4' of github.com:sass/sass-spec into colo…
nex3 6a63b6f
Update output for too_few_args
nex3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,225 @@ | ||||||
<===> options.yml | ||||||
--- | ||||||
:ignore_for: | ||||||
- libsass | ||||||
|
||||||
<===> | ||||||
=================================================================== | ||||||
<===> rgb/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(rgb(0 255 0))} | ||||||
|
||||||
<===> rgb/output.css | ||||||
a { | ||||||
b: true; | ||||||
} | ||||||
|
||||||
<===> | ||||||
=================================================================== | ||||||
<===> rgba/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(rgba(72 122 180 / .2))} | ||||||
|
||||||
<===> rgba/output.css | ||||||
a { | ||||||
b: true; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> hwb/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(hwb(0 50% 0%))} | ||||||
|
||||||
<===> hwb/output.css | ||||||
a { | ||||||
b: true; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> hsl/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(hsl(110 31% 32%))} | ||||||
|
||||||
<===> hsl/output.css | ||||||
a { | ||||||
b: true; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> hex/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(#f2ece4)} | ||||||
|
||||||
<===> hex/output.css | ||||||
a { | ||||||
b: true; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> named/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy($color: midnightblue)} | ||||||
|
||||||
<===> named/output.css | ||||||
a { | ||||||
b: true; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> srgb/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(color(srgb 0.45098 0.07843 0.823530))} | ||||||
|
||||||
<===> srgb/output.css | ||||||
a { | ||||||
b: false; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> srgb-linear/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(color(srgb-linear 0.45098 0.07843 0.823530))} | ||||||
|
||||||
<===> srgb-linear/output.css | ||||||
a { | ||||||
b: false; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> display-p3/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(color(display-p3 0.515 0.35 0.3 / 1))} | ||||||
|
||||||
<===> display-p3/output.css | ||||||
a { | ||||||
b: false; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> a98-rgb/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(color(a98-rgb 0 1 0))} | ||||||
|
||||||
<===> a98-rgb/output.css | ||||||
a { | ||||||
b: false; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> prophoto-rgb/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(color(prophoto-rgb 0.42444 0.934918 0.190922))} | ||||||
|
||||||
<===> prophoto-rgb/output.css | ||||||
a { | ||||||
b: false; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> rec2020/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(color(rec2020 0.42053 0.979780 0.00579))} | ||||||
|
||||||
<===> rec2020/output.css | ||||||
a { | ||||||
b: false; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> xyz/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(color(xyz 0.0426 0.0442 0.0364))} | ||||||
|
||||||
<===> xyz/output.css | ||||||
a { | ||||||
b: false; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> xyz-d50/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(color(xyz-d50 0.2005 0.14089 0.4472))} | ||||||
|
||||||
<===> xyz-d50/output.css | ||||||
a { | ||||||
b: false; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> xyz-d65/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(color(xyz-d65 0.21661 0.14602 0.59452))} | ||||||
|
||||||
<===> xyz-d65/output.css | ||||||
a { | ||||||
b: false; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> lab/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(lab(5 110 115))} | ||||||
|
||||||
<===> lab/output.css | ||||||
a { | ||||||
b: false; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> lch/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(lch(90.6 52.8 197))} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
<===> lch/output.css | ||||||
a { | ||||||
b: false; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> oklab/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(oklab(0.44027 0.08818 -0.13386))} | ||||||
|
||||||
<===> oklab/output.css | ||||||
a { | ||||||
b: false; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> oklch/input.scss | ||||||
@use "sass:color"; | ||||||
a {b: color.is-legacy(oklch(70% 0.1 200))} | ||||||
|
||||||
<===> oklch/output.css | ||||||
a { | ||||||
b: false; | ||||||
} | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> error/too_few_args/input.scss | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> error/too_many_args/input.scss | ||||||
|
||||||
<===> | ||||||
================================================================================ | ||||||
<===> error/type/input.scss |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could swap out one of the tests or add an additonal test called
named
. This will test that the function also works if the argument is explicitly named e.g.$color: lch(90.6 52.8 197)