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
The argument order for the newly proposed progress() / mix() functions differs from that of the already existing clamp() function:
/* Source: https://drafts.csswg.org/css-values/#comp-func */clamp(<lower-bound>, <value>, <upper-bound>)
/* Source: https://drafts.csswg.org/css-values-5/#mix (arguments renamed to illustrate the point) */
mix(<value>, <lower-bound>, <upper-bound>)
mix(<value>of <keyframes-name>)
/* Source: https://drafts.csswg.org/css-values-5/#progress-func (arguments renamed to illustrate the point) */
progress(<progress>, <lower-bound>, <upper-bound>)
From my (limited) viewpoint, this is a potential source of confusion of stylesheet authors. There are good arguments either way (mix(<lower-bound>, <value>, <upper-bound>) would be consistent with clamp(<lower-bound>, <value>, <upper-bound>), while mix(<lower-bound>, <min>, <upper-bound>) would be more symmetric with mix(<value> of <keyframes-name>). It would probably make sense to include a note about the inconsistency as well as the rationale for the choice made in the spec to prevent a bit of avoidable confusion in the future.
You say "arguments renamed for claritity" but the arguments represent completely different things so I don't really think these are comparable situations where consistency would be expected.
The argument order for the newly proposed
progress()
/mix()
functions differs from that of the already existingclamp()
function:From my (limited) viewpoint, this is a potential source of confusion of stylesheet authors. There are good arguments either way (
mix(<lower-bound>, <value>, <upper-bound>)
would be consistent withclamp(<lower-bound>, <value>, <upper-bound>)
, whilemix(<lower-bound>, <min>, <upper-bound>)
would be more symmetric withmix(<value> of <keyframes-name>)
. It would probably make sense to include a note about the inconsistency as well as the rationale for the choice made in the spec to prevent a bit of avoidable confusion in the future.Possibly related: #10489
The text was updated successfully, but these errors were encountered: