• Rose@slrpnk.net
    link
    fedilink
    arrow-up
    16
    ·
    13 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
      ·
      8 hours ago

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

      • gradual@lemmings.world
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        3 hours ago

        I think they exist because of ignorance.

        People who don’t understand how to do a task will usually choose the wrong tools for that task.

        If someone is trying to cover up their lack of knowledge, they will usually make things more complicated than they need to be.

      • toddestan@lemm.ee
        link
        fedilink
        arrow-up
        5
        ·
        8 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
        14
        ·
        12 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

          • gradual@lemmings.world
            link
            fedilink
            arrow-up
            1
            arrow-down
            1
            ·
            edit-2
            3 hours ago

            What’s sad is that web development is only a nightmare so websites can be worse.

            I genuinely believe it’s part of the concerted effort by the cabal to make us accept a ‘new normal.’

            They don’t want an environment where anyone feels like they can make a website. They want us to believe we need to spend years studying before we can do anything, and even then we can only do what our bosses tell us to.

    • Ricaz@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      2
      ·
      12 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…

        • gradual@lemmings.world
          link
          fedilink
          arrow-up
          1
          arrow-down
          1
          ·
          edit-2
          3 hours ago

          Shouldn’t they be designed in an intuitive manner that makes misuse more difficult than regular use?

          Otherwise, why even bother using them? It’s like now you need to know all the ins and outs of CSS and a trendy framework that will lock you into their ecosystem.

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

            Kidding aside, I think the popular frameworks these days are incredibly well made. Frontend web has always been hell, and if your job is producing functional web GUIs, you can’t do it on a large scale without them.

            • gradual@lemmings.world
              link
              fedilink
              arrow-up
              1
              arrow-down
              1
              ·
              3 hours ago

              Based on my own experience developing GUIs, I’ve reached the conclusion that creating them through code is obsolete.

              We should be focusing on developing GUIs to develop GUIs, like Godot, instead of ‘frameworks’ that make an obsolete method of doing things even more cumbersome and complex.

          • bleistift2@sopuli.xyz
            link
            fedilink
            English
            arrow-up
            1
            ·
            3 hours ago

            Well, I find bootstrap very intuitive, and I don’t have 15 classes on my elements. That’s why I was asking.