After 20 years, my little company still uses just HTML, CSS and JavaScript for everything including two sites I'd bet money most of you visit at least a couple of times a month.
DaisyUI: Tailwind CSS Components
171–180 of 181 posts
Re: DaisyUI: Tailwind CSS Components
#172I agree with others that this is not how Tailwind is meant to be used. For example, the approach shadcn ( https://ui.shadcn.com/ ) takes is much better IMO. Creating helpers like `btn` makes it very difficult to understand how it works and is not very customizable. Shadcn creates an actual component for you in your codebase and is just trivial Tailwind styles to modify.
For nearly everything, I won't need to customize it (and if I do have to customize often, it probably means that particular component library wasn't a good choice).
And for the rare cases where I do need to customize something, I can always go into the source of the component library, copy what I want out into my project, and edit it.
> this is not how Tailwind is meant to be used
Who cares? If it works, and makes the development process easier, and doesn't cause problems, then that's a good thing.
Re: DaisyUI: Tailwind CSS Components
#173I really don't understand why you use Tailwind for a CSS component library. To use your component library now people have to use Tailwind, while if you'd used regular CSS both sites with and without Tailwind could use the library (Tailwind is additive on top of CSS after all). Maybe it appeals to people in the Tailwind bubble, and gain momentum that way?
After learning it a bit, I liked Tailwind. Writing CSS manually sucks. It's fiddly, and often you have to sit around adding and changing random things until it looks the way you want, and you have no idea why what you did worked. Tailwind doesn't completely fix that, but it makes it significantly better.
But I don't feel like building my own components from scratch. That's where DaisyUI comes in to make my day easier. But if I want to override any of DaisyUI's choices, I have Tailwind's easier-to-use classes that I can use to easily do so.
Re: DaisyUI: Tailwind CSS Components
#174I do my best to use vanilla CSS, BEM style, with SCSS preprocessing, but it's not incredibly intuitive, it's apparently hard for most "full stack" devs to do because they think it is beneath them so they will reach for something like MaterialUI.
I agree with the criticisms about tailwind and Daisy but the problem these seem to solve that vanilla CSS does not is that Tailwind for all of its quirks requires less internal agreement than vanilla CSS. Without internal agreement every dev does their own crazy thing to the CSS and it turns to spaghetti fast.
So again my question is, what is my alternative here that gives me this property of "nicely packaged, well documented, modular, scalable CSS" without using Tailwind/Daisy?
Re: DaisyUI: Tailwind CSS Components
#175So for everyone hating on Daisy and Tailwind, what is the alternative? I do my best to use vanilla CSS, BEM style, with SCSS preprocessing, but it's not incredibly intuitive, it's apparently hard for most "full stack" devs to do because they think it is beneath them so they will reach for something like MaterialUI. I agree with the criticisms about tailwind and Daisy but the problem these seem to solve that vanilla C…
Re: DaisyUI: Tailwind CSS Components
#176Earlier quoted context omitted.
> So your component still has 60 tailwind classes on it? Yes, and this is better I think, because you still have only one button. So you just reuse the component. But if you make a .button class, now people are going to be tempted to use that to style their own buttons. And now, you have a dozen buttons and your app breaks in tiny little ways and your codebase is a hot mess.
> But if you make a .button class, now people are going to be tempted to use that to style their own buttons. How is having consistent design across the entire application a bad thing?
Re: DaisyUI: Tailwind CSS Components
#177Earlier quoted context omitted.
SCSS and Sass don't have a "gap-1"
Then how does tailwind implement it? Use that.
Re: DaisyUI: Tailwind CSS Components
#178So for everyone hating on Daisy and Tailwind, what is the alternative? I do my best to use vanilla CSS, BEM style, with SCSS preprocessing, but it's not incredibly intuitive, it's apparently hard for most "full stack" devs to do because they think it is beneath them so they will reach for something like MaterialUI. I agree with the criticisms about tailwind and Daisy but the problem these seem to solve that vanilla C…
BeerCSS, Bulma, Bootstrap, UIKit, Foundation. Feel free to add other full blown alternatives that offer a concept of primary, secondary for buttons etc.
Re: DaisyUI: Tailwind CSS Components
#179Earlier quoted context omitted.
prolly a porn company
No. Restaurant chain and entertainment company
I mean, I don't think I use any restaurant chain web sites. So that leaves an entertainment company.
Netflix, Apple TV+, Disney? I mean... you did say most of us will use some of these sites every month. Most of the entertainment web sites that people use all the time are HUGE companies, why would they use your little company (your own words) ?
Re: DaisyUI: Tailwind CSS Components
#180For those interested in how to use this with HTMX, read on. DaisyJS supports HTMX as it can work with just plain HTML without needing a fancy JS framework like Vue or React. You start by setting up something that can serve HTML and with a template engine. My favorite is Django. You also need daisyui, tailwindcss etc in a local NodeJS dir. Those parts aren't too hard, I'll skip over it. Now you make sure you build a s…