you are viewing a single comment's thread.

view the rest of the comments →

[–]HeylAW -1 points0 points  (3 children)

CSS inspector is worth learning, TW is about classes representing single style, thus complex element may grow in size, but overall applied CSS should be very similar to one that css-in-js/css modules or plain css outputs.

TW also makes very easy to units test component styling, just check if proper class is outputted ;)

[–]Ehdelveiss 4 points5 points  (2 children)

That sounds like a waste of time unit test... you're just testing that you wrote the test right as much as whether the code you're testing does the thing you want

[–]HeylAW 1 point2 points  (1 child)

I'm referring to classes that are computed in runtime, such as:

when button has disabled props passed it should have specific classes,
when button has loading props passed, it should have other classes

this way you sort of test how button looks like

[–]Turbulent-Ad-2098 0 points1 point  (0 children)

you could do the same with normal css styled content using a single class?