Live data from Hacker News

Konsta UI – Mobile UI Components Built with TailwindCSS

konstaui.com

141–150 of 243 posts

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#141
post #5

I'm trying not to be a hater but really how is this: https://github.com/konstaui/konsta/blob/master/src/shared/cl... better than css or even css in js

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.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#142

Earlier quoted context omitted.

If you're writing only once, sure, have as long class names as you want, since you yourself don't want to maintain your code in the future apparently.

> since you yourself don't want to maintain your code in the future apparently. Well, I don't appreciate the snarky comment, quite honestly. But okay, I'll assume you have had more experience than me, and you've managed things I haven't, have a good day.

> Well at least I won't have to have 2 split windows just to know what 'image-caption' is

> I'd rather save time and have understandable code than maintain those CSS classes like "image-caption".

Sorry, but the snarkiness was in your comment first, and when you said you didn't want to maintain those classes, that's exactly what it sounded like to me, that, well, you didn't want to maintain said code. If you had a different point I'd be happy to hear it.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#143
post #98

Earlier quoted context omitted.

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.

How can it ever be impossible to track down styles? The browser dev tools will tel you exactly which styles apply to which element.

[deleted]

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#144
post #104

Earlier quoted context omitted.

> everybody already knows Bash Highly doubt it. > at the cost of readability. You mean the readability of "p-2 bg-red-500 text-lg font-medium" or "i-dont-remember-what-this-class-does"? I'd argue the readability in Tailwind is better. Tailwind is highly indicative of what it does and doesn't waste time when it comes to consistency. The only real argument is that it adds extra length to the class attribute, but then a…

> You mean the readability of "p-2 bg-red-500 text-lg font-medium" or "i-dont-remember-what-this-class-does" No, I'm pretty sure he means the readability of "absolute bottom-0 text-sm md:text-base text-white leading-relaxed tracking-tighter transition-all duration-300 ease-in-out m-3 md:m-4 px-6 md:px-8 py-4 md:py-6 opacity-0 w-full", as opposed to a single well-named class such as "image-caption".

Yeah, it's bgcolor="#30312c" all over again. (One thing I like about Tailwind though is that at least it enforces some kind of grid and design tokens, but you can (and should!) easily reproduce it with CSS variables.)

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#145
post #24

Earlier quoted context omitted.

Really curious about this. Can you link to some context? We're looking to find the lowest common denominator of expressing UI components and thinking about JSON metadata instead of Web Components. With this, we'd have to implement some adaptor that maps JSON to each UI library, but in our case we really only have to worry about React and Native Mobile.

I guess because of how JSX works and what is required to support Web Components semantics. It is like "you kind of can, but you're on your own" thing, https://reactjs.org/docs/web-components.html

From that page:

> Most people who use React don’t use Web Components, but you may want to, especially if you are using third-party UI components that are written using Web Components.

So it seems like this would be exactly the kind of use case where using web components would be ok.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#146

Earlier quoted context omitted.

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.

I've often found that people that want to criticize Tailwind immediately dismiss anyone that likes it as lacking understanding of CSS.

I've been writing CSS since 1997 and tried every fad technique that's come along. Tailwind is the first one that didn't make me dread dealing with CSS.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#147
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.

> With Tailwind you’re forever jumping between components and figuring out what that one long line of class names is actually doing.

Only if you already have no clue what CSS is. If you know CSS and can’t figure out what a given tailwind class does, then I don’t know if anyone can help you.

That said, I do often feel that I might as well just write the css directly. Writing tailwind feels like another translation layer.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#148

Earlier quoted context omitted.

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.

I've often found that people that want to criticize Tailwind immediately dismiss anyone that likes it as lacking understanding of CSS. I've been writing CSS since 1997 and tried every fad technique that's come along. Tailwind is the first one that didn't make me dread dealing with CSS.

That's all well and good until you have to maintain it at scale. I'd rather take regular CSS.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#149
post #130

Earlier quoted context omitted.

I have a really hard time seeing someone use Tailwind as a shortcut because they don't know CSS. That comment does not say what you think it is. They are not saying they use it because they don't know CSS. The maintenance is what makes Tailwind awesome. I've written CSS professionally since Internet Explorer 6 and have gone through many different strategies for writing maintainable CSS (BEM, OOCSS, SCSS and multiple…

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

No it's more like functional programming with small, single-purpose elements. Semantic CSS is more like object oriented programming with big bloated classes with poorly designed and leaky abstractions.

Re: Konsta UI – Mobile UI Components Built with TailwindCSS

#150

Earlier quoted context omitted.

I've often found that people that want to criticize Tailwind immediately dismiss anyone that likes it as lacking understanding of CSS. I've been writing CSS since 1997 and tried every fad technique that's come along. Tailwind is the first one that didn't make me dread dealing with CSS.

That's all well and good until you have to maintain it at scale. I'd rather take regular CSS.

I guess you missed the part where I said I have used it successfully on several large codebases?
Post reply on HN