Skip to content

[css-cascade-6] What rules are invalid in @scope? #8522

@cdoublev

Description

@cdoublev

It is not clear whether @scope allows other CSS rules.

The syntax of the @scope rule is @scope [(<scope-start>)]? [to (<scope-end>)]? { <stylesheet> } where [...] <stylesheet> represents the scoped style rules.

https://drafts.csswg.org/css-cascade-6/#scope-syntax

All @scope examples in CSS Cascade 6 include (scoped) style rules.

Finally, the <stylesheet> production represents a list of rules. It is identical to <rule-list>, except that blocks using it default to accepting all rules that aren’t otherwise limited to a particular context.

For rules that use <stylesheet>, all rules are allowed by default, but the spec for the rule may define what types of rules are invalid inside the rule.

https://drafts.csswg.org/css-syntax-3/#rule-defs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions