-
Notifications
You must be signed in to change notification settings - Fork 637
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
[css-color-5] Examples 11, 20, 24, ... mix deg and number values #8839
Comments
Yeah that is incorrect. Hue angles in CSS are of type Angles in different units can be combined in Bare numbers (while allowed in CSS Color syntax, where they mean degrees) will resolve to an angle in deg when the Sadly, bare numbers apart from |
But wait: the spec says:
so the calc is adding the hue angle resolved to a number (of degrees). Which is also explicitly stated:
|
@romainmenke so now, on reflection, I think the examples are correct. |
🤔 I need to check why my implementation works the way it does and why it matches WebKit. Maybe a simple misreading of :
https://drafts.csswg.org/css-values-4/#angles
Could it be an issue that the canonical form of The type I might be thinking too much in terms of CSS as a source code. |
Does that imply that this is valid? hsl(from rebeccapurple h h h / h) Is |
I think that test predates (or does not take into account) the CSS WG resolution.
So yeah, that test is wrong and 270 is a number. In general |
Ah, yes, I somehow didn't think about that when considering angles, only percentages. So, this is good to close as it's basically a duplicate? |
I believe so (thanks once again for your careful review and thoughtful questions) |
https://drafts.csswg.org/css-color-5/#example-4889a5cd
The calc expression is
calc(44.6deg + 90)
which is not valid as far as I know.90
and90deg
are both valid<angle>
values but I don't think these can be added incalc
https://drafts.csswg.org/css-color-5/#example-c4b276dd
https://drafts.csswg.org/css-color-5/#example-fb53cf30
there might be more examples
@svgeesus is the example incorrect or am I overlooking something?
The text was updated successfully, but these errors were encountered: