-
Notifications
You must be signed in to change notification settings - Fork 661
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-values-4] <angle> needs clamping details for degenerated values #6105
Comments
CC: @xiaochengh |
Probably need to clarify that the actual value of a dimension is clamped to the implementable range, and for angles in particular this limit must be a multiple of 360deg. Treating infinity as zero wouldn't make sense because for something that e.g. rotates between 0deg and 2000deg, if the implementable limit were 1024deg (say), clamping the second value to zero wouldn't make sense. |
Oh, thanks for the detailed comment :) So, As I understood, the infinity degree should be the nearest multiple of 360deg from the maximum value. Am I correct?
Was it already existed in the spec or needed update? |
That doesn't exist in the spec currently; we'd need to add it. I agree with it, tho - your intuition about treating it as 0deg was correct, it just needs to be equivalent to 0deg but with the correct distance from normal values. |
Angles with And CSS Color 4 also defines interpolation between hue angles, when one is |
Hmmmm, that's not workable per current spec; I think what you want is that the hue is "missing", due to taking an achromatic color and interpolating it in a space with hue. Whether or not that ends up producing a hue angle of Outside of that implicit missing-ness produced by converting between representations, a |
If I understand correctly, #6107 is a separate non-blocking issue, and this one only needs some spec edits? |
Yep. |
https://bugs.webkit.org/show_bug.cgi?id=238401 Reviewed by Simon Fraser. LayoutTests/imported/w3c: * web-platform-tests/css/css-values/calc-infinity-nan-computed-expected.txt: Source/WebCore: Clamp nan, infinity and -infinity to zero for <angle>. Issue discussing this: w3c/csswg-drafts#6105. * css/calc/CSSCalcValue.cpp: (WebCore::CSSCalcValue::clampToPermittedRange const): Canonical link: https://commits.webkit.org/248962@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292018 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://www.w3.org/TR/css-values-4/#calc-range
Hello, CSSWG folks!
I'm currently implementing the infinity and NaN for 'calc()' function on chromium.
The step of implementation is now clamping to other components per each types e.g. <length>, <time> and etc.
Now I will work <angle> but the spec doesn't specify how to clamp for <angle> type for infinity and -infinity (also NaN).
According to the spec, the degenerated values must be clamped maximum and lowest values per the types.
However, I think if the <angle> is clamped to the maximum value (i.e., ≈3.35544e+0) seems like no make sense. Because the infinity degree is not specified how it looks like. (My minor opinion is the infinity degree is should look like 0 degrees)
Therefore, I think this might need a discussion about how to clamp 'infinity degree' and 'infinity rad' and so on.
The text was updated successfully, but these errors were encountered: