-
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-images-4] Restriction on <percentage>
values in stripes()
#9551
Comments
Yeah, I don't think it makes much sense to forbid And as you say the grammar uses But rather than dropping |
I do not think
https://drafts.csswg.org/css-values-4/#calc-range But I wonder why some values are invalid when out of range, instead of being consistently clamped at computed value time, so I am also fine with dropping the restriction. Cc @SebastianZ, who may disagree. |
Clamping the values instead of disallowing them seems fine to me. Question is whether it should happen at computed value time as suggested by @cdoublev or already at parsed value time to be consistent with Sebastian |
I don't think this needs to be consistent with So I would just rely on
I don't see the need to truncate individual values at all. |
<percentage>
is currently restricted to[0,100]
instripes()
otherwise the function is invalid:I agree with #9516 (comment) that values outside this range are meaningless.
But then I am not sure why they make sense in
<alpha-value>
or<brightness()>
(for example), which produce different animating behaviors (because<alpha-value>
is clamped at parse time).However my main concern is
<length-percentage>
expanding to<length [0,∞]> | <percentage [0,100]>
, which is not great for grammar driven parser, therefore I suggest this change:Note that
<length-percentage [0,]>
is not problematic because[0,]
can be "inherited" during expansion.The text was updated successfully, but these errors were encountered: