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

Re: [csswg-drafts] [css-cascade] What happens to the priority of unmentioned layers in the presence of the @layers rule? (#5810)

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Sat, 09 Jan 2021 23:03:12 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-757380699-1610233391-sysbot+gh@w3.org>
`@layers a, b, c` is identical to `@layer a; @layer b; @layer c;`. As for unlayered rules, they're effectively part of a final unnamed layer: “For the purpose of this step, any declaration not assigned to an explicit layer is added to an implicit final layer. ”

All of the layers are ordered in the order they are first encountered. Last in the order wins for non-important rules, so in your example the rules would be ordered Line 2, Line 3, Line 4, Line 5, Line 1 and Line 1 would win any conflicts. The @layers rule at the end would have no effect, because layers c and c were already declared and their order thus already established.

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 9 January 2021 23:03:17 UTC

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