W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2021

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

From: Miriam Suzanne via GitHub <sysbot+gh@w3.org>
Date: Mon, 11 Jan 2021 18:33:17 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-783602714-1610389996-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:25 UTC