[csswg-drafts] [css-shapes] Clarification about percentages after `round` in the `inset` basic shape (#6209)

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

== [css-shapes] Clarification about percentages after `round` in the `inset` basic shape ==
Ana Tudor [pointed out in Twitter](https://mobile.twitter.com/anatudor/status/1381860691775213569) that browsers implemented `clip-path: inset(... round x%)` differently, usind different base for calculating percentages after `round`.

By my understanding, the following ways of thinking...

1. [For all basic shapes](https://drafts.csswg.org/css-shapes-1/#basic-shape-functions), "all the lengths expressed in percentages are resolved from the used dimensions of the reference box", and for the `clip-path` property, the [reference box](https://drafts.fxtf.org/css-masking-1/#ref-for-typedef-basic-shape%E2%91%A0) is the border box of the element;
2. Per the `inset()` basic shape definition, "the optional <'border-radius'> argument(s) define rounded corners for the inset rectangle _using the border-radius shorthand syntax_", and the border-radius shorthand [calculates percentages](https://drafts.csswg.org/css-backgrounds-3/#propdef-border-radius) from the respective border box dimensions.

...both lead to conclusion that these percentages should be calculated from the respective dimensions of the border box of the element. So Chrome's implementation is correct and the Mozilla team is right considering the current behavior a bug and [fixing it immediately](https://bugzilla.mozilla.org/show_bug.cgi?id=1704742). But I admit that it's a bit too implicit and the result might be unintuitive for some authors. Doesn't the behavior of percentage corner radii of the `inset()` basic shape need explicit clarification?

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 13 April 2021 10:54:02 UTC