- From: Emilio Cobos Álvarez via GitHub <noreply@w3.org>
- Date: Thu, 04 Dec 2025 00:55:11 +0000
- To: public-css-archive@w3.org
emilio has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-overflow-4] overflow-clip-margin's ommited default box ==
`overflow-clip-margin` has a very weird special behavior for the default visual box, which doesn't match implementations:
https://drafts.csswg.org/css-overflow-4/#propdef-overflow-clip-margin:
> If omitted, defaults to padding-box on non-[replaced](https://drafts.csswg.org/css-display-4/#replaced-element) elements, or content-box on replaced elements.
Test-case would be:
```html
<!doctype html>
<style>
.image {
border-radius: 100%;
height: 100px;
width: 100px;
position: absolute;
top: 100px;
left: 100px;
object-fit: cover;
padding: 10px;
border: 10px solid;
overflow-clip-margin: 0px;
}
</style>
<img src="https://picsum.photos/id/237/200/300" class="image" />
```
Per spec, that should behave the same as if overflow-clip-margin: 0px wasn't there, but the Blink behavior is that it behaves as if padding-box was specified.
That's a bit weird but I think it makes sense if you specify the default overflow-clip-margin box in a UA sheet like https://drafts.csswg.org/css-overflow-4/#overflow-control:
> Host languages should define [UA style sheet](https://drafts.csswg.org/css-cascade-5/#cascade-origin-ua) rules that apply a default value of clip to such elements and set their [overflow-clip-margin](https://drafts.csswg.org/css-overflow-4/#propdef-overflow-clip-margin) to content-box.
It seems Blink's behavior is just defaulting to `padding-box` unless otherwise specified, and that makes sense to me I think? Having the omitted implicit behavior is rather weird, and if we do we should probably add some sort of `auto` keyword or something?
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13185 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 4 December 2025 00:55:12 UTC