[csswg-drafts] [css-contain-3] Revisit decision to make `style` the default `container-type` (#7066)

mirisuzanne has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-contain-3] Revisit decision to make `style` the default `container-type` ==
In https://github.com/w3c/csswg-drafts/issues/6393#issuecomment-1011283604 we resolved that:

> Boxes default to style containment

@una reopened that discussion in https://github.com/w3c/csswg-drafts/issues/6393#issuecomment-1012446872, and it was briefly discussed again in https://github.com/w3c/csswg-drafts/issues/6644#issuecomment-1034036418 without any definitive conclusion. 

It seemed like a good idea for this discussion to have its own issue. 

The primary concerns on each side are:
- Keeping the `style` default makes one container type inconsistent with all other types. And while it helps with queries on inherited properties, it makes `container-name` much more important for style queries on noon-inherited properties (like background-color).
- Removing the style default makes it much harder to query inherited properties, which should almost always resolve against the direct parent. Without the default value, authors are likely to add a style to all elements with the universal selector, which is less performant.

Related, I'm curious about the details of what it means to have `style` as a default. Do we mean…
- …that `style` is the initial value of the property, and any other value overrides that behavior? In this case, authors would have to write e.g. `container-type: size style` in order to keep the default intact while adding other container types. That doesn't seem ideal.
- …that all elements are style containers, no matter what value is applied to the property? In this case, we might not need an explicit `style` value? Or a variant might be that the default can be removed with `none` and re-applied with `style`?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7066 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 16 February 2022 22:41:03 UTC