3 ms·
> See, I know that shipping end-user software - like the Tailwind compiler - if that software is written in an interpreted language - is fucking hard. This I
by Levitating 2y ago
> See, I know that shipping end-user software - like the Tailwind compiler - if that software is written in an interpreted language - is fucking hard.
This I don't get. This is interpreted code, most web backends integrate node, why not just ship a node module? Why in gods name ship bun.
The whole web development scene has had some of the worst software engineering I've ever seen. With the exception of the Ruby scene, we have Tilt and Nokogiri for these types of things.
- davedx 2y agoSpeed, I guess? Although I use tailwind on all my projects and not once have I thought "oh boy, development is so slow because of tailwind, I sure wish it was implemented in a compiled language!"
- julik 2y agoI think it's more like "having less moving parts". In which they kinda-sorta-succeeded, except that the choice of bun seems misguided for something where you want broad adoption. And Tailwind is, by now, a product that is clearly clamoring for broad adoption (and achieving it).
- whywhywhywhy 2y agoA lot of CSS tooling feels designed to overcomplicate it so it feels more like "engineering" rather than "markup". I find Tailwind particularly bizarre, essentially writing your CSS as inline styles via single use non-semantic classes is absurd to me. Wasn't CSS invented so we didn't have to write every html element "its blue, centered text and bold font" yet people willingly choose to use class="items-center font-bold text-blue-600" and running it through a compiler.
- rsynnott 2y agoHuh. Yeah, I'd never heard of Tailwind before, but this looks suspiciously like how people formatted HTML _before_ CSS existed.
- cess11 2y agoIf all your frontend code lives in component files then it is quite nice that all the styling is also local to those components so you don't end up with horrors in unexpected places because you changed a line in a CSS file. Since it's already in component files you can use the templating already present in that context to fill in values from colour schemes and so on, without the hazards of cascading.
- cess11 2y agoI have an LLM synthesised HTML file that links in a remote tailwind.css and contains no script tags or any JS at all. It contains a lot of class="bg-cover bg-center h-screen" and class="text-3xl font-bold text-gray-800 mb-4" that I don't really understand, and this file renders just fine in a web browser. Where do you expect that compiler to come into this? Or is it me that doesn't understand Tailwind and this is actually not Tailwind, just some random CSS with the same name that a compressed database puked up for me?
- whywhywhywhy 2y ago> Where do you expect that compiler to come into this? Whole article is about getting the tailwind compiler and its dependencies up and running on a 12 year old CPU so it must be important somehow...
- cess11 2y agoOK, but I don't recognise this from my scant experience with Tailwind, which consists of either having a framework do whatever it does with ":tailwind" (maybe it's a compiler, I don't know) which it has done without me noticing anything at all or putting a link in a link-element to pull in a CSS. So I'm wondering whether this compiler/preprocessor stuff is actually something people run into and my experience is deceptive, or if it's something happening to few people, on the margins, that I'll likely never experience. Because it matters to me, since I'm not going to spend time digesting the Tailwind docs and whatnot and will forever stay a casual, disinterested user that cribs some stuff I don't understand from search interfaces. If I can't expect this to continue working as it has I'll have to figure out a way to ditch the Tailwind stuff I'm already using.
- julik 2y agoYes, they run it - but for most it is melted into another bundler like PostCSS. The few of us who try to resist the "just use bundlers for everything and everywhere" do notice that there is now a bundler process firmly anchored in your development process. And yes, being able to jettison a pre-processor for frontend things is a very necessary thing, and unless the designers have accounted for this (I only know of create-react-app having a "jettison" feature, and then - just) you are in for a heap of fun if you need to resurrect a 5-years old app with its dev environment.
- graemep 2y ago> Wasn't CSS invented so we didn't have to write every html element "its blue, centered text and bold font" yet people willingly choose to use class="items-center font-bold text-blue-600" and running it through a compiler. Tailwind is far from the first framework to require it. Bootstrap has things like .center and its entire basis are layout classes for the grid. its responsive by default, but not semantic. I think CSS has failed because people want far more control on appearance (for branding and aesthetics) than the people devising it anticipated. The motivation for semantic markup has also reduced because people write much less HTML. You might have some markup in what you edit, but the layout and base styles are usually generated by a system (e.g. a CMS). Even most people serving static files use a site generator.
- pjmlp 2y agoJust like everything in good old Web, CSS was designed for documents, not interactive applications themes.
- julik 2y agoI don't think CSS has failed - it's just a big and complex system for automatic layout. Automatic layout is hard, and if the age and power of CSS show us anything - is that it has succeeded. Comparing CSS of today to CSS of, say, 2005, is just night and day. I don't think doing layout using other means (formatting specifiers? spacer elements?) would have been that much different, given that it's constraints all the way. The difficult bit is that the layout is not fixed - and it's a pain either way you do it, doing things well in InterfacerBuilder.app was also a struggle. Yes, "center things" is ridiculous because you have to do it "4 different ways" with different tradeoffs - and there are some areas where things are still very painful (text-box-trim just now becoming available). But "failed"?.. that is a bit harsh.
- immibis 2y agoSomeone told me about Tailwind last week on IRC, and I literally do not see the point of writing class="font-bold" versus style="font-weight:bold;" especially if the former means you have to add a whole bunch more complexity to your build process (and to have a build process at all). I wrote my website in C, so I don't know about this modern web process stuff.
- julik 2y ago> Why in gods name ship bun. I try to avoid that strong of a language (although believe me - when this was going about I was very, very angry indeed). I think the reason was exactly removing the "npm hell" for users and not requiring any dependencies for using Tailwind. The irony of it being, of course, that for some situations Bun turned out _more_ of a problem than shipping npm modules would be. I was also advised to "use Tailwind as an NPM module for now". Only - I couldn't because the only "pure-JS" variant I could find was some months old, and the current builds all work through that bun-based 100MB binary. The idea was good. The execution by the maintainers - and this is my subjective opinion, again - is not. An experimental JS runtime supported by one person is not a good fit for this.
- julik 2y agoMost likely they decided to go for a binary so that people with other runtimes could use Tailwind without subscribing to the whole Node+npm ordeal. And it's actually neat when it works - for us RoR folks it makes things like tailwindcss-rails possible - where there isn't any Node stuff installed at all.
- Levitating 2y agoBut RoR does support having node integrated and it was the default for a long time. tailwindcss-rails could've just used Node. Instead your application is now packing a 100M binary just for your CSS framework. Even when you are already using Node. I see no benefit, imagine if every component of your application shipped its own runtime. Imagine if erb in RoR packaged its own version of ruby. That would be crazy right?
- julik 2y agoThe application is not packing the binary - it is the gem that you use to build CSS, and I _think_ it's only active during development, but don't quote me on that. In production there is a generated built asset which contains all the Tailwind-generated CSS classes you are using across your templates.