-
Notifications
You must be signed in to change notification settings - Fork 753
Closed
Description
In #6393 (comment) we resolved that:
Boxes default to style containment
@una reopened that discussion in #6393 (comment), and it was briefly discussed again in #6644 (comment) 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
styledefault makes one container type inconsistent with all other types. And while it helps with queries on inherited properties, it makescontainer-namemuch more important for style queries on non-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 the
stylecontainer-type 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
styleis 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 stylein 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
stylevalue? Or a variant might be that the default can be removed withnoneand re-applied withstyle?