Re: [csswg-drafts] [css-cascade-5] Allow authors to explicitly place unlayered styles in the cascade layer order (#6323)

I like the goal here, but have a few questions.

As I understand this, we would basically be creating two layer stacks — one above and one below the default — and then use the keywords to append layers to the top of either stack? What's the result of these cases?

```css
@layer up one;
@layer down one;
```

Does that give us two layers with duplicate names (upper one & lower one)? Or do we only allow this keyword when the name is first used (in which case the second rule is invalid)? Another option is that we only provide this one-off syntax for truly one-off unnamed layers?

```
@layer  <layer-name> | [ up | down ] { ... }
```

I assume we _don't_ want to allow moving layers around retroactively, so the second rule should not impact the layers defined in the first rule. That's what `up`/`down` imply to me. So if that's not what we mean, I think we should name the two layer stacks, and use their names as the keywords: something more like `upper`/`lower` or `default`/`important` or …?

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


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

Received on Thursday, 7 October 2021 00:05:27 UTC