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

`@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