|
|
|
|
|
by arkh
2820 days ago
|
|
First line of the first example you get in "what is Tailwind": <div class="bg-white
Just accept the fact your HTML contains your styling and go with: <div style="background:white"
There was a time when people thought CSS could be used to style some logical HTML: <div class="card-wrapper"
So the day you want to change the color of your card-wrapper from white to green you can change a line in some CSS and not have to go around all your HTML or end with a <div class="bg-white"> with a green background.CSS frameworks feel like a "let's get all the shit CSS was meant to help remove and just put it in divs". |
|
I will just say theory aside, in practice, this has worked out great for our team. In my 5+ years experience, I've constantly run across the issue of legacy code with thousands of classes, referencing potentially non-existent markup and countless one-off tweaks. You can start with the best intentions and organization in your SASS files but eventually things start to get really crufty. Keeping everything in components and keeping styles in the markup alleviates a lot of that.