- From: Miriam Suzanne via GitHub <sysbot+gh@w3.org>
- Date: Tue, 11 May 2021 17:18:09 +0000
- To: public-css-archive@w3.org
mirisuzanne has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-cascade-5] Reconsider placement of unlayered styles, in relation to better progressive enhancement? == In the spec for [Cascade Layers](https://drafts.csswg.org/css-cascade-5/) we define default unlayered styles as being at the top of the normal layer stack, and the bottom of the `!important` layers. Any explicit layers are added below the normal unlayered styles, with layered important styles above unlayered important styles. - first layer !important -- _highest cascade priority_ - second layer !important - **default !important** - **default (normal)** - second layer (normal) - first layer (normal) -- _lowest cascade priority_ I'm not sure this matches either developer instinct, or the best path for authors to start integrating cascade layers as a progressive enhancement. - I expect authors first instinct will be to reach for layers when they want to _add cascade priority_ to a style - Until layers are broadly supported, authors will want to integrate them selectively as a progressive enhancement When I think about serving a simpler set of styles to older browsers, I would want those browsers to get the most broad defaults, along with anything most important in those defaults. But with unlayered styles at the top of the normal stack, authors are instead encouraged to move their most broadly-applied , lowest-priority styles (resets, global typography, etc) into layers first -- hiding them from old browsers. If default styles were at the bottom of the normal layers, authors could instead begin adding layers for more narrowly targeted styles. So I'm proposing we change the way unlayered styles stack: - **default !important** -- _highest cascade priority_ - first layer !important - second layer !important - second layer (normal) - first layer (normal) - **default (normal)** -- _lowest cascade priority_ Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6284 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 11 May 2021 17:18:11 UTC