-
Notifications
You must be signed in to change notification settings - Fork 759
Description
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 elements, or content-box on replaced elements.
Test-case would be:
<!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 rules that apply a default value of clip to such elements and set their 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?