Re: [csswg-drafts] [css-cascade] [css-nesting] Figure out whether we're fine with "shifting up" bare declarations after rules (#8738)

Not saying it's necessarily a good idea, but playing devil's advocate a bit, we already have that kind of concept for e.g. `@import` / `@namespace` / etc, don't we?

Imagine someone wrote this ten years ago:

```css
:has(body) {}

@import "something.css";
```

(Or something along those lines)

Their `@import` would stop working on browsers that support `:has()`, yet that hasn't been ever a concern (and I don't think it should be).

The switch for that is "A valid rule has been parsed", and I think we could do the same, so that random garbage doesn't cause that action at a distance.

-- 
GitHub Notification of comment by emilio
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8738#issuecomment-1517904602 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 21 April 2023 14:17:13 UTC