4 ms·
Well, the last guy I've seen to use tailwand applied 15+ CSS classes to a div for styling. I don't know how he did it without AI, as the applied classes were no
by chrisandchris 3y ago
Well, the last guy I've seen to use tailwand applied 15+ CSS classes to a div for styling. I don't know how he did it without AI, as the applied classes were not describing in any way IMHO.
probably AI solves that for you, by generating another 50 classes and applying even more to your n levels of nested divs.
- ametrau 3y agoPhew, so glad we’re not using stylesheets.
- digging 3y agoSurely I'm not the only one who finds tailwind insanely easy to use, but I see so many people bashing it every day it baffles me. Who cares if a div has 15 classes? When writing React, I spend pretty minimal effort creating, debugging, or modifying TW classes, especially when using `classNames` so I can break them into logical chunks. The hardest part is... oh, I get it. The hardest part is when other people do a shit job of organizing their classes and I have to dig through them. But an LLM isn't going to solve that problem, only an actual, intelligent algorithm to standardize class arrangement would help, like prettier for tailwind classes.
- otherme123 3y agoI tried, but it's not for me. I found myself proud of styling a button, before noticing that I spent an hour. A lot of classes are almost plain Css attributes, so you just ask yourself "why am I doing this instead of writting the Css myself, like in the old days?" It's a tell that people is making money by creating a new Bootstrap on top of Tailwind, and calling it "components". Or AI assistants. That said, if you enjoy Tailwind, good for you!
- satvikpendem 3y ago> Surely I'm not the only one who finds tailwind insanely easy to use It's a write-only DSL for CSS, easy to write but hard to then read and edit afterwards, which is a problem that you're blaming on a skill issue while it's a problem inherent to Tailwind's philosophy itself. Just use CSS Modules at that point.
- mcpar-land 3y agoI never understood this sentiment. Once you get past a dozen or two dozen classes being used all over your codebase, CSS becomes the write-only language to me. I don't know where this class is being used, so I won't edit it. With tailwind, I can see every style and I know exactly where it's going to be applied (to the element it's on). I find it much easier to read.
- digging 3y agoFor sure, but they're talking about CSS modules, where styles are isolated to components at build time. CSS modules are critical in a large web app for those rare styles you can't accomplish with Tailwind, but for the vast majority of styles I do not want to be hand-writing them. Plus, unless you're extremely strict about using CSS modules, you don't escape the horror of styles being inherited from global classes - on the other hand, a robust library of utility classes like Tailwind makes "inline" styling so easy you're likely to end up with almost no hand-written CSS anywhere.
- digging 2y ago> blaming on a skill issue No I'm not, I'm blaming it on the lack of organizational framework. I expect people to leave a mess if there's no guideline; there are more ways to do a thing wrong than to do it right. > hard to then read and edit afterwards No, that's what I'm saying. It's quite easy to read and edit - when organized. Maybe I'm the first person to invent conceptual organization of utility classes?? In which case I ought to just make a plugin for it. Also, Tailwind has first-class support for grouping utility classes, such that `.button` can apply 15 different styles at once if that's your preference. So, you know, the exact same as regular CSS.
- timeon 3y ago> Who cares if a div has 15 classes? Even if bottleneck are images, I still care about bloat on mobile internet.
- thr33 3y ago(seemingly few) People bash it because its just writing regular css but objectively worse and incorrect. if you can write tw you can write css. if you can write css theres no valid reason to write tw.
- digging 2y agoHuh, all of those statements are incorrect.
- victorbjorklund 3y agoIt isnt harder than applying one class where you set 15 different things. Only difference is you dont need to spend time naming stuff and you dont need to click to another file to see the styling applied.
- mcluck 3y agoThere's a massive pile of options for writing styles in the same file as the JS. Naming stuff isn't hard when you use CSS modules. Learning and memorizing the Tailwind DSL takes just as much time as it takes to learn basic CSS. Do what you want but I honestly don't understand why anyone who already knows how to write CSS would use Tailwind