Does This Browser Support @layer?

At this point, layers should be supported in most nightly/canary browsers by default, and behind a feature flag in beta versions (including Safari Technology Preview)

To get a more extensive overview of support in your current browser, see the Web Platform Tests. Scroll down the list to find all the layer-* tests.

Layers allow you to manage the cascade more explicitly, specifying exactly what stlyes override other styles, without worrying about specificity or source order. For example, we can ensure that a error state always takes priority over other styles: