Live data from Hacker News

Tailwind CSS v3.0

tailwindcss.com

41–50 of 448 posts

Re: Tailwind CSS v3.0

#41

Since I learned to write semantic class names, and to compose using scss or react components, Tailwind feels like it would be a big step back. I get that it would be kind of nice to prototype in, but is anybody here using it for complex apps or UIs?

On the contrary, semantic classnames feel like an enormous drag to me.

Components are a better way to segment semantic pieces of layout. Styling is lower level and having to name each atom of it is an enormous PITA.

Re: Tailwind CSS v3.0

#42

Great! but the docs are on the offensive side: - "Yes, send me all your stupid updates" - "The new print modifier lets you style how your site should look when animals (in strikethrough) people print it."

When did playful become offensive?

Re: Tailwind CSS v3.0

#43

Looks fantastic. My only concern using this in a full React project is its lack of interoperability with standard libraries. It seems like for the best experience, you either buy Tailwind UI to use with a tailwind project for anything except the most basic UIs, reimplement the Tailwind UI components yourself, or have a weird mix of css-in-js and Tailwind CSS. Although I love the idea of HTML-native inputs all the way…

These days don't most popular React UI frameworks support passing classes to all the HTML elements they render?

They do based on what I've seen, you're right. I'm speaking more to the consistency of styling across the project, but if the UI library is separated out from the rest of the project then it shouldn't actually be a concern to compose the components with tailwind-styled elements.

Thanks for helping me think through it further!

Re: Tailwind CSS v3.0

#44

I used to use Zurb Foundation or Bootstrap for my personal projects but I found these two frameworks required me to use their javascript and their JS does not play nice always. So I moved to Bulma and that has served me well so far. I like not having to worry about CSS (it drives me nuts) and I would like to just focus on building components and functionality. Is TailwindUI an alternate to Bulma ?

Bulma operates at a bit higher level of abstraction than tailwind.

Re: Tailwind CSS v3.0

#46
post #36

Tailwind made it possible for me (backend developer) to write somewhat maintainable frontend code. It’s a joy to use both as a writer and reader.

Speaking as a non-cargo culting developer, Tailwind is evil. It doesn’t understand CSS nor the document hierarchy it depends on, and almost every project that has had a frontend developer touch it has turned into an unmaintainable mess.

Not to mention the tooling overhead. I had to revert countless JSP files due to strange compilation bugs that resulted in classes only sometimes(?) being added.

Re: Tailwind CSS v3.0

#47

Before you ask, as it happens in every Tailwind post, what is the point of this when CSS "promotes" reuse and separation of concerns, have a look at @ 5e92cb50239222b comment: https://news.ycombinator.com/item?id=29501650 And let me repeat what every Tailwind fanboy (like me) states every time this project is on HN: don't knock it till you've tried it. Look at the animated example in the front page. You'll never be a…

Nobody said that it’s a bad experience to use. People say that it’s evil . And, also, that it is made by and for the JS crowd that doesn’t understand CSS nor the document hierarchy it depends on, while simultaneously considering it unworthy of any learning efforts since it’s a girly making-it-pretty addition to a markup language, not a real professional STEM-grad-grade programming language.

As much fondness as I have for the pure separation-of-concerns CSS Zen Garden style, I have to admit I've yet to actually see it leveraged on a real project. In 20 years of working on the Web. I'm not sure I've ever seen a significant re-working of CSS to re-theme a site without also changing the markup substantially.

In practice, maybe coupling the two doesn't actually do much harm, provided consistency of approach is maintained and it doesn't go quite as far as inlining CSS all over the place.

Re: Tailwind CSS v3.0

#48
post #36

Tailwind made it possible for me (backend developer) to write somewhat maintainable frontend code. It’s a joy to use both as a writer and reader.

Speaking as a non-cargo culting developer, Tailwind is evil. It doesn’t understand CSS nor the document hierarchy it depends on, and almost every project that has had a frontend developer touch it has turned into an unmaintainable mess. Not to mention the tooling overhead. I had to revert countless JSP files due to strange compilation bugs that resulted in classes only sometimes(?) being added.

> Speaking as a non-cargo culting developer

Remember the HN comment guidelines?

> Be kind. Don't be snarky. Have curious conversation; don't cross-examine. Please don't fulminate. Please don't sneer, including at the rest of the community.

https://news.ycombinator.com/newsguidelines.html

Re: Tailwind CSS v3.0

#49

Great! but the docs are on the offensive side: - "Yes, send me all your stupid updates" - "The new print modifier lets you style how your site should look when animals (in strikethrough) people print it."

Well it's not like they're expecting people to pay for...oh $279 for the UI kit eh?

Re: Tailwind CSS v3.0

#50
I used the JIT version recently on a new landing page with code completion for class names in my IDE and found it great. The distance between what I'm picturing in my head and what I have to type to see that on the screen felt so much shorter and less fatiguing than the standard CSS approach.

With the regular way, to style something that's probably not going to appear elsewhere, I'm having to: come up with class names, annotate the HTML with them, repeat some of this annotating in a CSS file, jump back and forth between files to tweak the styles, use the web inspector to figure out which CSS class is overriding another then jump to the right CSS file to fix it etc.

Tailwind classes are also faster to type and flip between when you're experimenting (e.g. editing "mt-5" to "pb-3" vs "margin-top: 4.25em" to "padding-bottom: 2.75em") and you get less distracted because it has sensible defaults and helpful guardrails (you rarely need all the possible attributes and range of parameter values CSS has available).

I also rarely had the super irritating and common CSS scenario where you edit a style and it doesn't change and you have to go investigate to find out why e.g. something is overriding something, your selector is wrong, and even after all that maybe you undo the edit because it doesn't look good. Plus you no longer have the fear that tweaking a shared class to going to break some completely different page.

I feel that beyond some building blocks, trying to create reusable CSS classes with cascading styles has similarities to using excessive abstraction and deep OOP class hierarchies in regular programming languages to avoid a little duplication.

I also don't have a problem with styling stuff appearing in my HTML files either as long as the right HTML tags are used around the data. HTML files are already full of class annotations and divs that are only there for styling yet this doesn't cause a problem to e.g. browsers, screen readers or crawlers.

Post reply on HN