4 ms·
Less verbose? Ha, far from it. Look at the tailwind examples. One div tag now has 6 or more classes attached
by geek_at 3y ago
Less verbose? Ha, far from it. Look at the tailwind examples. One div tag now has 6 or more classes attached
- matheusmoreira 3y agoWell I suppose it's less verbose than a lengthy style="..." attribute that accomplishes the same thing.
- ludwik 3y agoNow it's a lengthy css instead. It seems to me we are going backwards...
- Hedepig 3y agoOut of interest, have you built anything non-trivial with tailwind? I've used CSS, and Tailwind and not worrying about naming everything correctly and not skipping around different files is a dream for me. Perhaps that's my brain, Idk. Further I have gone over old code, and haven't had any problem with maintainability
- culi 3y ago> Well I suppose it's less verbose than a lengthy style="..." attribute that accomplishes the same thing. It's not actually the same thing. What you're talking about is inline styling which takes precedence over class-based styling. It's generally considered bad practice to rely on inline styles. The traditional approach is `style="card"` not `style="...a bunch of rules..."`
- matheusmoreira 3y ago<div class="block text-black">...</div> <div style="display: block; color: black;">...</div> Looks like the same thing to me. Only shorter.
- Akronymus 3y agoWith traditional css you'd most likely have a class for all the relevant attributes. <style> .someClass { display: block; color: black; } </style> <div class="someClass">...</div>
- matheusmoreira 3y agoOf course. That's how I learned CSS and how I wrote the CSS for my site. Apparently that's not how things are done these days. People have one class for every property and value combination now and essentially write the entire class inside the class="..." attribute. Can't understand why.
- culi 3y agoLike I said. It's not at all the same thing. Inline styles have different behavior from class-based styling