• 0x01@lemmy.ml
    link
    fedilink
    arrow-up
    10
    ·
    12 days ago

    Ngl I love tailwind, I’ve been through so many different css paradigms

    • separate css files: why did we ever do this, if you’ve ever used kendo’s css stuff you’ll understand how unfathomable hundreds of thousands of lines of css with complex rules is. Identifying all the things that affect a single component is the work of dozens of minutes at minimum, sometimes hours, you have to understand every nook and cranny of the css spec.
    • inline styles: fine, but verbose and requires object spreading, harder to compose, theming is tough and requires discipline to be consistent in your theme conventions, almost impossible to also theme imported library components
    • module.css with imported classes: my go to outside of tailwind
    • scss: I actually really like scss but it exacerbates the complexity and mystery of css, great for small projects but terrible as projects bloat
    • bootstrap: basically just worse tailwind, providing only components and colors

    That’s all I can think of right now, but tailwind is my preferred way to style a new project, I love how easy theming and style consistency is

  • Blackmist@feddit.uk
    link
    fedilink
    English
    arrow-up
    6
    ·
    12 days ago

    Which CSS framework is it that puts this shit everywhere?

    That one can die in a fire.

    • expr@programming.dev
      link
      fedilink
      arrow-up
      4
      ·
      12 days ago

      I’m honestly not sure, but I’m fairly certain it’s intentional obfuscation done for the production build. Why they think it’s so important to hide class names, I’ll never know.

    • NotNotMike@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      12 days ago

      No, it is not that bad. It’s actually very nice.

      It affords a lot of consistency, is relatively easy to understand (once you’re familiar with the convention), and theming allows you to modify all the colors and sizing in one file rather than modifying a lot of CSS

      I think the worst that can be said about it is that it is unnecessary, but I cannot see a true downside to using it besides personal preference. It gets the job done efficiently and correctly and that’s what’s important at the end of the day

    • Piatro@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      12 days ago

      I’ve not used it in anger but the principle just seems like inline-styles with extra steps. However I’ve also had to change something in a large project that had a lot of dedicated classes with specific and shared styles and trying to sort that out without breaking stuff was a massive pain.

  • fxdave@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    12 days ago

    Seems like a lot of supportive commenters didn’t try CSS-IN-JS like @emotion/styled, stitches, styled-components. Where are you guys? Why learning alternative names for CSS rules considered to be better, than just using those good ol’ "let you do everything what you want"s.