Skip to content

[css-contain] "scoped to an element" definition is unused (?) #2845

@dholbert

Description

@dholbert

In the style containment spec-text...
https://drafts.csswg.org/css-contain/#containment-style
...there's an explanation of what a "scoped property" is, and how it "has its effects scoped to a particular element or sub-tree." Most of this explanation is about what it means to be scoped to an element vs. scoped to a sub-tree.

However: this distinction doesn't seem to matter, because the spec only uses the "scoped to a sub-tree" behavior:

The counter-increment and counter-set properties must be scoped to the element’s sub-tree
[...]
The effects of the content property’s open-quote, close-quote, no-open-quote and no-close-quote must be scoped to the element’s sub-tree.

So the definition of "scoped to an element" seems to be unused, which is a bit confusing.

If it's not going to be used, perhaps it'd be clearer to skip that definition, and dive directly into explaining what it means to scope to a sub-tree, rather than explaining an unused different term first?

(CC @frivoal @tabatkins )

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions