Live data from Hacker News

Konsta UI – Mobile UI Components Built with TailwindCSS

konstaui.com

181–190 of 243 posts

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#181
post #98
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…

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.

Svelte, which is fairly mainstream these days looking at state of js, scopes your styles to the component.

So global styles are very rare and usually a bunch of branding variables these days.

Like a lot of bad solutions in tech, tailwind seems to exist as a workaround to the core issue of ‘still using react’.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#182

I originally thought it was something like DaisyUI but for React Native with NativeWind, but this seems quite different, and almost a little strange haha. I'm very impressed by the polish of the project but am curious about the main use case for a library like this. (I guess, in what situation would one want a webpage to feel like a system native app? Potentially this paves the way for PWAs?)

Maybe to simplify creating cross-platform apps by just wrapping a webview of something implemented with this.

High chance to got rejected by Apple

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#183
post #170

Earlier quoted context omitted.

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.

The difference here is that we're not trying to force you to use Tailwind. You asked "What is it about everyone using Tailwind?" and we responded, but you refuse to accept our answers and keep arguing that we're uninformed and wrong for using something we love.

Your copy pasting analogy makes no sense because "syntax highlighting" was referring to you trying to convince me to stop using something I can't live without and had nothing to do with Tailwind. Anyway, nothing wrong with copy pasting code and avoid premature abstractions until they are needed. Being religious about DRY and trying to shoehorn subsequent iterations of similar code into an inflexible abstraction leads to unmaintainable monstrosities.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#184

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

> a write only language

This is exactly the situation Tailwind prevents.

Unless your team has incredible discipline, CSS across a large system very often becomes a tangled mess where you can’t change one thing without unintentionally affecting another.

When you change the Tailwind classes on an element, you know there’s no risk of subtly breaking something somewhere else.

Don’t conflate “visually busy” with “unmaintainable”.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#185

Earlier quoted context omitted.

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

I’m fine with a find and replace at build time with xl:text-bold xl:p-4 for that very reason, that would be my expectation.

Yes you can make utility classes for typography styles..that’s entirely the point of extending the framework, they are extremely clear that you should even. None of this precludes the idea that it is configurable to the point of making it a better solution for one’s needs.

Personally the vanilla extract example looks like literal boilerplate hell for any sort of actually complex application. It might make complete sense if the whole thing was based on a declarative template where the objects also define elements but here it is just SCSS done elsewhere.

The reason why people like Tailwind at build time is that it removes a step of defining classes out of the flow and puts all your styles in one place. That is the innovation: mental, not technical. I have a pet theory that Tailwind is more preferred by those with ADHD as it completely removes a mental blocker element.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#186
post #80

On the tailwind argument I don't really feel like ever going back in spending a good 2 minutes coming up with a non conflicting yet descriptive class name only to end not using it at all cause I decided to implement the requirement in a different way. Not to mention the relief from the constant css/html context switch you undergo indefinitely. I can't really comment on how it scales in big projects tho.

I always find the criticism of localised styles and so-called separation-of-concerns violations amusing, given that the vast majority of user interface APIs to have ever existed have you set the styles directly on the elements.

I think there’s maybe a few desktop UI APIs that use a similar approach to CSS, but having a separate declarative style sheet is almost unique to the web in the grand scheme of things.

I guess it’s mostly people with a document-first mindset to stuff on the web, but I don’t think CSS is a good way to style application UIs.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#187
post #80

On the tailwind argument I don't really feel like ever going back in spending a good 2 minutes coming up with a non conflicting yet descriptive class name only to end not using it at all cause I decided to implement the requirement in a different way. Not to mention the relief from the constant css/html context switch you undergo indefinitely. I can't really comment on how it scales in big projects tho.

This. And for big projects it comes with the advantage of locking everyone into the tailwind.config. Everything has tradeoffs.

But to me, removing the context switch is like an ADHD cheat code. I’ve grown to enjoy the ability to look at one block and know exactly what it looks like as well. There’s no key value search to know why some bit of text is red for example.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#188
There's two distinct camps talking past each other:

- Devs who make relatively small e-commerce-type websites, who loves tailwind, bootstrap, etc. Good defaults, fast throughput, maintenance is less important

- Devs who make relatively big web apps, who hates them. Everything ends up customized one way or another, maintenance is most of the work, tailwind and bootstrap end up only getting in the way.

The problem here is that this distinction is seldom make explicit, and here we are.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#189

There's two distinct camps talking past each other: - Devs who make relatively small e-commerce-type websites, who loves tailwind, bootstrap, etc. Good defaults, fast throughput, maintenance is less important - Devs who make relatively big web apps, who hates them. Everything ends up customized one way or another, maintenance is most of the work, tailwind and bootstrap end up only getting in the way. The problem here…

Problem is tailwind is not hard to maintain. I would argue it's easier. Folks look at it and it looks like a nightmare (the documentation even says so) but you have to actually give it a fair shake. I can always jump back into a tailwind codebase and not only do I know what mr-4 does I know where it is when looking at the rendered component.

You find yourself having to do "Right click > inspect" a whole lot less often to figure out what's going on

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#190

Earlier quoted context omitted.

[flagged]

Using it wrong on every codebase that wasn't even made by me but instead by my employers? If it's happening that many times, the tool is to blame. More likely that the people who use it and like it (for now) have never have to handle large amounts of components and refactoring them. It's basically impossible. Trends come and go, who's to say that in a few years we decide, like jQuery, that hey, maybe this utility fir…

> Using it wrong on every codebase that wasn't even made by me but instead by my employers? If it's happening that many times, the tool is to blame.

You could say that about chainsaws lopping off arms. Perhaps the user is not sufficiently competent to use the tool correctly…

Post reply on HN