You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the reason (if any) to not allow <percentage> as the output progress value? And vice-versa, to not allow <number>s as the input progress value? Ie. linear( [ [<number> | <percentage>]{1,3} ]# ).
aside
I think the target <number> range to resolve <percentage> should be explicitly defined, like with the Percent reference range of color functions in CSS Color 4.
The text was updated successfully, but these errors were encountered:
In theory this could be done. Two meaningful downsides, tho:
We'd have to fix the argument order - output, then input. Gradients already fix their grammar in that order (tho for no particularly good reason), so it would match, but we try to avoid fixing grammar order if we can avoid it.
(probably more important) It becomes genuinely harder to distinguish the values if they can both be the same type, or either type. If you read linear(0 10%, 20% 1), it would be very reasonable to presume that the %s match up and the numbers match up, equivalent to linear(0 10%, 1 20%), but under your proposal they'd actually match up purely positionally, so it's equivalent to linear(0 10%, .2 100%) instead. Forcing the two values to use different types aids readability here, and the particular usage of numbers vs percentages draws useful parallels with other syntaxes like gradients.
https://drafts.csswg.org/css-easing-2/#linear-easing-function-syntax
linear() = linear( [ <number> && <percentage>{0,2} ]# )
(edit: the syntax has been simplified in 9573034)
What is the reason (if any) to not allow
<percentage>
as the output progress value? And vice-versa, to not allow<number>
s as the input progress value? Ie.linear( [ [<number> | <percentage>]{1,3} ]# )
.aside
I think the target
<number>
range to resolve<percentage>
should be explicitly defined, like with thePercent reference range
of color functions in CSS Color 4.The text was updated successfully, but these errors were encountered: