Re:CSS Containment Specification
by jtolmar on Sunday February 16, 2020 @01:03AM
(#22340060)
It sounds like you want "contain: content" for almost every element, except when you're doing something like absolute positioning that's intentionally breaking containment. I get that you can't make containment the default because of backwards compatibility, but I'd think there should be a "contain: none" option so you can open with "* { contain: content; }" and turn it off for the subtrees where you're actually using containment-breaking layout.
[ Parent
| on HN ]
`contain: none` is a thing: https://www.w3.org/TR/css-contain-1/#valdef-contain-none
I think that's overly-optimistic for most "web apps", which are the main use-case since this API is only useful when your DOM is enormous and it and/or your styles are changing frequently.
Re:CSS Containment Specification
by The_rationalist on Sunday February 16, 2020 @07:02AM
(#22341165)
I invite you to read the comment I've made where I question if "* { contain: content; }" is or isn't the optimal selector.