Live data from Hacker News

Unpopular Opinion: Bootstrap is a better front-end framework than Tailwind

news.ycombinator.com

31–39 of 39 posts

Re: Unpopular Opinion: Bootstrap is a better front-end framework than Tailwind

#31

Earlier quoted context omitted.

Why am I not surprised this rube Goldberg style machine seems like a rational thing to people who write xml to generate JavaScript to generate html.

I think these debates ultimately come down to what you’re making with these tools: is it documents or application interfaces ? If it’s documents, then plain HTML, CSS and a touch of JS sprinkles on top works very well, as they were designed for this. If you’re making software, though, at some point you’re going to need some additional tooling to make it feasible.

> at some point you’re going to need some additional tooling to make it feasible.

I mean sure, most people will pick some kind of abstraction over parsing and constructing raw HTTP messages.

But it boggles the mind that apparently a large chunk of "developers" cannot see the insanity in writing XML to generate JavaScript which generates HTML and CSS because they want to write `Save` rather than... `Save`.

Like I said earlier: so much of the folly in the NodeJS community looks like bizarre adoration of early-2000s J2EE stack.

You have a language that requires no AOT.. ah better invent increasingly convoluted and ever-changing build processes for it.

You're writing output that's essentially just a string to be sent over the wire... ah better create a wrapper for the wrapper that creates the service which renders the string.

But sure. That is totally a rational approach to development, and the nodejs community has never shown itself to be prone to chasing shiny useless things or cargo culting. I must just be overreacting.

Re: Unpopular Opinion: Bootstrap is a better front-end framework than Tailwind

#32

Earlier quoted context omitted.

I think these debates ultimately come down to what you’re making with these tools: is it documents or application interfaces ? If it’s documents, then plain HTML, CSS and a touch of JS sprinkles on top works very well, as they were designed for this. If you’re making software, though, at some point you’re going to need some additional tooling to make it feasible.

> at some point you’re going to need some additional tooling to make it feasible. I mean sure, most people will pick some kind of abstraction over parsing and constructing raw HTTP messages. But it boggles the mind that apparently a large chunk of "developers" cannot see the insanity in writing XML to generate JavaScript which generates HTML and CSS because they want to write ` Save ` rather than... ` Save `. Like I…

> But it boggles the mind that apparently a large chunk of "developers" cannot see the insanity in writing XML to generate JavaScript which generates HTML and CSS because they want to write `Save` rather than... `Save`.

I'm wondering if some of the disconnect here is that you don't have personal experience with this type of development, so you might not see what pain points it solves.

The first thing I would mention is that components encapsulate function and styling. Buttons don't illustrate this well because they're trivial. But you can imagine a `` that takes a `variant` property ("range" or "single"), `month` and `year` properties, and perhaps a property called `annotations` which accepts an array of special dates and their categories (`[{date: "2026-07-04", code: "premium_rate"}, {date: "2027-07-07", code: "sold_out"} ...]`). The end result is an interactive picker that shows the desired span, with certain dates unselectable and others marked with special color codes or symbols. You're going to have a very unpleasant time implementing that with globally scoped CSS classes.

And this isn't a string sent over the wire. The "document" that the browser renders is changing continuously as you interact with it. If you were to open Chrome Devtools and look at the subtree of the DOM containing the date picker, you would see elements appearing and disappearing, gaining or losing classes and attributes, in real time as you select/deselect/skip forward/etc. That's what makes it work, rather than being a static drawing of a calendar.

I personally do not like the Javascript frontend ecosystem. It's hacks on top of hacks on top of hacks. But, do you know another way to deploy software that's cross-platform and basically free of gatekeepers? Sometimes we just have to do weird things because they're really useful.

Re: Unpopular Opinion: Bootstrap is a better front-end framework than Tailwind

#33

Earlier quoted context omitted.

> at some point you’re going to need some additional tooling to make it feasible. I mean sure, most people will pick some kind of abstraction over parsing and constructing raw HTTP messages. But it boggles the mind that apparently a large chunk of "developers" cannot see the insanity in writing XML to generate JavaScript which generates HTML and CSS because they want to write ` Save ` rather than... ` Save `. Like I…

> But it boggles the mind that apparently a large chunk of "developers" cannot see the insanity in writing XML to generate JavaScript which generates HTML and CSS because they want to write ` Save ` rather than... ` Save `. I'm wondering if some of the disconnect here is that you don't have personal experience with this type of development, so you might not see what pain points it solves. The first thing I would ment…

> I personally do not like the Javascript frontend ecosystem. It's hacks on top of hacks on top of hacks. But, do you know another way to deploy software that's cross-platform and basically free of gatekeepers?

One way is what I call the "Modular MVC pattern" that involves pure js routing and manual DOM manipulation without using any framework at all. You handle complexity in two ways: by modularizing the "controller" parts into multiple js modules for each route, and "view" parts into multiple HTML partials - and using the event bus pattern if your app gets too complex (as alternative to modern reactive frameworks like react/vue).

Shameless plug: I've tried to implement this exact pattern with limited success in Abhyasa Quiz App[1], a side project.

[1]: https://abhyasa.pages.dev/

Re: Unpopular Opinion: Bootstrap is a better front-end framework than Tailwind

#34

Earlier quoted context omitted.

> at some point you’re going to need some additional tooling to make it feasible. I mean sure, most people will pick some kind of abstraction over parsing and constructing raw HTTP messages. But it boggles the mind that apparently a large chunk of "developers" cannot see the insanity in writing XML to generate JavaScript which generates HTML and CSS because they want to write ` Save ` rather than... ` Save `. Like I…

> But it boggles the mind that apparently a large chunk of "developers" cannot see the insanity in writing XML to generate JavaScript which generates HTML and CSS because they want to write ` Save ` rather than... ` Save `. I'm wondering if some of the disconnect here is that you don't have personal experience with this type of development, so you might not see what pain points it solves. The first thing I would ment…

> you don't have personal experience with this type of development, so you might not see what pain points it solves.

That all depends what you mean by "this type of development".

Do you mean development targeting a browser? Do you mean development targeting client-side interaction in a browser? Or do you mean writing JSX/React/Whatever flavour of the week is hip with the NodeJS community?

If you meant either of the first two: I have about 20 years experience.

If you meant the last: No. If I wanted to be a masochist that badly I'd buy my wife a leather whip and a strap on.

As much as I generally avoid front-end dev when I can now, at one point it was a much greater part of my work. I've written modular/resuable client-side libraries/widgets (i.e. self-contained elements that other developers then used in their own separate projects to add functionality... you know, a "component" by another name) since IE6 was not just in-use, but current and popular. So to rebut your claim: I'm well aware of the "pain points" developing code like this for re-use.

> You're going to have a very unpleasant time implementing that with globally scoped CSS classes.

Have you ever used CSS or Bootstrap before? You know that bootstrap is meant to be a starting point for your codebase, right? Even the most bare-bones official Bootstrap "example" designs use custom CSS specific to that use-case. If you're trying to create anything beyond the most basic hello world page with nothing but bootstrap classes on your markup, you're doing it wrong.

If your argument for using Tailwind (and apparently by necessity, JSX components) is to avoid having someone write a handful of CSS rules specific to the widget you're creating, I can't help you mate.

> It's hacks on top of hacks on top of hacks. But, do you know another way to deploy software that's cross-platform and basically free of gatekeepers? Sometimes we just have to do weird things because they're really useful.

My argument isn't against using Javascript for interactivity on webpages/webapps. As I said, I've been doing it for a couple of decades now. I have my issues with JS, but for browser interaction it's mostly fine.

You see the "current ecosystem" the NodeJS/Javascript community has created, complain about it being "hacks upon hacks" and then still defend the batshit crazy stuff when someone calls it out.

I see the batshit crazy stuff and just ignore it. Just because something new exists, doesn't mean you have to use it. The browser environment for JS is slowly improving, gaining native abilities that we once had implement in libraries or from scratch.... and the majority of the JS-focussed community seems to continue to be obsessed with adding more and more and more layers of abstraction.

If you told 20-year-ago me that the browsers would all supported a native way to implement custom elements (i.e. Web Components) that can be initiated using regular markup in the page, it would never once have occurred to me that the JS developers of the day would then find some way to not just use the built-in capabilities and instead have a dependency chain and build system so complex there are fucking memes about it.

Re: Unpopular Opinion: Bootstrap is a better front-end framework than Tailwind

#35

It seems like Tailwind only makes sense when dealing with components. For more traditional web dev, Bootstrap makes much more sense to me.

errr, this sounds backwards, no?

Tailwind is better when you actually try to put the utility classes in your own components, sure. But the reason Tailwind got popular over Bootstrap in the last 5 years is because people got sick of hand-tweaking Bootstrap components and fighting it to do so when they can only run basic CSS sticks together.

(I'm aware modern CSS is really good even on its own, and most of us under-utilise it. But I think it has become clear that most people just don't want to learn it)

Re: Unpopular Opinion: Bootstrap is a better front-end framework than Tailwind

#36

Earlier quoted context omitted.

Why would you want to have to maintain a separate file instead of keeping it all in the same place? Preference I guess. I’m not bashing anyone who prefers writing CSS that way. But there are a lot of people who think it’s very important to share that they don’t like how Tailwind looks. It’s an argument that’s been pretty roundly responded to here: https://tailwindcss.com/docs/styling-with-utility-classes

> Why would you want to have to maintain a separate file instead of keeping it all in the same place? The year 2001 called and is demanding royalties for copyright infringement on "How to write your first dynamic page in PHP - just one file needed".

They also want their “year X called” joke back.

Re: Unpopular Opinion: Bootstrap is a better front-end framework than Tailwind

#37

It seems like Tailwind only makes sense when dealing with components. For more traditional web dev, Bootstrap makes much more sense to me.

errr, this sounds backwards, no? Tailwind is better when you actually try to put the utility classes in your own components, sure. But the reason Tailwind got popular over Bootstrap in the last 5 years is because people got sick of hand-tweaking Bootstrap components and fighting it to do so when they can only run basic CSS sticks together. (I'm aware modern CSS is really good even on its own, and most of us under-uti…

When I see people use Tailwind they are adding a dozen classes to something to do what a single class in Bootstrap does.

On a component that only needs to be defined once, no big deal. But if you need to add this collection of classes on 20 elements, adding a bunch of Tailwind sounds messy and error prone.

Tweaking Bootstrap here and there sounds a lot better than using 100% tweaks. Tailwind seems like a tweak library. Add 10 tweaks to each element and you start to have a design on your hands. I often question why it exists vs raw CSS.

Re: Unpopular Opinion: Bootstrap is a better front-end framework than Tailwind

#38

Earlier quoted context omitted.

errr, this sounds backwards, no? Tailwind is better when you actually try to put the utility classes in your own components, sure. But the reason Tailwind got popular over Bootstrap in the last 5 years is because people got sick of hand-tweaking Bootstrap components and fighting it to do so when they can only run basic CSS sticks together. (I'm aware modern CSS is really good even on its own, and most of us under-uti…

When I see people use Tailwind they are adding a dozen classes to something to do what a single class in Bootstrap does. On a component that only needs to be defined once, no big deal. But if you need to add this collection of classes on 20 elements, adding a bunch of Tailwind sounds messy and error prone. Tweaking Bootstrap here and there sounds a lot better than using 100% tweaks. Tailwind seems like a tweak librar…

Which leads us to: Tailwind supports making your own components, and encourages it. But devs, either pressed for time or lazy, or by always getting a slightly too unique design from their design team, don't do it.

At the same time, not everything is a reusable component, so yeah, shove a couple dozen tailwind classes there and call it a day. Still better and less messy than hand-wringing custom selectors or custom element styling - else Bootstrap would be better for tweaking than "100% tweaks".

It's the usual OOP debate on inheritance vs composition.

Tailwind is composition, and it's clearly the favoured approach.

Re: Unpopular Opinion: Bootstrap is a better front-end framework than Tailwind

#39

Earlier quoted context omitted.

Once you learn how to read it, it's actually pretty clear. This element has a small amount of x and y padding that is suitable for (for example) keeping text away from the edge of the container. The text is white. The corners of this are rounded. The background is the default intensity 'sky' colour, which darkens slightly on hover and darkens further when it's active. You can take this from 77 characters to 189 like…

I didn't say I can't read it. I asked who thought it was a good fucking idea. I guess you've answered that implicitly. Embedding every style directly into the style attribute is also readable , and as a side benefit it doesn't need a build step just to make your styles actually work. I can now see exactly why OP made this post. If a client told me they don't want to use something akin to bootstrap or any other sane c…

100% with you on this, know you’re not the only one bewildered by the insanity of ignoring the cascade, styling everything from scratch, and placing it all in a list of classes.
Post reply on HN