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

mirisuzanne has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-cascade] Provide an attribute for assigning <link> or <style> elements to cascade layers ==
This was raised on #4969, related to the [Cascade level 5 spec](https://drafts.csswg.org/css-cascade-5/).

We've defined a syntax for cascade layers to be declared as code-blocks or url imports:

```css
@layer reset url(remedy.css); 

@layer reset {
  audio[controls] { display: block; }
}
```

If we're allowing authors to import entire stylesheets into a layer, it seems appropriate to make that available on `<link>` and `<style>` tags as well. For performance reasons, those are more likely to be used - rather than chaining imports. I'm proposing a `layer` attribute:

```html
<link rel="stylesheet" href="remedy.css" layer="reset">

<style layer="reset">
  audio[controls] { display: block; }
</style>
```

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5853 using your GitHub account


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

Received on Monday, 11 January 2021 18:33:19 UTC