• Rose@slrpnk.net
    link
    fedilink
    arrow-up
    15
    ·
    9 hours ago

    If using plain CSS, usually it’s enough to set width appropriately, and margin-left and margin-right to auto.

    If using a Modern Frontend/CSS Framework, then may God have mercy on your poor soul.

    (Seriously I just started a new project with TailwindCSS and I’m so confused. But not entirely desperate yet.)

    • loics2@lemm.ee
      link
      fedilink
      arrow-up
      3
      ·
      4 hours ago

      w-... mx-auto, replace the 3 dots with your desired width value, and that’s it with tailwind

      • toddestan@lemm.ee
        link
        fedilink
        arrow-up
        4
        ·
        4 hours ago

        Generally I find many these frameworks will make some complicated things simple, but the cost is some things that were once simple are now complicated. They can be great if you just need the things they simplify - or in other words can stick to what they were intended for, but my favorite way of keeping things simple is to avoid using complicated and heavy frameworks.

      • Ricaz@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        10
        ·
        8 hours ago

        If you spend a lot of time on a single framework, you will transcend and become a sort of frontend diety, growing multiple extra limbs allowing you to type in CSS classes faster than any mere mortal

    • Ricaz@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      2
      ·
      8 hours ago

      I’m doing a small hobby project (a ladder/ranking system for playing beer sports with my community), and I tried out Tailwind.

      I gave up and loaded Bootstrap instead, but I will probably end up just writing all the CSS myself.

      Seems so silly to have 15 CSS classes on a single DOM element…