[csswg-drafts] [css-values-4] min/max(%, %) should explicitly evaluate against the % value, not the resolved value (#4227)

tabatkins has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-values-4] min/max(%, %) should explicitly evaluate against the % value, not the resolved value ==
When looking at an expression like `min(10%, 20%)`, it seems reasonable at first glance to assume that it always resolves to 10%.

In most properties in CSS, %s always resolve against non-negative values, so this does indeed happen whether you're looking at the raw %s or their resolved values.

However, @dbaron points out that in bg-position, if the bg-image is larger than the bg positioning area, a % resolves to a negative value. Thus it matters which stage you're looking at for the min() and max() functions.

What should we do? Note the more complex example of `min(10% + 10px, 20% + 5px)`; you can't make a judgement based purely by looking at the unresolved %s, but after resolution, due to the BG cases, either one could end up the smaller.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4227 using your GitHub account

Received on Tuesday, 20 August 2019 19:48:43 UTC