Re: [csswg-drafts] [css-cascade-6] Add ability to scope rules from an imported stylesheet (#7348)

`allow full reordering of all the current conditions on @import (MQ, scope, ...)`

There is an issue with allowing any order.
Media query lists can be partially valid.

Any media query list with more than one media query would swallow unrecognized trailing parts.

```css
@import url("foo") screen, print something-invalid(really-does-not-exist);
```

This still applies fine everywhere that matches `screen`.
The same for:

```css
@import url("foo") screen, print scope(.foo);
```

You can see this in action in this codepen:

https://codepen.io/romainmenke/pen/WNVvyBY

-----

Can we instead just allow any order between new conditions?
- `layer` always first
- media query lists always last
- anything in between can go in any order


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


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

Received on Friday, 27 September 2024 17:26:19 UTC