6
Showerthought: Why does every framework insist on resetting all my margin values?
I burned 4 hours last Tuesday fighting a CSS bug on a client's landing page because Tailwind's preflight reset nuked all my carefully set margins on a form layout. Turns out the default box-sizing and margin reset was working against me the whole time. Is stripping global styles really worth the convenience or does it just create more headaches for developers who know what they're doing?
2 comments
Log in to join the discussion
Log In2 Comments
zarak181d ago
I spent like 3 hours last month on a checkout page because Tailwind's preflight took away all my margin on radio button groups. I had to wrap everything in a div just to get spacing back. It's annoying when you know exactly what you're doing and the framework assumes you need handholding. Do you just turn off preflight entirely now or did you find a smarter workaround?
7
paul_burns17h ago
Man, tell me about it. I spent a whole Saturday once trying to get a simple contact form to line up right on a real estate site I was building. Turned out the CSS reset was killing the margin on my submit button and making it stick to the bottom of the form. Ended up having to manually add every single spacing rule back in. Makes you wonder if saving a few lines of code is worth the headache when you're already past the basics.
5