News for hackers. Stuff that matters.

greg0r

Re:Show HN: Nue – Apps lighter than a React button on Tuesday April 01, 2025 @03:51AM (#43543978)
If the authors of this project mean to say that a button in react wouldn’t work without including the react library (which is why the button is supposed to be 73kb), it’s a weak point, because the react library would be reused by other parts of the app bundle at this point.

This is misleading to people and the promise is so shallow that it almost feels insulting.

Re:Tailwind vs. Semantic CSS on Monday October 23, 2023 @08:12AM (#37984549)
The term “semantic CSS” is a little misleading. It's not a standard, like semantic HTML follows certain rules that are widely accepted. At the end of the day, everyone is writing their own “button” CSS class, and it is different on every website you look at. It doesn’t help whether you name something “.nav” or “.gallery” if you are the first person deciding the CSS rules for it. Your code might be “semantic” in your personal understanding of how things should be named, but your naming convention is useless to others who have to maintain your code and still need to look up what “.gallery” actually means. Giving “meaning to elements like ‘nav’, ‘button’ and ‘.gallery’” is what we've been doing for years! But this approach makes your code harder to maintain and from my understanding, this is part of the reason TailwindCSS exists.

This article also makes a couple of false/misleading statements. For example:

- With TailwindCSS “you are forced to wrap divs inside divs inside divs”. Not true. I'm writing TailwindCSS code for a couple of years now and can confidently say that you don’t have to write extra HTML markup to make Tailwind work. Your HTML can be perfectly “semantic” without wasted divs.

- “… utility-first approach lacks the power of CSS selectors”: Not true. TailwindCSS comes with grouping and child selector classes, for example.

- It also states that Tailwind styles elements exclusively inline, which is also not correct. They encourage you to name things as well but warn you of premature abstracting in their docs (https://tailwindcss.com/docs/reusing-styles#extracting-class...).

I also can't help but feel a little patronized by the tone of this article. Examples:

- “Mastering CSS requires practice”

- “But when you truly master CSS, there is no turning back” (and you don't need Tailwind)

- You only require Tailwind when you have a “bad CSS structure” or you don't care about your code (https://nuejs.org/blog/tailwind-vs-semantic-css/#but-i-move-...).

If I was new to coding, these statements would discourage me trying out new things. I don't know how you learned to code, but sticking to the fundamentals didn't get me anywhere. Yes, you need to learn them, but you also want to get things done (and figure out later how things work).