• 1 Post
  • 7 Comments
Joined 1 year ago
cake
Cake day: July 2nd, 2023

help-circle






  • sirdorius@programming.devtoLemmy@lemmy.mlGitHub - LemmyNet/lemmy-ui-leptos
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    2
    ·
    edit-2
    1 year ago

    Every front-end styling dev can now speak the same language, rather than constructing their own from scratch.

    Ok, but with Tailwind it seems that they are just saying p-4 uppercase instead of padding: 1rem; text-transform: uppercase; which is shorter, but exactly the same thing since it maps 1:1 to ‘custom’ CSS. It also doesn’t abstract away the CSS underneath, it just gives it a new name, which you have to learn in addition to the CSS

    Tailwind compilers should only bring in the classes that you’re using, so it should be much smaller than almost any other framework.

    In theory yes, but in practice look at the link in my original post for how it becomes slow with hot reloading in Vite. I don’t know if it would have the same problem with leptos, but probably yes, since it is an architectural flaw of generate the world, strip it down later.

    DaisyUI is useful because it has helper classes

    I do get DaisyUI, and it does fulfill the goal of getting devs to speak the same language. <button class="btn btn-primary"> totally makes sense. What I don’t get is why couple and build it on top of Tailwind which becomes useless at this point, since it’s just shorthand for some CSS. Maybe I am missing some big feature of Tailwind? Quoting the creator of Tailwind from the main page

    So he is clearly against the approach that DaisyUI advertises as a selling point.


  • sirdorius@programming.devtoLemmy@lemmy.mlGitHub - LemmyNet/lemmy-ui-leptos
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    2
    ·
    edit-2
    1 year ago

    I’m not a frontend dev. Can someone ELI5 to me the point of DaisyUI+Tailwind? With Tailwind you’re supposed to style your elements faster with atomic classes directly in your HTML. But then with DaisyUI you’re using semantic class names, so it’s basically going full circle to plain old CSS? What is the point of TWO added tech layers when you could achieve the same using CSS+HTML components like Bootstrap and the like? I’ve also read that Tailwind has horrible performance for development since it moves around megabytes of utility CSS, that with DaisyUI, you are just not going to use, and will mostly be stripped out by a long build process before release.