Skip to main
Link
fragment of an inverted triangle with the cascade --
cascade layers are highlighted below element-attached styles
and above specificity

A Complete Guide to CSS Cascade Layers

Cascade layers are a new CSS feature that allows us to define explicit contained layers of specificity, so that we have full control over which styles take priority in a project without relying on specificity hacks or !important. This guide is intended to help you fully understand what cascade layers are for, how and why you might choose to use them, the current levels of support, and the syntax.

See more at CSS-Tricks »

Webmentions

  1. Grid of hot air balloon images
    Link post type

    Baseline Layered UI Patterns: <dialog> and popover

    Elements and windows that pop up on the screen are one of the most common patterns on the web. With use cases spanning from alerts and brief forms requesting data, to the now ubiquitous cookie settings prompt, these layered UI patterns are used frequently by developers.

    see all Link posts
  2. Image gallery grid with pictures of dogs and birds.
    Link post type

    How to Implement an Image Gallery Using Baseline Features

    From image sharing sites to online stores, image galleries are a common pattern on the web. Images can be very data heavy, and loading images can make the page take a long time to load. In addition, users have high expectations around the usability of galleries, so it’s common to…

    see all Link posts
  3. Baseline Bakery: as sweet as Interop. Demo to view donut products as a small grid, large grid, or list with an optional To Go Bag sidebar.
    Link post type

    Container Queries and Units in Action

    One of the goals when writing CSS is to build component parts that will adapt well to different (and unexpected) contexts. Ideally, a component can be placed inside any “container” element without it feeling broken or out of place. How can you accomplish this in a complex layout like a…

    see all Link posts