-
Notifications
You must be signed in to change notification settings - Fork 642
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
Back-porting the mixed <number>
and <percentage>
color component syntaxes to CSS Color 4
#8322
Comments
@GPHemsley said in response to the proposal:
|
In a different issue, @SebastianZ said:
|
The browsers do, however all support modern syntax |
Now done. |
I am sorry to open discussions in different issues that are all related to back-porting mixed Can you please clarify the range to resolve You did not back-ported mixing
This seems to enforce I may have missed how to resolve |
It is fine; the specs benefit from your careful review and comments.
My mistake. |
There is some confusion in my questions because Thanks for the follow up. |
Follow-on change from the back-port: this is no longer correct:
because W and B now accept number, so per CSSWG resolution the So that will become simpler:
|
[0,100]. From CSS Color 4 HSL Colors:
and from HWB Colors:
|
Leaving open until the test cases are updated |
Closing this (and other issues where no change to the spec is expected). |
https://drafts.csswg.org/css-color-4/#the-hsl-notation https://drafts.csswg.org/css-color-4/#the-hwb-notation Change to the accepted types for the components are discussed here: w3c/csswg-drafts#8322 Differential Revision: https://phabricator.services.mozilla.com/D193347 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1864258 gecko-commit: cf1b9592b97fde0863148dda1fadc7180ff6be97 gecko-reviewers: layout-reviewers, emilio
…lio,layout-reviewers The second and third components for HSL and HWB are stored as percentages in the range [0..1], but as part of the change to allow numbers for those two components, in addition to percentages, they now act like all the other <number-or-percentage> components and should be stored as numbers. The numbers are now in the range [0..100]. https://drafts.csswg.org/css-color-4/#the-hsl-notation https://drafts.csswg.org/css-color-4/#the-hwb-notation Change to the accepted types for the components are discussed here: w3c/csswg-drafts#8322 Differential Revision: https://phabricator.services.mozilla.com/D193664
…entage r=layout-reviewers,emilio https://drafts.csswg.org/css-color-4/#the-hsl-notation https://drafts.csswg.org/css-color-4/#the-hwb-notation Change to the accepted types for the components are discussed here: w3c/csswg-drafts#8322 Differential Revision: https://phabricator.services.mozilla.com/D193347
https://drafts.csswg.org/css-color-4/#the-hsl-notation https://drafts.csswg.org/css-color-4/#the-hwb-notation Change to the accepted types for the components are discussed here: w3c/csswg-drafts#8322 Differential Revision: https://phabricator.services.mozilla.com/D193347 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1864258 gecko-commit: cf1b9592b97fde0863148dda1fadc7180ff6be97 gecko-reviewers: layout-reviewers, emilio
…lio,layout-reviewers The second and third components for HSL and HWB are stored as percentages in the range [0..1], but as part of the change to allow numbers for those two components, in addition to percentages, they now act like all the other <number-or-percentage> components and should be stored as numbers. The numbers are now in the range [0..100]. https://drafts.csswg.org/css-color-4/#the-hsl-notation https://drafts.csswg.org/css-color-4/#the-hwb-notation Change to the accepted types for the components are discussed here: w3c/csswg-drafts#8322 Differential Revision: https://phabricator.services.mozilla.com/D193664
…entage r=layout-reviewers,emilio https://drafts.csswg.org/css-color-4/#the-hsl-notation https://drafts.csswg.org/css-color-4/#the-hwb-notation Change to the accepted types for the components are discussed here: w3c/csswg-drafts#8322 Differential Revision: https://phabricator.services.mozilla.com/D193347
…lio,layout-reviewers The second and third components for HSL and HWB are stored as percentages in the range [0..1], but as part of the change to allow numbers for those two components, in addition to percentages, they now act like all the other <number-or-percentage> components and should be stored as numbers. The numbers are now in the range [0..100]. https://drafts.csswg.org/css-color-4/#the-hsl-notation https://drafts.csswg.org/css-color-4/#the-hwb-notation Change to the accepted types for the components are discussed here: w3c/csswg-drafts#8322 Differential Revision: https://phabricator.services.mozilla.com/D193664 UltraBlame original commit: 23dfad39643a078e839304b6ba3516bd53a3f0e2
…entage r=layout-reviewers,emilio https://drafts.csswg.org/css-color-4/#the-hsl-notation https://drafts.csswg.org/css-color-4/#the-hwb-notation Change to the accepted types for the components are discussed here: w3c/csswg-drafts#8322 Differential Revision: https://phabricator.services.mozilla.com/D193347 UltraBlame original commit: cf1b9592b97fde0863148dda1fadc7180ff6be97
…lio,layout-reviewers The second and third components for HSL and HWB are stored as percentages in the range [0..1], but as part of the change to allow numbers for those two components, in addition to percentages, they now act like all the other <number-or-percentage> components and should be stored as numbers. The numbers are now in the range [0..100]. https://drafts.csswg.org/css-color-4/#the-hsl-notation https://drafts.csswg.org/css-color-4/#the-hwb-notation Change to the accepted types for the components are discussed here: w3c/csswg-drafts#8322 Differential Revision: https://phabricator.services.mozilla.com/D193664 UltraBlame original commit: 23dfad39643a078e839304b6ba3516bd53a3f0e2
…entage r=layout-reviewers,emilio https://drafts.csswg.org/css-color-4/#the-hsl-notation https://drafts.csswg.org/css-color-4/#the-hwb-notation Change to the accepted types for the components are discussed here: w3c/csswg-drafts#8322 Differential Revision: https://phabricator.services.mozilla.com/D193347 UltraBlame original commit: cf1b9592b97fde0863148dda1fadc7180ff6be97
…lio,layout-reviewers The second and third components for HSL and HWB are stored as percentages in the range [0..1], but as part of the change to allow numbers for those two components, in addition to percentages, they now act like all the other <number-or-percentage> components and should be stored as numbers. The numbers are now in the range [0..100]. https://drafts.csswg.org/css-color-4/#the-hsl-notation https://drafts.csswg.org/css-color-4/#the-hwb-notation Change to the accepted types for the components are discussed here: w3c/csswg-drafts#8322 Differential Revision: https://phabricator.services.mozilla.com/D193664 UltraBlame original commit: 23dfad39643a078e839304b6ba3516bd53a3f0e2
…entage r=layout-reviewers,emilio https://drafts.csswg.org/css-color-4/#the-hsl-notation https://drafts.csswg.org/css-color-4/#the-hwb-notation Change to the accepted types for the components are discussed here: w3c/csswg-drafts#8322 Differential Revision: https://phabricator.services.mozilla.com/D193347 UltraBlame original commit: cf1b9592b97fde0863148dda1fadc7180ff6be97
…lio,layout-reviewers The second and third components for HSL and HWB are stored as percentages in the range [0..1], but as part of the change to allow numbers for those two components, in addition to percentages, they now act like all the other <number-or-percentage> components and should be stored as numbers. The numbers are now in the range [0..100]. https://drafts.csswg.org/css-color-4/#the-hsl-notation https://drafts.csswg.org/css-color-4/#the-hwb-notation Change to the accepted types for the components are discussed here: w3c/csswg-drafts#8322 Differential Revision: https://phabricator.services.mozilla.com/D193664
…entage r=layout-reviewers,emilio https://drafts.csswg.org/css-color-4/#the-hsl-notation https://drafts.csswg.org/css-color-4/#the-hwb-notation Change to the accepted types for the components are discussed here: w3c/csswg-drafts#8322 Differential Revision: https://phabricator.services.mozilla.com/D193347
This was already proposed and discussed in passing, in the context of a CSS Color 5 issue, but I wanted to break it out into a separate issue to be sure no-one missed it.
Relative Color Syntax in CSS Color 5 allows mixing
<number>
and<percentage>
. But currently, this is only allowed for RCS; if you miss out thefrom <color>
then you have to use all-numbers or all-percentages for the color components.Here is a quote from a WPT test:
This seems silly, and so I said:
To be clear, this would affect the modern syntax only, not the legacy syntax.
Also to be clear, people can get this mixing already, if they really want, simply by not actually using the origin color:
rgb(from black 50% 75 127)
I am proposing to make those simplifying edits and then to change the relevant portions of WPT tests such as color-invalid-rgb so that previously invalid combinations get moved over to the valid tests.
The text was updated successfully, but these errors were encountered: