[csswg-drafts] [css-backgrounds-3] Adjustments to spec needed to implement rounded corner clipping of descendants (#5680)

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

== [css-backgrounds-3] Adjustments to spec needed to implement rounded corner clipping of descendants ==
The spec currently says that `background-clip` defines a box for clipping the background, [as well as overflow clipping of descendants](https://www.w3.org/TR/css-backgrounds-3/#corner-clipping). All browsers implement `background-clip` correctly for the background, but for descendants it appears they all implement `padding-box` and do not support any other value. See [this testcase](https://output.jsbin.com/yayipavobo). A bug in Chromium has been present for [a long time](https://bugs.chromium.org/p/chromium/issues/detail?id=966283); similar bugs are filed on WebKit and Gecko.

I would like to implement `content-box` for overflow clipping. However, since browsers implement `padding-box`, I don't think it is web compatible to obey the spec as-is, since it would mandate `border-box` by default. I'm also not sure if there is a very good use case for overflow clipping to `border-box`, since in many cases this would cause descendant content to overlap the border when it paints after that border.

How about this: we change the spec to say that if `background-clip` is set to `content-box`, then we use that clip and its curve for overflow contents, and otherwise `padding-box`.

@frivoal @tabatkins Florian: Tab recommended you as a person who knows this part of the spec?


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


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

Received on Wednesday, 28 October 2020 23:05:11 UTC