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

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

From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
Date: Mon, 18 Jan 2021 02:31:20 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-761939668-1610937079-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:31:38 UTC