News for hackers. Stuff that matters.
Re:Why Tailwind CSS Won by afiori on Wednesday August 16, 2023 @09:01AM (#37146410)
Tailwind is made for a component world where reusability is at the template/component level.

This also covers both scoping issue with css: the usual issues with the single global namespace for classes and the unlimited depth of the descendant selector.

That is even with scoped classes if your app has component nesting as <A id=1><B id=2><A id=3></A></B></A> then a selector like .A_box::hover .A_btn will select the class A_btn both in <A id=1> and <A id=3>.

Tailwind solution is to manually or programmatically apply the relevant style in your template.

The whole idea being that the unit of reuse is not the class name but the templating component.

Re:Why Tailwind CSS Won by imbnwa on Wednesday August 16, 2023 @09:55AM (#37147055)
So do you do sibling selectors by using the array index in a `.map` call?
Re:Why Tailwind CSS Won by afiori on Wednesday August 16, 2023 @12:59PM (#37150002)
yes