Donut Scope (@scope in CSS) | Tutorial from Chris Coyier @MasterDotDev
Donut Scope (@scope in CSS) | Tutorial from Chris Coyier  @MasterDotDev
Uploaded March 2026 | Updated November 2026, 2 hours ago
Donut scoping, a term coined by Nicole Sullivan 15 years ago, is a feature of `@scope` in CSS where you can write a block of styles that apply to an element and it’s descendants until it finds another provided 2nd selector. It’s written like `@scope (article.card) to (.content) {}`. The effect is like you’re selecting an area with a hole in it, like a donut.

Donut Scope Basics Code: codepen.io/editor/chriscoyier/pen/XJbyMJZ
Donut Scope Full Code: codepen.io/editor/chriscoyier/pen/NPqEdQN
Scope in CSS Blog Post: frontendmasters.com/blog/scope-in-css
Nicole Sullivan’s Blog Post: stubbornella.org/2011/10/08/scope-donuts
Proximity Scope Tutorial: frontendmasters.com/tutorials/chris-coyier/proximity-scope
DOM Blasters Tutorial: frontendmasters.com/tutorials/chris-coyier/dom-blasters

Find Frontend Masters Online:
Twitter: twitter.com/FrontendMasters
LinkedIn: linkedin.com/company/frontend-masters
Facebook: facebook.com/FrontendMasters
Instagram: instagram.com/FrontendMasters
TikTok: tiktok.com/@frontendmasters

About Us:
Advance your skills with in-depth, modern front-end engineering courses — our 250+ high-quality courses and 24 curated learning paths will guide you from mid-level to senior developer! Start your path to mastery today: frontendmasters.com/?utm_source=youtube&utm_medium=home_link&utm_campaign=exlusive
Donut Scope (@scope in CSS) | Tutorial from Chris CoyierHow To Debug Like a Pro - From Beginner To Expert | Tutorial from WebDevSimplified5 Words That Boost AI Accuracy 🚀🤖🤖 How LLMs Understand Word MeaningReal Advice for Engineers Starting Their Careers (From People Whove Been There)Six workshops. One month. The headliner is FREE.C Programming: 50+ Years of Innovation and Relevance 🚀Why Your Team is Scared to Touch the Design SystemThe Power of Play in Tech with Vercels Matias Gonzalez | Frontend Masters Podcast Episode #29Why Grid and Flexbox Are Better TogetherTDD: Start with how you want the world to work, and then make the world work like thatOne trick to stand out in your next frontend interview: bring up event delegation.
MasterDotDev |

Donut Scope (@scope in CSS) | Tutorial from Chris Coyier

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER