-
Notifications
You must be signed in to change notification settings - Fork 756
Description
The spec currently says that background-clip defines a box for clipping the background, as well as overflow clipping of descendants. 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. A bug in Chromium has been present for a long time; 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?