Member Exclusive

Donut Scope (@scope in CSS)

CSS
June 24, 2025

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.