Skip to main content
CSS-Tricks
  • Articles
  • Notes
  • Links
  • Guides
  • Almanac
  • Picks
  • Shuffle
Search

Articles Tagged
cascade

14 Articles
Direct link to the article Maybe don’t use custom properties in shorthand properties
cascade custom properties

Maybe don’t use custom properties in shorthand properties

This easily qualifies as a "gotcha" in CSS and is a good reminder that the cascade doesn't know everything all at the same time. If a custom property is invalid, the cascade won't ignore it, and it gets evaluated, which invalidates the declaration.
Geoff Graham on Mar 6, 2025
Direct link to the article @layer
cascade

@layer

The CSS @layer at-rule enables CSS authors to work within CSS Cascade Layers as a way of controlling how the CSS Cascade evaluates the order of styles. We define a layer and wrap it around the rulesets we want to …

Ryan Trimble on Oct 22, 2024
Direct link to the article HTML Web Components Make Progressive Enhancement and CSS Encapsulation Easier!
cascade progressive enhancement web components

HTML Web Components Make Progressive Enhancement and CSS Encapsulation Easier!

I have to thank Jeremy Keith and his wonderfully insightful article from late last year that introduced me to the concept of HTML Web Components. This was the “a-ha!” moment for me:

When you wrap some existing markup in a

…
Kev Bonett on Aug 6, 2024
Direct link to the article Taming the Cascade With BEM and Modern CSS Selectors
:has :is :where bem cascade specificity

Taming the Cascade With BEM and Modern CSS Selectors

BEM. Like seemingly all techniques in the world of front-end development, writing CSS in a BEM format can be polarizing. But it is – at least in my Twitter bubble – one of the better-liked CSS methodologies.

Personally, I think …

Liam Johnston on Jan 17, 2023
Direct link to the article Don’t Fight the Cascade, Control It!
:is :where cascade cascade layers custom properties data attributes specificity

Don’t Fight the Cascade, Control It!

If you’re disciplined and make use of the inheritance that the CSS cascade provides, you’ll end up writing less CSS. But because our styles often comes from all kinds of sources — and can be a pain to structure and …

Mads Stoumann on Jan 11, 2022
Direct link to the article Cascade Layers
@layer cascade specificity

Cascade Layers

There is a new thing coming in CSS: @layer. …

Chris Coyier on Jan 6, 2022
Direct link to the article Should DevTools teach the CSS cascade?
cascade DevTools specificity

Should DevTools teach the CSS cascade?

Stefan Judis, two days before I mouthed off about using (X, X, X, X) for talking about specificity, has a great blog post not only using that format, but advocating that browser DevTools should show us that value by …

Chris Coyier on May 21, 2021
Direct link to the article Computed Values: More Than Meets the Eye
cascade computed DevTools inheritance values

Computed Values: More Than Meets the Eye

Browser DevTools are indispensable for us front end developers. In this article, we’ll take a look at the Computed tab, a small corner of the DevTools panel that shows us big things, like how relative CSS values are resolved. We’ll …

Jemimah Omodior on Aug 5, 2020
Direct link to the article Using Custom Property “Stacks” to Tame the Cascade
cascade custom properties inheritance

Using Custom Property “Stacks” to Tame the Cascade

Since the inception of CSS in 1994, the cascade and inheritance have defined how we design on the web. Both are powerful features but, as authors, we’ve had very little control over how they interact. Selector specificity and source order …

Miriam Suzanne on May 23, 2022
  • 1
  • 2
  • Older

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • About DO
  • Cloudways
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Contact
  • Write for CSS-Tricks!
  • Advertise with us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • Bluesky
Back to Top