Live data from Hacker News

Konsta UI – Mobile UI Components Built with TailwindCSS

konstaui.com

91–100 of 243 posts

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#91
post #88

Earlier quoted context omitted.

> on Tailwind and not KonstaUI despite topic being KonstaUI Eh, when the heading prominently mentions TailwindCSS, I’d say the topic is very much about that choice. If it were a minor implementation detail, it would be different.

So what you're saying is that it's important to talk about the _tool_ used to build the look and feel of project being under discussion, not the project itself? And you managed to get all of that from the title. Interesting.

No, I’m not saying that.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#92

What is it about everyone using Tailwind? It inevitably becomes a mess in every codebase I've used it in; it's like Perl, a write only language. I just use Vanilla Extract (with their Sprinkles API) and call it a day, it uses TypeScript as the preprocessor language and then compiles it to raw CSS, similar to SCSS but without writing SCSS. https://vanilla-extract.style

I’ve used Tailwind successfully on several large codebases. It’s the only approach to CSS I’ve used that didn’t make me hate styling HTML.

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.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#93

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.

> And have you had to work on hundreds of components that you had to refactor before? It's a write only language.

Once you know the syntax of Tailwind you can jump into any codebase and instantly know what’s going on. With “standard” CSS you’re forever jumping between components and class definitions.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#94

Earlier quoted context omitted.

I don't write CSS (normally) and yet I understand every single statement, and can easily find which statement I'd need to change for a given. It's that simple. You could argue "well you should learn CSS!" but at the end of the day, I don't need CSS often enough to want to bother. Frameworks like TailwindCSS have been great for people like me. - Also you went and dug into its guts to find the implementation details, t…

Also, you can find a lot of Tailwind templates/components and they just work. You don't have to worry about a snippet clashing with or overwriting some other CSS you have like you would with plain HTML/CSS snippets. Sure, HTML looks uglier when I add a dozen classes to an element instead of adding one class with a dozen of CSS rules, but I'm more than willing to accept that as a compromise. Overall, Tailwind made fro…

I find that some people are upset by the "democratization" aspect of this honestly.

It usually comes out as commentary along the lines of "well what's so hard about learning when to use !important?", "that tells me your CSS is poorly organized"... or sometimes just a drive-by downvote

In my experience that comes from a misguided idea that people who jump at it are somehow uncurious, or irresponsible, for "wanting the sausage without learning how it's made" and not caring anything at all about the craft.

-

I don't know if it occurs to them that there are some of us who have our hands in so many pies that, regardless of will or want, there is simply no more time for more pies:

The last time I picked up CSS, it was to write a static page to serve as a control interface for firmware I wrote for an MCU, for accessing an API engine I had just written for said MCU, embedded in a circuit design I had created and hand assembled, which was in turn embedded in a stepper actuated 3d printed assembly I had designed and printed. And all that was in a weekend: the last thing on earth I had time for at the end of it was figuring out what the idiomatic CSS way to style some buttons was...

The fact is, I get it: I am able to appreciate craft, and I understand how so casually throwing best practices to the wind "because it's easy" could come across as offensive. But at the end of the day, sometimes it really doesn't matter how the sausage gets made as long as it gets made.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#95
post #93

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.

> And have you had to work on hundreds of components that you had to refactor before? It's a write only language. Once you know the syntax of Tailwind you can jump into any codebase and instantly know what’s going on. With “standard” CSS you’re forever jumping between components and class definitions.

Once you know the syntax of CSS properties you can jump into any codebase and instantly know what’s going on. With Tailwind you’re forever jumping between components and figuring out what that one long line of class names is actually doing.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#96
post #75
post #40

Earlier quoted context omitted.

Tailwind (CSS) doesn't need a javascript runtime, the browser can run it natively

You can write CSS-in-JS style without a runtime https://vanilla-extract.style/ In my opinion, this gives you all of the supposed benefits of Tailwind without all of the noise and annoying opinions that come with Tailwind

Their Sprinkles API is beautiful for keeping a design system and code in sync, so much that Tailwind users had to copy it with the CVA library.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#97
post #93

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. Once you know the syntax of Tailwind you can jump into any codebase and instantly know what’s going on. With “standard” CSS you’re forever jumping between components and class definitions.

Once you know the syntax of CSS properties you can jump into any codebase and instantly know what’s going on. With Tailwind you’re forever jumping between components and figuring out what that one long line of class names is actually doing.

Yeah, Tailwind feels like Bash for CSS: save a few keystrokes here and there, at the cost of readability.

The problem is, everybody already knows Bash. Tailwind? Not so much.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#98
post #52

Earlier quoted context omitted.

If you compare a given snapshot of code containing utility css vs well defined CSS, then yes, it looks worst. 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. Utility CSS contain redundancies (on the HTML side of things), but the rule of dumb is that you shouldn't refactor redundancies until you are absolutely sure what the un…

> 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…

What you describe is not representative of how CSS is maintained in most companies. You always end up in a situation where it's impossible to track down what styles affect what elements so you start overriding and duplicating because you're afraid to touch existing CSS.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#99

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

No, the components come with specific JS behaviours, and the documentation has the Tailwind classes you need to add separately (which means it's still modifiable if necessary).
Post reply on HN