[css-values] when should values inside mix()
be clamped?
#8158
Labels
Content-Length: 239637 | pFad | https://github.com/w3c/csswg-drafts/issues/8158
48mix()
be clamped?
#8158
CSS Values and Units Level 4 introduces the
mix()
function. It's not clear to me reading the spec at what point clamping should be applied for this example:The spec has this to say in the Range Checking section for calc():
I'm not sure what "resulting from an expression" means here. I think the above
mix()
value could resolve to either:20px
where we clamp the output of thecalc()
expression and mix between40px
and0px
,0px
where we only clamp the output of the entiremix()
expression and mix between40px
and-80px
, clamping the result-20px
to0px
Assuming that "resulting from an expression" refers to any math function then it would clearly be the first result since
mix()
is not a math function.This is somewhat related to #8157 where I raised the issue of what would happen when interpolating between the same two values in the context of an animation.
The text was updated successfully, but these errors were encountered: