For the CSS enthusiasts : @layer is supported on all major browsers

since the 26 of July.

TL;DR

  • With Cascade Layers you can split your CSS into several layers.
  • Upon creating a Layer with @layer, you also determine the Layer Order.
  • Re-using Layer names will append to the already created Layer, without altering Layer Order.
  • When evaluating Layers, the Cascade (the algorithm) will have declarations placed in later-declared Layers win from declarations in early-declared Layers (i.e. “Last Layer Wins”).
  • The Cascade evaluates Layers before Specificity and Order Of Appearance. That way you no longer need to worry about these two criteria for CSS found in separate Layers, as Layer Order will already have determined the winning declaration.
    The Future of CSS: Cascade Layers (CSS @layer) – Bram.us

Relevance for TiddlyWiki

This new CSS feature should be useful for writing composite stylesheets with tiddler transclusion, and making stylesheets more readable :slight_smile:

It will also be easier for plugins to override default themes.

More info

3 Likes