-
Notifications
You must be signed in to change notification settings - Fork 192
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
feat(css): Update syntax for color functions #867
base: main
Are you sure you want to change the base?
Conversation
@@ -551,15 +551,15 @@ | |||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/gradient/repeating-radial-gradient" | |||
}, | |||
"rgb()": { | |||
"syntax": "rgb( <percentage>{3} [ / <alpha-value> ]? ) | rgb( <number>{3} [ / <alpha-value> ]? ) | rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? )", | |||
"syntax": "rgb( [ <number> | <percentage> | none ]{3} [ / [ <alpha-value> | none ] ]? ) | rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? )", |
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.
Just noting that this puts:
rgb() = [ <modern-rgb-syntax> | <legacy-rgb-syntax> ]
instead of this order that the spec has:
rgb() = [ <legacy-rgb-syntax> | <modern-rgb-syntax>]
"groups": [ | ||
"CSS Color" | ||
], | ||
"status": "standard", | ||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/color_value/rgb" | ||
}, | ||
"rgba()": { | ||
"syntax": "rgba( <percentage>{3} [ / <alpha-value> ]? ) | rgba( <number>{3} [ / <alpha-value> ]? ) | rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? )", | ||
"syntax": "rgba( [ <number> | <percentage> | none ]{3} [ / [ <alpha-value> | none ] ]? ) | rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? )", |
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.
Same comment as above
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.
All looks good, one comment about order of the syntax compared to spec, it's not incorrect, but I just wanted to highlight it. Approving in the meantime, thanks 👍🏻
Description
update syntax to CSS Color Level 4
Motivation
Additional details
https://drafts.csswg.org/css-color/#rgb-functions
https://drafts.csswg.org/css-color/#the-hsl-notation
https://drafts.csswg.org/css-color/#the-hwb-notation
Related issues and pull requests
Closes #341