#597: Early design review of Cascade Layers

Visit on Github.

Opened Jan 14, 2021

HIQaH! QaH! TAG!

I'm requesting a TAG review of Cascade Layers.

In the same way that Cascade Origins help to balance styling concerns across stakeholders -- layering browser defaults, user preferences, and document styles -- it can be useful to have similar layering of concerns within a single origin. Author styles often start with browser normalization or resets, then layer in default typography, broad patterns (sometimes from design systems or frameworks), and more specific component styles. Cascade Layers would allow authors to define their own layering scheme and avoid specificity or source-order conflicts across concerns.

  • Explainer: https://github.com/oddbird/css-sandbox/blob/main/src/layers/explainer.md
  • Specification URL: https://drafts.csswg.org/css-cascade-5/
  • Security and Privacy self-review: This proposal does not expose anything new, and has no impact on security or privacy
  • GitHub repo (if you prefer feedback filed there): https://drafts.csswg.org/
  • Primary contacts (and their relationship to the specification):
    • Miriam Suzanne, @mirisuzanne, Invited Expert, author
    • Elika Etemad, @fantasai, Invited Expert, contributor
    • Florian Rivoal, @frivoal, Invited Expert, contributor
    • Tab Atkins Jr., @tabatkins, Google, contributor
    • Rune Lillesveen, @lilles, Google, implementor
    • Rossen Atanassof, @atanassov, Microsoft, co-chair
    • Alan Stearns @astearns, Adobe, co-chair
  • Organization(s)/project(s) driving the specification: CSSWG
  • Key pieces of existing multi-stakeholder review or discussion of this specification:
  • External status/issue trackers for this specification (publicly visible, e.g. Chrome Status):

Further details:

  • I have reviewed the TAG's API Design Principles
  • The group where the work on this specification is currently being done: CSSWG
  • The group where standardization of this work is intended to be done (if current group is a community group or other incubation venue): CSSWG
  • Major unresolved issues with or opposition to this specification:
  • This work is being funded by: Google

You should also know that...

The CSSWG has approved this specification for publishing as a First Public Working Draft, and also recommended that I submit the design for early review -- as the spec still has a number of open issues.

We'd prefer the TAG provide feedback as 🐛 open issues in our GitHub repo for each point of feedback

Discussions

2021-01-Kronos

Minutes

Lea: Some initial thoughts. The name should be changed and we alredy have an issue about that. There is a well established visual interpretation of "layer". ... It seems like there is no way to define a layer with lower priority than unlayered styles. Often with libraries and frameworks you want to set defaults that sit above the browser defaults, but still want authors to be able to override them without wrangling specificity. It seems that all current syntaxes for defining layers do not provide a way to do this.

2021-02-22

Minutes

Lea: we had left comments, but based on misunderstanding about priorities. Everything is good. Maybe close?

Rossen: what is left? nothing? I agree. evangelizes

Lea: closing comment