Open
Description
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.
Possibly related: #10489