-
Notifications
You must be signed in to change notification settings - Fork 715
[css-values] Alternative, weighted mean syntax for calc-mix()
#9658
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
Labels
Comments
The CSS Working Group just discussed
The full IRC log of that discussion<fantasai> TabAtkins: crissov wanted a weighted average function<fantasai> TabAtkins: which is doing exactly what he requested (other than differences in grammar) <fantasai> TabAtkins: Weighted mean of calc() values, and interpolation thing, both are possible now with resolution to https://github.com//issues/6245#issuecomment-2685746280 <fantasai> RESOLVED: Close issue as resolved by https://github.com//issues/6245#issuecomment-2685746280 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This started out as a comment to #9343 and is obviously a revival of my suggestion in #4700.
With their shared use of a single
<progress>
parameter, the mix functions are currently all limited to two values, start and end. While some individual alternative syntaxes support specifying a weight per entry,calc-mix()
does not.The alternative syntax of the image mix function
cross-fade()
even supports mixing an arbitrary number of (weighted) images – this includes colors, while the color blending functioncolor-mix()
is restricted to two values.calc-mix()
in particular would need an alternative syntax. Alas, this could not use the established notation for the weights of values, because ”20% 80%“ would be ambiguous.(Note that the optional weight,
<percentage [0,100]>?
, precedes the value in the grammar forcross-fade()
and follows it forcolor-mix()
, but&&
means ‘any order’.)For linear interpolation of percentages, the order might be irrelevant, but authors may want different ones.
Compilation of current grammar
The text was updated successfully, but these errors were encountered: