8 ms·
Tailwind is the second best thing ever happend to frontend, only Vue 3 tops it. Not having to come up with names for CSS classes, no duplicated CSS code, no fi
by kingofthehill98 3y ago
Tailwind is the second best thing ever happend to frontend, only Vue 3 tops it.
Not having to come up with names for CSS classes, no duplicated CSS code, no fighting conflicting classes, everything in one file, being able to visualize a component just by reading the code... it's a godsend. I'll never go back to SCSS unless work obliges me.
Vue 3 with <script setup lang="ts">, TailwindCSS and Vite. The way God intended.
- RexFactorem 3y ago[dead]
- balls187 3y agoHave you tried Svelte?
- kingofthehill98 3y agoI have, it's just as good if not a tad better, but I'm so comfortable and productive with Vue and they're so similar that it's just not worth switching. I'm also very familiar with the Vue ecosystem, so anytime I need a library or plugin I know exactly what to pull.
- blackbeans 3y agoIt's slightly more convenient, but Vue3 is already great. I like to support an ecosystem and I want a framework to keep existing, making sure I can maintain my projects in the future. That is why I don't jump ship.
- Keyframe 3y agoNothing against you, but I swear Svelte is Rust of frontend tech. Whatever the topic, it always pops up out of nowhere. idiot edit: not React, Rust.
- pcthrowaway 3y agoSvelte pops up out of nowhere because people tend to really love it. Not sure how it's the "React of frontend tech" since React is a competing frontend framework (which is now moving to adopt a Svelte-like compiled approach). I haven't used Vue (any version) so this wouldn't be the place I'd normally chime in about Svelte. People seem to love Vue as well.
- Keyframe 3y agoI'm an idiot. I meant Rust :) Where people are enamored with tech enough to evangelize whenever and wherever they can on their own.
- balls187 3y agoThat, but also because you interpreted a question to be a form of generalization. The great thing about HN is you can easily see a users comments.
- pcthrowaway 3y agoInteresting take. I get why people writing a certain class of programs love Rust, but I can assure you Svelte doesn't do much to ensure correctness of the front-end app. It's just way more ergonomic than React for the vast majority of small to mid-size projects, and probably large projects too. Rust is also about 100X as difficult to learn as Svelte (assuming you have basic familiarity with front-end dev), and easier to learn than React as well. Speaking from personal experience.
- cqqxo4zV46cp 3y agoYou are discussing attributes of Rust that GP did not intend to compare with Vue. They are talking about the evangelistic user base.
- fngjdflmdflg 3y ago>which is now moving to adopt a Svelte-like compiled approach Interesting. Is there a page where I can read more about this and the current progress?
- h4ch1 3y agoGod then came forth yet again and blest us with Svelte. The devil then appeared and introduced runes
- diggan 3y agoMaybe we should start to treat this like the yearly hardware releases? Buy one generation, skip the next, buy the next... So if you're on the vue-wagon, skip svelte and wait until the next "The way God intended". If you're on svelte now, skip the next "The way God intended" and then after that, jump on the new wagon.
- kingofthehill98 3y agoThat was kind of my story lol I was heavily into full-stack SSR frameworks + jQuery, then Angular and React came along and I was like "oh heaven, is this were we headed?", ignored both of those for years and finally found peace in the sacred words of Evan You.
- deleted 3y ago[deleted]
- the__alchemist 3y agoTypescript + direct DOM manipulation + HTML + CSS 4 lyfe! Fight me. Helper functions like createEl(tag, attributes, style, text) help...
- diggan 3y agoTypeScript is my "skip X" phase, I'll wait for the next compile-to-js language which better be a dynamic one again. Hopefully something in the lisp direction instead of the opposite like TypeScript. JavaScript deserves to be free of its shackles.
- Volundr 3y agoClojureScript has entered the chat...
- ehutch79 3y agoComing up with css class names is not hard. And if you're that creatively inhibited to not come up with the class name 'pricing-card' for cards in the pricing table, there's crutches like BEM ( https://getbem.com/introduction/ https://getbem.com/introduction/ )
- kingofthehill98 3y agoIt's not exactly easy either. In the end I'll be writing <PricingCard :price="product.price" /> anyway. All that Tailwind garbage will be nicely hidden inside the component.
- ehutch79 3y agoThat's fine. Saying it's redundant is 100% valid. That's not what the OP said. Saying it's because naming a class is hard is BS.
- Yiin 3y agoA great read on the topic: https://adamwathan.me/css-utility-classes-and-separation-of-concerns/ https://adamwathan.me/css-utility-classes-and-separation-of-...
- isleyaardvark 3y agoI need to bookmark that link, it's perfect.
- AlchemistCamp 3y agoBEM was great, for the early to mid 2010s. Utility classes have still been a big productivity win for me. Working on an app with a great deal of technical debt last year, moving to Tailwind made a world of difference in being able to restyle components without also breaking styles on distant parts of the app that nobody on the team realized were relying on the same styles.
- 3y ago
- gedy 3y agoIn all fairness you are comparing a framework vs no framework. I'd for sure take TW over nothing, but there are other frameworks too.
- Blaiz0r 3y agoHas Hackernews really devolved into this dogmatic nonsense?
- Aerbil313 3y agoYep. I like Tailwind, one can list the benefits and say he likes it but GP's comment surely could be less full of zealotry.
- troyvit 3y agoThe first time I saw tailwind I almost threw up in my mouth because it broke so much I hold dear about CSS. A few weeks later I went to their site being all wtf is going on here, and I saw this quote on the front page from its creator: > If you can suppress the urge to retch long enough to give it a chance, I really think you’ll wonder how you ever worked with CSS any other way. Now I'm going to try it.
- aaronbrethorst 3y agoI hated Tailwind for the first week I used it, and couldn’t imagine working without it by week two.
- drivingmenuts 3y agoI’ve tried it - I’m just too used to working with Bootstrap.
- 0xblinq 3y agoThey're different things IMHO. Bootstrap gives you a pre-made look and feel that you can use despite knowing CSS or not and maybe you can customize a bit, make a theme, etc. Bootstrap is more like "Tailwind UI" which is different thing from Tailwind (the tool). To use plain Tailwind (without Tailwind UI) you do need to know CSS. It's just like a "CSS-in-JS" tool, except it's "CSS-in-HTML" this time.
- corytheboyd 3y agoPlease do try it, it really does speed things up if you care enough to learn it. IDE integration is a must. A lot of people seem to try it for five minutes, then conclude with absolute certainty that “this sucks” which is very annoying. If you like building good web views fast but don’t care enough to learn the massive core of css (or some hot new js-to-css-or-whatever tool) then tailwindcss is perfect. I build web views every now and then, but it’s not interesting to me, I want to rabbit hole on the real issues, which usually reside elsewhere. Also, I learned it years ago, and that knowledge is still useful, can’t say that about most web tech :)
- Rapzid 3y ago> Not having to come up with names for CSS classes As soon as you want theming you'll need to start naming stuff. And if you want that theming to support third-party CSS overrides, or need good CSS selector support, you're going to be back to needing to name classes again. Not everyone needs that, and that's fine. But there are plenty of people working on products and in environments where the Tailwind way is not going to be the path of least friction. I would actually say StoryBook, or the StoryBook pattern at least, has been a much greater boon on FE development over the last decade.
- braden-lk 3y agoA nice thing about tw is you can set your colors, paddings, etc, to resolve to CSS variables. That + some tweaks to the tailwind config, you get a nice themeable setup that doesn’t deviate too far from vanilla tailwind, imo.
- gedy 3y agoSomewhat - but when your theme change does things like "buttons are now green outlined rectangles instead of blue filled rounded corners", Tailwind shows its weaknesses. DaisyUI on top of Tailwind helps, but then you may as well use Bootstrap and get better component support.
- petre 3y agoToo bad the buttons come out with transparent background. I gave up and used boostrap 5, since I had to actually get work done instead of reading github issues.
- cqqxo4zV46cp 3y agoWhat? It doesn’t sound like you actually looked at the premise of Tailwind in the first place. It does not come with pre-canned components. This is clearly user error.
- petre 3y agoSure. The "solution" is to disable preflight or override its styles. Also, this happened on a from scratch codebase without any funny css. https://github.com/tailwindlabs/tailwindcss/issues/6602 https://github.com/tailwindlabs/tailwindcss/issues/6602