-
Notifications
You must be signed in to change notification settings - Fork 672
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-5] Syntax of progress() vs mix() functions #10489
Comments
The other option (see discussion in #10862) would be to align on commas. |
The CSS Working Group just discussed
The full IRC log of that discussion<fantasai> github: https://github.com//issues/10489<emilio> fantasai: so we have progress() and mix(), both in values-5 <emilio> ... they have subtly different syntax, but they both have value then range <emilio> ... progress has keywords, mix() commas <emilio> ... this is inconsistent, we should try to make them consistent <emilio> ... align on either commas or keywords <emilio> ... question is which direction to go for <emilio> astearns: TabAtkins mentioned mix() can't use keywords <emilio> fantasai: that's true, top-level mix ?? <emilio> ... well it can <emilio> ... but might be better for it to use commas or something else <emilio> ... we discussed at TPAC about upgradable commas <emilio> ... we probably need to talk about it again <emilio> ... other advantage of commas is it's consistent with clamp() <emilio> q+ <emilio> astearns: I have a preference for keywords so it's unfortunate to not be able to use them in mix() <emilio> fantasai: so resolution we did about keywords was disambiguating using curly braces, then keywords would be fine here <emilio> ... I think keywords are more readable in general <emilio> ... but I can see the argument for consistency <astearns> ack emilio <fantasai> emilio: was going to argue for commas <fantasai> emilio: if I know syntax uses commas, I can use both <fantasai> emilio: otherwise, presumably the keywords would vary from one to the other <fantasai> emilio: so if keywords are inconsistent, the strongly prefer commas <fantasai> astearns: we could make the keywords consistent, but maybe less than optimal for one <emilio> fantasai: we could probably do of/to <emilio> ... that might be workable for both <fantasai> mix(<progress> of <start> to <end>) <fantasai> progress(<value> of <start> to <end>) <oriol> q+ <fantasai> astearns: but only if we make authors wrap values that they're passing in in curly braces if those values contain 'of' or 'to'. <astearns> ack oriol <fantasai> fantasai: Right. Though we don't generally use those as top-level values. <fantasai> oriol: I'm not a big fan of adding restrictions of what mix() can accept. <fantasai> oriol: extra constraints would be confusing <fantasai> oriol: so given the nature of mix() would prefer commas instead of keywords <fantasai> oriol: also seems confusing even if you are not using one of the keywords that we use as separators, the values could contain keywords, and it's not visually clear where one value starts and other ends <emilio> q+ <fantasai> astearns: commas also have the issue of values containing commas <fantasai> *: would need to wrap it in braces in that case <fantasai> oriol: instead of something specific for mix(), you don't need to worry about special keywords, just only wrap if have commas <astearns> ack emilio <fantasai> emilio: color-mix() also uses commas <fantasai> emilio: that makes me stronger for commas <fantasai> astearns: Sounds like we are getting close to a resolution to use commas as separators <fantasai> astearns: for progress() to match mix() <dholbert> scribe+ dholbert <dholbert> fantasai: I think that's useful because progress with calc ... can take values with calc [...] it's probably better to use commas <fantasai> fantasai: I think it's also beneficial because progres() is a math funtion, can take expressions directly without wrapping in calc(); and so using commas is easier to visually parse in this case <fantasai> RESOLVED: Use commas for progress() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We currently have the
progress()
functions defined likebut the
mix()
functions are defined likeWould it make sense to align these a bit more, e.g.
?
The text was updated successfully, but these errors were encountered: