Live data from Hacker News

Coming to Terms with Tailwind

johanronsse.be

51–60 of 117 posts

Re: Coming to Terms with Tailwind

#51
post #4

Earlier quoted context omitted.

Have you tried it? I don't know what you mean by "sign of dementia", but I find the approach taken by tailwind makes me a lot more successful in applying designs. Doesn't feel like dementia to me.

Yes I did, that's why I'm of that opinion. What it does is force you, as other frameworks, to learn all its intricacies, design decisions, use an heavy and complex development environment (that besides that reads files it doesn't have anything to go about reading?) so that you don't need to learn the underlying language. Then it nudges you to write a soup of classes (that you need to learn, and need to learn the conf…

> What it does is force you, as other frameworks, to learn all its intricacies, design decisions, use an heavy and complex development environment (that besides that reads files it doesn't have anything to go about reading?) so that you don't need to learn the underlying language.

The Tailwind dev environment is literally one Javascript file with a few settings. Not that complex. Tailwind is worthless if you don't know CSS, so I'm not sure that second point works either.

> Then it nudges you to write a soup of classes (that you need to learn...

Is that bad? Not using Tailwind forces you to have a separate stylesheet that hides tag to property relationships, among other hidden abstractions. The class names barely need to be learned. With an IDE, you get class name completion, and there are only a few properties that have unexpected names.

> yes you can write classes that coalesce your styling... but that's kinda the point of CSS and/or any other pre-processor

What do you mean "the point of CSS"? Read the spec. It says nothing about the number of properties a class should contain.

> and forget about semantically marking your html.

Tailwind's reset styles mean you can use whatever "semantic" HTML5 elements you want. If you mean classnames should be higher level abstractions than CSS properties, well, that's a convention that developed during the CSS Zen Garden days. Before that we used HTML attributes for styling. Conventions come and go.

Re: Coming to Terms with Tailwind

#52
post #27

Earlier quoted context omitted.

I was just using my other Twitter accounts to stay up to date, it's not a big deal. I just genuinely wonder if blocking people that don't agree with you is a good strategy. I guess over time things also changed, Tailwind 2y ago was not the same as Tailwind now. They hired a bigger team and became much more of a company.

There’s a difference between disagreeing and being an ass. If you wanted to engage with them then try to have a conversation. All you did was say how terrible it was and not to use it. Big difference. Nobody owes you their attention.

Twitter blocking is not about owing attention, a Twitter block prevents the blockee from seeing your tweets. The company is basically punishing Wolf for their critical tweet.

No one is owed anyone in this scenario, but it's just crappy behaviour from Tailwind. They probably are just tired from the negativity, I mean just look at their site the framework does look terrible, they even admit to this with this quote on their site front and center:

"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."

Even though the code is offensive to the senses, it apparently works really well. Judging from the adoption and the beautifully designed UI's they are showcasing people do recognise its usefulness.

Re: Coming to Terms with Tailwind

#53

One sentence in the article suggested that, ideally, people making websites would just learn CSS , but since that‘s an unrealistic expectation (why?), Tailwind can be useful if you have big team of “front-end engineers” who don’t quite understand the markup languages that they use in their jobs. I can’t argue with that. But it suggests that if you work alone or in a small group, actually learning CSS might make more…

Are people using tailwind without knowing css?

Apparently. This is how I interpreted this passage in the article:

“I can forever claim that people should just learn CSS but if that happens to be a difficult thing, maybe we should try to make a deliverable that is more… malleable.”

I could have misinterpreted that, however; I found much of the writing confusing.

Re: Coming to Terms with Tailwind

#54
post #24

Not liking React, and Tailwind, is a bit like saying 'I don't like Netty/Sprint Boot, I'll write my own web server'. css (and javascript/webasm) are the lowest levels in web development, of course people are going to build on top of them. Building a design system on top of css is not a surprising outcome. It's not different to building a library on top of a language. The only problem I have with tailwind is that it r…

How is saying "I don't like tailwind" leading to "I'll write my own webserver"? If tailwind was, magically, the only alternative to hand-rolling everything, perhaps, maybe, but it's not.

My analogy, which seems to be a poor one judging by the downvotes, is that css is lowest level you can get for layout in browser, so it's inevitable that someone will write something of a higher abstraction to simplify it's usage (discoverable with limited class names), give it a particular purpose (consistent scales), and make it reusable. This is exactly what a library (webserver) is written on top of a language of your choice (java).

It's not unreasonable to expect someone to take a similar approach to tailwind and write a similar thing that targets something even more specific such as animations.

Re: Coming to Terms with Tailwind

#55

The underlying problem I see that Tailwind solves is component-izing a single idea. And that it doesn't get in the way with opinions like Bootstrap, et al. It does that pretty well. You can point to a single stack of code and say "this one thing is a navbar" and it's easy to know where to make changes. No searching, no stress. What I haven't seen Tailwind do well on my projects is respond to change in the same way ot…

> I'm curious if there are Tailwind users out there that could teach me if Tailwind solves other problems I'm not seeing.

I'm building a RAD platform (I hate the term low code) and just pushed through Tailwind as the only method for styling apps and banned custom CSS.

The primary value Tailwind provides is a reasonably well considered design system. I believe CSS' primary weakness is the general inability to define cross-cutting abstractions. I think of the style of an object as a composition of concerns: spacing, position, size, typography, color, decoration, etc. Programming languages have interfaces or traits or protocols to handle this sort of thing but there's no equivalent in CSS. The addition of CSS variables provides limited ability to do this like you can set up a primary color and use that everywhere but CSS variables alone don't let you set up type or spacing scales. I realized this in 2009 and switched over to defining these abstractions as sass mixins that basically boil down @apply with Tailwind utilities where my mixins were the first part of the utility name and the argument(s) the last part. Having a design system simplifies the job of both the designers and developers. There's no guessing on whether it's a 5px or 6px margin, it's a `margin(2)`. Further, if you pick cooperating scales, the page tends to fall into a vertical rhythm, which is tough to do ad-hoc.

Tailwind is an improvement over my self-designed sass mixins mostly because it has more effort behind it and enough people banging on it that it's been expanded to cover a majority of the CSS you need to implement apps. I add a set of CSS-variable based color names to handle theming (`pri` for primary, `sec` for secondary, `ter` for teritary, and `acc` for accent, with `-dark` and `-light` variations) and allow custom utilities for the project. The latter provides an unsupported escape hatch but is enough friction that I'm hoping people won't abuse it excessively.

For my specific use case there are other benefits:

* No specificity issues

* Having to come up with a name for elements is a significant source of friction in a graphical interface

* Naming CSS classes well requires some concept of the overall system and how the element being targeted fits into it. I do not expect my users to have this knowledge.

* I only allow modification of specific points in a component that have a data- attribute containing component-unique names. This will allow me to change the underlying markup and have a fighting chance at successfully migrating custom styles.

* By breaking the link between styling intent and page structure I have the potential to translate apps into non-browser programming environments.

I find Tailwind markup to be quite ugly and think it doesn't have as much advantage in other situations but it fits my specific problem well.

Re: Coming to Terms with Tailwind

#56

One sentence in the article suggested that, ideally, people making websites would just learn CSS , but since that‘s an unrealistic expectation (why?), Tailwind can be useful if you have big team of “front-end engineers” who don’t quite understand the markup languages that they use in their jobs. I can’t argue with that. But it suggests that if you work alone or in a small group, actually learning CSS might make more…

Are people using tailwind without knowing css?

Yes. I've most commonly seen it used for exactly that purpose – people who have no interest in knowing CSS but need to style something.

I think this is probably one of the most common sources of complaints. Some people who already know CSS in-depth will see Tailwind being endorsed by others, take a look themselves, and come to the conclusion "why on earth would I ever use this".

I totally understand that, because it's how I feel. But it's important to remember that people still want to style things without being CSS experts, and one of the things Tailwind is good at is letting that happen. It clearly fills a need and yelling at the proverbial clouds isn't going to help.

Re: Coming to Terms with Tailwind

#58
post #41

Earlier quoted context omitted.

Those tweets are not just disagreeing.

He just disagrees if using tailwind is a good idea. Where is the problem that justifies blocking?

> Where is the problem that justifies blocking?

You can block anyone on social media for any reason or no reason at all and you don’t have to justify it to anyone.

Re: Coming to Terms with Tailwind

#59

Earlier quoted context omitted.

This is the thing, not all projects are super giant web applications being maintained by hundreds of front-end developers. For a dummy like me who curses at the laptop every time he needs to center a div and whose style sense pretty limited, tools like tailwind are a bless. I do a small library of components, copy what people who knows more than me does (taking examples from here https://tailwindcomponents.com/ ) ada…

I personally wouldn't trust a person who can center a div on the first try - something isn't right with them! What makes me concerned with tailwind is that its yet another API to remember. Why would I pick it over material UI with some theming or chakraUI? Why Did you pick tailwind over material or chakra?

And I wouldnt trust a person who cannot detect exaggeration for effect. It indicates severe lacking of understanding social clues.

Re: Coming to Terms with Tailwind

#60
post #4

Earlier quoted context omitted.

Have you tried it? I don't know what you mean by "sign of dementia", but I find the approach taken by tailwind makes me a lot more successful in applying designs. Doesn't feel like dementia to me.

Yes I did, that's why I'm of that opinion. What it does is force you, as other frameworks, to learn all its intricacies, design decisions, use an heavy and complex development environment (that besides that reads files it doesn't have anything to go about reading?) so that you don't need to learn the underlying language. Then it nudges you to write a soup of classes (that you need to learn, and need to learn the conf…

It also eliminates the possibility of using a regular preprocessor.

Using the Tailwind-defined values for font sizing, spacing and colors in SCSS is trivial.

This, combined with ITCSS and BEM becomes a huge time saver, especially if your browser-base allows for the use of CSS Grid.

Naming components is the only overhead but with a clear naming and file structure is not really an issue.

So far, writing SCSS, and much less of it (because of ITCSS), is a benefit—compared to learning a proprietary framework aiming to replace CSS at a similar enough abstraction level.

Post reply on HN