Closed bkardell closed 3 years ago
Previous discussion on this issue: https://github.com/w3c/csswg-drafts/issues/4981
“Levels” seems OK to me. “Sheet priority” ?
I think "levels" had generally positive comments in the previous thread. While "priority" makes a lot of sense, it might be confusing that these explicit layers/levels/priorities have a lower priority than normal (unlayered/leveled/prioritized) styles. So if you add @priority {}
to an existing stylesheet, you would be de-prioritizing those styles.
"levels" 👍🏻 "spaces"?
My concern with levels is that it's less clear that the they wrap differently for non-important and important rules, and for the purpose of reverting rules in the !important half revert everything in the sandwich. Levels seems like it would be more of a flat, step-by-step ordering. At least, that's my impression.
Brainstorming:
@defaults
(since these have lower priority)@group
The CSS Working Group just discussed [css-cascade-5] Layers terminology bikeshed
.
Potentially relevant? It looks like the Tailwind CSS library has added an @layer
rule that has roughly the same purpose & block syntax, but with only three predefined layers. As far as I can tell, they added that in July – since we first resolved on the name.
namespaces
?
@ihorzenich wrote:
namespaces
?
@namespace
is already taken, see https://www.w3.org/TR/css3-namespace/#declaration.
@fantasai wrote:
Levels seems like it would be more of a flat, step-by-step ordering.
Not necessarily. "Levels" are also a term in tree-like structures.
Sebastian
The draft Map Markup Language spec proposes a <layer>
element (example usage) - and although it's not yet clear how styling MapML with CSS should work - I think authors are likely going to want to scope styles to these map layers, in which case the name @layer
may (or may not) be thought to be appropriate, albeit different from cascade layers.
cc @prushforth FYI
Agenda+ to resolve this before browsers release the feature
The CSS Working Group just discussed Layers terminology bikeshed
, and agreed to the following:
RESOLVED: Keep "layers" and close issue no change
@bkardell since you opened this, and you weren't on the call, I wanted to get your eyes on it before closing the issue.
Yeah I don't have very strong feelings here really, it just felt there was perhaps a narrow window to consider avoiding any possible confusion. I think we're past that anyway, really and it is easily learned. If the group feels like 'layers' is the thing, I have no objection. Sorry I missed the call where it was discussed. Since I was the opener I'm happy to close it myself and retract the issue if that is easier.
Cascade 5 introduces a concept which it currently "cascade layers", in communications this frequently becomes just "layers". Myself (and I think a few others) suggested at one point that it would be ideal if it could not be "layer" which seems overloaded with stacking context layers and even concepts like "top layer". I'm not of the opinion that this would be disasterous, just that it is more ideal if we can avoid it by just using another term.
Other quick, not well thought out alternatives off the top of my head, "cascade priorities" or "cascade levels" or "cascade zones" ?