csswg-drafts icon indicating copy to clipboard operation
csswg-drafts copied to clipboard

[css-cascade] Allow declarations directly in @scope?

Open andruud opened this issue 2 months ago • 9 comments

Currently, @scope only accepts rules in its body. If you want to apply something to the scoping root itself, you need to use a :scope rule:

@scope (div) {
  :scope {
    color: green;
  }
}

However, ever since relaxed nesting was introduced (where we first try to parse something as a declaration, and otherwise try it as a nested rule), we should be unblocked if we wanted to support direct declarations in the rule.

andruud avatar Jun 04 '24 13:06 andruud