> But the issue that the scoping[0] you're referring to on your other comment is something I've never encountered or heard someone complain about.
Why do you think BEM exists? Or CSS-inJS? Why do you think web components exist?
All these are attempts to actually do what you claim css is already doing: to make sure that the element owns its subtree in terms of styling.
CSS is global.
> So I assumes, any style property that is not set at the root of any element is inherited from the parent.
Of course not. The hint is in the name: Cascading stylesheets. Your "owned" subtree is owned by every single element above up to and including document root.
> No need for elaborate syntax and mechanisms that just drive up the complexity of the code.
There's nothing complex about Tailwind. It actually reduces all the complexity to a set of small primitives. And since it's still CSS, you can write your own CSS as you wish.
Why do you think BEM exists? Or CSS-inJS? Why do you think web components exist?
All these are attempts to actually do what you claim css is already doing: to make sure that the element owns its subtree in terms of styling.
CSS is global.
> So I assumes, any style property that is not set at the root of any element is inherited from the parent.
Of course not. The hint is in the name: Cascading stylesheets. Your "owned" subtree is owned by every single element above up to and including document root.
> No need for elaborate syntax and mechanisms that just drive up the complexity of the code.
There's nothing complex about Tailwind. It actually reduces all the complexity to a set of small primitives. And since it's still CSS, you can write your own CSS as you wish.
Here's a good overview of how and why you would use it: https://piccalil.li/blog/cube-css/