2 ms·
tailwind is an anti-pattern that breaks separation of concerns rule. i'm amazed how it became so popular.
by grzes 5mo ago
tailwind is an anti-pattern that breaks separation of concerns rule. i'm amazed how it became so popular.
- thiht 5mo agoBecause it’s a made up rule, not a law of nature. Having the styles inline on a component is very easy to reason about, it was just extremely impractical with CSS and the style attribute. Tailwind makes it easy, practical, and is actually well designed regarding its support for variables (ie. you can have a sane design system easily). What you want to share/cascade is variables, not styles. Styling components makes it easy to make sure the styling of each component is isolated and doesn’t have unintended cascading effects. When working this way, using Tailwind is as much a good pattern than, say, CSS modules (which I like too).
- deleted 5mo ago[deleted]