惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
Vercel News
Vercel News
Microsoft Azure Blog
Microsoft Azure Blog
爱范儿
爱范儿
N
Netflix TechBlog - Medium
Google DeepMind News
Google DeepMind News
H
Help Net Security
罗磊的独立博客
The Cloudflare Blog
J
Java Code Geeks
博客园 - 叶小钗
I
InfoQ
B
Blog
Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
腾讯CDC
月光博客
月光博客
博客园_首页
雷峰网
雷峰网
M
MIT News - Artificial intelligence
博客园 - 【当耐特】
美团技术团队
T
The Blog of Author Tim Ferriss
博客园 - 司徒正美

Matthias Ott

Hello Again, World This, Still Not for Everyone The Shape of Friction WeissKlang L1 – Punching Above Its Weight Continvoucly Morged Value Webspace Invaders To Affinity and Beyond The Mystery of Storytelling Amateurs! Echoes of Connection Linear() Is Not (That) Linear View Transitions: The Smooth Parts Adding AVIF and WebP Support to My Craft CMS Site Challenge Acoustic Room Treatment and Building Sound Panels, Part 1: Planning Play On Overshoot The HTML Output Element Listening Closely Compressed Fluid Typography The Lifeblood of the Web What Could Go Wrong? That’s My Rank Making Space CSS :is() :where() the Magic Happens Visual Regression Testing for External URLs With Playwright Jane Goodall’s Famous Last Words European Tech Alternatives 🇪🇺 Independent Type Foundry Advent Calendar – Day 24: NaN Independent Type Foundry Advent Calendar – Day 23: Typotheque
The CSS Cascade, a Deep Dive
Matthias Ott · 2022-07-10 · via Matthias Ott

The Cascade is legendary. Legendary because it is the C in CSS. Legendary in how well it works to determine which selector wins when browsers apply styles to HTML. And legendary in how little many of us really know about it.

Bramus van Damme recently gave a fantastic talk about the Cascade at CSS Day. Whether you want to learn what the Cascade is and how it works or you already are familiar with it, watching this talk will be equally valuable for you. Bramus does a great job explaining the different steps of the Cascade and what specificity has to do with it in a way that you really understand it.

The 6 steps off the Cascade, including Cascade Layers

The six steps of the Cascade: origin and importance, context, style attributes, layers, specificity, and order of appearance.

He then goes on to show how the new concept of Cascade Layers works and what you can do with them. For example, they can be used to better separate the styles of a component library or third party components from the rest of your CSS. Cascade Layers are already supported by all modern browsers, so it is time to get familiar with them.

If you want to learn more about the Cascade and Cascade Layers, have a look at the slides from Bramus’ talk, his great blog post about Cascade Layers, and also the following articles:

~

29 Webmentions

1 Repost

27 Likes

ⓘ Webmentions are a way to notify other websites when you link to them, and to receive notifications when others link to you. Learn more about Webmentions.