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 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










