W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2020

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

From: Chris Harrelson via GitHub <sysbot+gh@w3.org>
Date: Wed, 28 Oct 2020 23:05:09 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-731849226-1603926308-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:21 UTC