Skip to content

[css-contain] Clarify style containment effect 1 #1872

@Loirooriol

Description

@Loirooriol

I don't understand what the first effect of style containment is supposed to do.

The following properties must have no effect on descendants of the element:

  • break-* (and the related aliases)
  • bookmark-*
  • string-set

For starters, the definitions of bookmark-* and string-set don't make sense (see #1830 and #1829). In fact I think the whole CSS Content spec should be marked as "Not ready for implementation" or something until it is rewritten. So I don't think these properties should be mentioned in CSS Contain, which is a CR.

So let's focus on break-*. I don't understand the effect. Does it mean that break-* properties in selectors that match descendants do not have any effect? Or that break-* property values on the contained element don't affect descendants? For example, from unforced breaks,

if all of them are auto and a common ancestor of all the elements has a break-inside value of avoid, then breaking here is not allowed.

If this ancestor is the contained element, does it mean that break-inside: avoid has no effect, is treated as auto, and thus a break between its descendants is allowed?

If so please clarify the sentence to something like

The following properties, when set on the contained element or one of its ancestors, must have no effect on descendants of the element

But then I'm not much sure about how this is different from scoped properties described in effect 2.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions