Re: [csswg-drafts] [css-cascade] Provide an attribute for assigning <link> or <style> elements to cascade layers (#5853)

I suspect that's not going to work, as existing user agents would just ignore the layer attribute, and assign all those styles to the default layer instead, so that's not going to be forward compatible.

For `<style>`, I'm not so sure it's critical: if we can find a nice syntax that's forward compatible, then great, but otherwise, it's just syntactic sugar: if you can do
```css
<style layer="reset">
  audio[controls] { display: block; }
</style>
```
you can also do
```css
<style>
@layer reset {
  audio[controls] { display: block; }
}
</style>
```

For `<link>` it's more useful though, as you may be trying to load into a particular layer a stylesheet that you cannot modify.

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


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

Received on Monday, 18 January 2021 02:31:22 UTC