3 ms·
Until someone else edits your code and doesn't understand why the layout suddenly broke. nth-child(2) is very prone to this.
by earthnail 3y ago
Until someone else edits your code and doesn't understand why the layout suddenly broke. nth-child(2) is very prone to this.
- kaba0 3y agoOr worse, it breaks at a completely different site you didn’t even touch, won’t notice and might also pass through manual testing (if that’s even a thing at your place), and end up in prod. Sure, there are AI-based testing tools that check for frontend changes, but let’s be honest, they are very rarely used, if at all.
- berkes 3y agoYes. My point was that to "fix" a scattering of .mb-2 going astray, we often pull out even worse solutions. Making the software as a whole worse.
- quickthrower2 3y agoHacks like this exist in non-tailwind projects where the classes have lost all meaning and the CSS is in a messy state. On the other hand, in tailwind you could organize things well using your template/component system, be that ReactJS, Vue, ERB, EJS, CSHTML etc. I agree there is subtlety though. A well organized and "benevolent dictator-ed" crop of CSS files is going to be more powerful than it's Tailwind equivalent due to having selectors etc. available.