We wrote a long section about CSS Scoping in our article about Safari 17.4. We wanted to make sure you all have an easy way to understand both of the major ways to use it + the massive change it makes to how ties in specificity resolve.
Don't miss it.
https://webkit.org/blog/15063/webkit-features-in-safari-17-4/#css-scoping
Oh, and check out the simple demos that are linked in the text. You can edit the CSS to see what happens.
https://codepen.io/jensimmons/pen/jORNYxx?editors=1100
https://codepen.io/jensimmons/pen/mdoQmQx?editors=1000