5 ms·
> That seems to imply that `overflow: hidden` could still be used with `contain: size` to "access" clipped content. Ah, you're right. This changed at some poin
by frivoal 7y ago
> That seems to imply that `overflow: hidden` could still be used with `contain: size` to "access" clipped content.
Ah, you're right. This changed at some point in the history of this property, and I was remembering the old version.
> And still I don't see how the optimizations they list are not available with `overflow`.
Here's one: Setting overflow to something other than visible doesn't cause the element to be a containing block for absolutely positioned children, so they can escape. https://jsbin.com/wesirup/edit?html,css,output https://jsbin.com/wesirup/edit?html,css,output
Here's another one: stacking contexts are weird https://jsbin.com/hepiqof/edit?html,css,output https://jsbin.com/hepiqof/edit?html,css,output css-contain:paint puts sensible boundaries.
> BTW, I think it's unfortunate that the MDN article introduces `contain` as if it were a hint... ...when actually it modifies layout and display behavior, overriding other properties.
Agreed.
- detaro 7y agoIt's a wiki, so if you're sure enough about your understanding of it (I'm not about mine, otherwise I'd do it) so you can fix the unfortunate wording!