Get the latest tech news

Inline Scope for CSS


I am not tightly following what's going on in CSS land, since blogs are not the thing and mailing lists became spam lists I don't know where to "listen". But from time to time I read MDN and look for the things that I expect CSS and HTML to provide. And funny enough, often my expectations and reality are aligned. Maybe because the missing things are just so obvious :).

This way the CSS is directly attached to the HTML and only applies to the children of this section. inside a SPAN = blueinside a DIV = inherited color = red You can see that@scope simply limits the styling to the children of the DOM node it is in.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of css

css

Photo of Inline Scope

Inline Scope

Related news:

News photo

The new CSS property that boosts your rendering performance

News photo

Rio: Web apps in pure Python

News photo

Tailwind CSS vs. Pico CSS (2022)