Live data from Hacker News

Konsta UI – Mobile UI Components Built with TailwindCSS

konstaui.com

171–180 of 243 posts

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#171
post #170

Earlier quoted context omitted.

Funny, to me arguing for Tailwind is like arguing for copy pasting code around instead of using functions and classes, which the Tailwind devs literally tell you to do by the way. I mean, when I saw their official recommendation for maintenance of code and reusing styles was to use multiple cursors , I had to laugh out loud. https://tailwindcss.com/docs/reusing-styles

The point is that I will never go back to not using syntax highlight, and I'm sure you understand that it would be futile trying to convince me otherwise. I wouldn't take anyone doing that seriously, and similarly I can't take you seriously. Yes, being able to copypaste self-contained HTML with all styling included and no depedencies is amazing.

That's nice for you. Similarly, I cannot take anything recommending copy pasting code seriously either, and I'm sure you understand that it would be futile trying to convince me otherwise. I wouldn't take anyone doing that seriously, and similarly I can't take you seriously.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#172

Earlier quoted context omitted.

I’ve found what you said to be completely untrue unless you’re totally lazy. If you’re building up a bunch of components, the tailwind classes are mainly within the basic components. In the first example of vanilla extract, it uses exact px measurements which already demonstrates it’s not geared to solve one of the primary selling points of tailwind (using config as a constraint to reduce mental overhead when buildin…

And have you had to work on hundreds of components that you had to refactor before? It's a write only language. > I’ve found what you said to be completely untrue unless you’re totally lazy. Ah yes, the laziness argument. Let's not blame our tools but ourselves for the tools are always good and righteous. If only those darn C programmers weren't so lazy writing their memory leaks.

To quote you from another thread in this discussion:

> I've often found that people who are in the frontend don't properly learn CSS and just hack it together. That was me too for a long while which is why I hated it. Then I started learning it from first principles and it makes a lot of sense. Now I can build whatever I need in plain CSS classes.

So sometimes people just... misunderstand or use the tool wrong?

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#173

Earlier quoted context omitted.

And have you had to work on hundreds of components that you had to refactor before? It's a write only language. > I’ve found what you said to be completely untrue unless you’re totally lazy. Ah yes, the laziness argument. Let's not blame our tools but ourselves for the tools are always good and righteous. If only those darn C programmers weren't so lazy writing their memory leaks.

To quote you from another thread in this discussion: > I've often found that people who are in the frontend don't properly learn CSS and just hack it together. That was me too for a long while which is why I hated it. Then I started learning it from first principles and it makes a lot of sense. Now I can build whatever I need in plain CSS classes. So sometimes people just... misunderstand or use the tool wrong?

If you look at my later comments, you will see that I don't equivocate all tools.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#174
post #65

Earlier quoted context omitted.

Wait are you now just conceding that your criticism of Tailwind has no merit and could be replaced by a generic "All software is bad" meme?

I am parodying the parent's broad over generalization of tools. Yes, by their logic, they would concede that all software is bad. That doesn't mean some tools aren't better or worse than others. Just because hammers have flaws doesn't mean I'd use a hammer to screw in a nail, even if some do.

That’s not what you said though, better or worse is just moving the goal posts, and it’s of course contextual and relative. And no, by my logic most software is bad, not all, and I would actually say that’s true.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#175

Earlier quoted context omitted.

I work in React so all of our CSS is scoped, at the very least with CSS modules, so we never get to a point where we have global CSS, at all. If you're working on a project that uses global styles, then yes, it will be extremely painful. But in the days of components, Tailwind simply is worse to me from a maintainability perspective than just having scoped CSS. It is at best equal to CSS classes because inevitably th…

And many people don't work in components or scoped CSS. Utility classes help so much in those cases. The only problem with tailwind is it goes super overboard with the idea. You want to use probably 30% of tailwind and use their naming convention. But once people start to write some long on demand single classes its always better just name a class and use CSS. I think its because the authors need to be seem they are…

What I’ve found from our Tailwind codebase is this:

If you have a design system, Tailwind.config can be used to both extend and limit the classes. Notably, we cut all tailwind colors out and only define theme colors. We also define all sizing, shadows, and text styles around our design system. This constrains your design down to only “legal” values. This doesn’t mean every design will be magically right, but it separates the possibility of non-standard values out at the very least and has actually caught bad mocks as well.

I think, to me, tailwind isn’t done and I need one thing: let me group classes with modifiers.

I want xl:[text-bold p-4] instead of xl:text-bold xl:p-4

Ultimately I don’t think tailwind is perfect at all…but no CSS framework is. In fact, I think part of the reason it is a hit is because mixing custom components with both custom css AND bootstrap is a mess as well in the real world. At least Tailwind has a single source of truth.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#176

Earlier quoted context omitted.

It is not. But it's not like you write css like this this when you write tailwind. People use tailwind along CSS. You can write CSS components (written in css) and use them in tailwind and with tailwind. I am heavy tailwind user and when i see this it seems to me like people forgot css exists.

Doesn't seem to be the case in my experience, people use Tailwind only and don't write regular CSS anymore. At least, that's what I've noticed.

Depends on work. If you need lots of bespoke styles then you quickly realize Tailwind only is wrong approach.

For sure there is huge trap in webapp developers who mostly copy paste HTML partials from Tailwind UI who succumb to Tailwind marketing and completely forget CSS.

Developers mostly don't like CSS so not many care. That's why there are so many solutions how to avoid it.

But utility classes (and tailwind as most popular utility classes generator) are super useful even if you are not just copy paste UI guy.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#177

Isn't making a component library antithetical to the way Tailwind is meant to be used?

Not in the slightest, tailwind even have their own UI library. Theirs is unstyled but there's nothing wrong with creating one with default styles.

Tailwind does not have their own UI library as reusable self-contained components. Instead Tailwind UI gives you the source code of these components so you can customize them to your needs. I much prefer that approach to that of pre-baked rigid components

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#178

Earlier quoted context omitted.

And many people don't work in components or scoped CSS. Utility classes help so much in those cases. The only problem with tailwind is it goes super overboard with the idea. You want to use probably 30% of tailwind and use their naming convention. But once people start to write some long on demand single classes its always better just name a class and use CSS. I think its because the authors need to be seem they are…

What I’ve found from our Tailwind codebase is this: If you have a design system, Tailwind.config can be used to both extend and limit the classes. Notably, we cut all tailwind colors out and only define theme colors. We also define all sizing, shadows, and text styles around our design system. This constrains your design down to only “legal” values. This doesn’t mean every design will be magically right, but it separ…

If you look how marketing teams / agencies use tailwind its exactly for it's ability to customize. Utility frameworks in the past (like Tachyons) were not very useful for them because they didn't have the customization. Every project starts with config and many things are turned off. Not only colors but also for example typography is too constrained in TW by default and it's better to make your own utility classes for likes .text-xl (because of media queries).

Your example xl:[text-bold p-4] is performance anti-pattern. Don't forget that main reason utility classes came to be was performance. It's fastest to put class directly on element and you end up with very small css file because you don't repeat. When you start to do xl:[text-bold p-4] you will end eventually write xl:[text-bold p-4 pb-2] or even xl:[p-4 text-bold]. Now you lost one of the main advantages of utility classes and end up in more confusing world than pure css.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#179
post #122

Earlier quoted context omitted.

You can assure me with the might of 1000 exploding suns, but it STILL means nothing. I'm not insinuating that those unknown entities that only you know of are using the tool wrong. I'm literally claiming that they are because being "not really small company" says absolutely nothing about the way their engineers do their job. > If I see the same patterns everywhere "everywhere" is, again, something that exists in your…

Okay, as you tell me there is nothing I can say to convince you of detractors to your opinions, there is no need for me to talk to you further.

I asked for numbers, which you don't have. Had you read what's written, you'd see it. That would convince anyone, and does not require me to trust a random stranger with ego issues.

Self-proclaimed professional like you should not skim text. You miss the point that way.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#180
post #87
post #52

Earlier quoted context omitted.

> The reality is that if the codebase and style code is in flux, that idealized CSS stylesheet will churn towards a being a mess of tech debt. Interesting. That’s not been my experience. People tend to clean up as they go, eg if the design says we now need a thinner padding / gaps or a different colour blue, we change the variable, and if we spot cut and pastes we fix them. It’s certainly much easier to refactor than…

But tailwind also provides a way to change variables? https://tailwindcss.com/docs/customizing-spacing Better yet, it also forces people to use theme spacing sizes or making the use of custom unit very explicit (a [] in your class name)

Tailwind doesn’t force people to do anything more than using regular CSS does. Or any technology - it’s really difficult to change human behaviour with technology.
Post reply on HN