Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Programmer Humor
  3. [ComiCSS] Benefits of Tailwind

[ComiCSS] Benefits of Tailwind

Scheduled Pinned Locked Moved Programmer Humor
programmerhumor
80 Posts 43 Posters 29 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M [email protected]

    https://lemmy.zip/comment/19872383

    Usability by third-parties. A webpage is not a pdf.

    F This user is from outside of this forum
    F This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #51

    That's not accessibility.

    M 1 Reply Last reply
    0
    • L [email protected]

      That's a common misconception by people who never used it. The truth is you need to know CSS to use Tailwind. Just because it simplifies styling doesn't mean it simplifies the underlying technology.

      pupbiru@aussie.zoneP This user is from outside of this forum
      pupbiru@aussie.zoneP This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #52

      you need to know css to use tailwind because it’s basically style= on everything: it’s css with extra steps

      L 1 Reply Last reply
      2
      • M [email protected]

        Now it is remembering tags for property instead.

        F This user is from outside of this forum
        F This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #53

        Except that you learn the class names once and re-use them across all your projects, whereas CSS classes are different for every single project.

        1 Reply Last reply
        1
        • 0 [email protected]

          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

          K This user is from outside of this forum
          K This user is from outside of this forum
          [email protected]
          wrote on last edited by [email protected]
          #54

          Working on hobby or shorter lived projects makes all your points agreeable. My work is generally on enterprise SaaS software with vast lifecycle and my thinking is

          separate css files

          module.css with imported classes: my go to outside of tailwind

          These are the same thing, unless it's not configured correctly.

          inline styles

          Only makes sense for something computed. Like a color computed based on a user selection. Otherwise it should be a class

          scss

          On a well-maintained project SCSS should be second nature. Something like a Vue single-file component project with scss will certainly not add to the bloat. You'd just have extra lines of vanilla css to scope classes and children selection/scoping that scss does with better syntax, in addition to scss functions and the like. Note that CSS is improving to do the work that SCSS has previously done, just as JS is improving to do the work natively that frameworks, libraries, and toolkits have previously done.

          bootstrap

          Yeah bootstrap, like jQuery, had it's time. It's largely been replaced by native tooling that shouldn't require external libraries. There's plenty of CSS libraries that are purely for theming, which is mostly what people used bootstrap for. (Smart defaults, basic component and typography themes, etc).

          To me tailwind makes sense for setting up projects quickly, but gets out of hand when it comes to customization on a larger scale. You eventually end up with overrides to tailwind's default styles that become hard to manage, outside of the scope of their theming implementation, and then ironically you're usually just using CSS variables which is back to the core toolkit.

          1 Reply Last reply
          0
          • trickdacy@lemmy.worldT [email protected]

            I cannot tell if you're saying tailwind is taking away from useful abstractions or adding to them. I think it's taking away from them. A whole bunch of class names in the page is opposite to what we were taught and there was a good reason for the lesson: content and presentation should be defined separately. This lends flexibility, readability and accessibility. Tailwind doesn't help with anything but preventing a breakage in another component/page. To me the reason to value this trade off is that you don't want devs to "have to care about css" which is a bad sign to begin with. It says "we think the way the web is built is bullshit, so let's just try to work around that with the latest attempt to make it better". The web is not bullshit. CSS is beautiful. Embrace the challenge. (Sorry I'm only halfway directing this rant at you)

            B This user is from outside of this forum
            B This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #55

            I'm saying we weren't taught when react was the way people wrote sites. if I was writing a site with pure html, css is great, especially modern css.

            but if I'm already using react and their abstractions, opinions on that part aside, I'd personally rather lean on the react component as the unit of reuse. tailwind removes the abstraction that you don't need, since many people in react tend towards one scoped css file per component with classes for each element anyway

            at this point I'd be more inclined to say for many sites the api and data fetching things are the content and html+css is presentation. csszengarden is cool but I haven't seen the html/css split help an end user, or really even me as a developer.

            trickdacy@lemmy.worldT 1 Reply Last reply
            1
            • pupbiru@aussie.zoneP [email protected]

              imo there’s VERY little difference to a lot of tailwind and style=“…”. you gain a few minor abstractions, but you lose so much

              trickdacy@lemmy.worldT This user is from outside of this forum
              trickdacy@lemmy.worldT This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #56

              Yep. The syntax is slightly cleaner to read probably, but that's about it.

              1 Reply Last reply
              0
              • trickdacy@lemmy.worldT [email protected]

                I cannot tell if you're saying tailwind is taking away from useful abstractions or adding to them. I think it's taking away from them. A whole bunch of class names in the page is opposite to what we were taught and there was a good reason for the lesson: content and presentation should be defined separately. This lends flexibility, readability and accessibility. Tailwind doesn't help with anything but preventing a breakage in another component/page. To me the reason to value this trade off is that you don't want devs to "have to care about css" which is a bad sign to begin with. It says "we think the way the web is built is bullshit, so let's just try to work around that with the latest attempt to make it better". The web is not bullshit. CSS is beautiful. Embrace the challenge. (Sorry I'm only halfway directing this rant at you)

                E This user is from outside of this forum
                E This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #57

                You're not wrong.

                Realistically, there's a bit of a nuance. Many modern web apps have different components that aren't HTML. You don't need HTML for a component. And those non-HTML components can provide the consistency they need. Sometimes, that's consistency for how to get the data. Sometimes, that's consistency for how to display the data. For displaying, each component basically has its own CSS, but it doesn't need to. A CSS class isn't required.

                Tailwind isn't meant to be a component system, It's meant to supplement one. If you're writing CSS's components, it looks horrible. If you're writing components at CSS that needs a foundation of best practices, it works pretty decent. They're still consistency. They're still components. They're just not centered around HTML/CSS anymore. It doesn't have to be.

                Sematically, it is still worse HTML. Realistically, it's often faster to iterate on, easier to avoid breakage: especially as the project becomes larger. Combine that with the code being more easily copied and pasted. It can be a tough combo to beat. It's probably just a stepping stone to whatever's next.

                trickdacy@lemmy.worldT 1 Reply Last reply
                0
                • pro@programming.devP [email protected]
                  • Permalink.
                  • Source code.
                  H This user is from outside of this forum
                  H This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #58

                  Tailwind is sooo great, made me extremely productive when scaffolding layouts and managing my palettes.

                  I really love it 🙂

                  1 Reply Last reply
                  2
                  • B [email protected]

                    I'm saying we weren't taught when react was the way people wrote sites. if I was writing a site with pure html, css is great, especially modern css.

                    but if I'm already using react and their abstractions, opinions on that part aside, I'd personally rather lean on the react component as the unit of reuse. tailwind removes the abstraction that you don't need, since many people in react tend towards one scoped css file per component with classes for each element anyway

                    at this point I'd be more inclined to say for many sites the api and data fetching things are the content and html+css is presentation. csszengarden is cool but I haven't seen the html/css split help an end user, or really even me as a developer.

                    trickdacy@lemmy.worldT This user is from outside of this forum
                    trickdacy@lemmy.worldT This user is from outside of this forum
                    [email protected]
                    wrote on last edited by [email protected]
                    #59

                    tailwind removes the abstraction that you don’t need, since many people in react tend towards one scoped css file per component with classes for each element anyway

                    What abstraction does it remove? In my view, it just adds slightly different abstractions. Instead of knowing an element has a clean block of rules with set meanings, you get a long (potentially grossly formatted/ordered) string of class names that mean the same thing as the CSS properties for the most part, but you've gotta learn a new set of aliases for them. If I am working on someone else's component, one of these scenarios is way easier for me than the other. Even when I worked with TW for a while, I never could really remember a lot of those class names.

                    csszengarden is cool but I haven’t seen the html/css split help an end user, or really even me as a developer.

                    You may have never refactored or reskinned a site. I have several times. The hardest projects like that were when content and presentation were tightly coupled. Those felt like pulling teeth to get done. important! every time a dev buried a style tag somewhere deep in some (for all intents and purposes) unchangeable Java code... shudder When they were loosely coupled, it was fun and went much easier.

                    edit: respect for knowing csszengarden. That site honestly was the first time I learned this principal and saw it applied. I've themed several websites over the years so I've used the concept myself.

                    1 Reply Last reply
                    1
                    • E [email protected]

                      You're not wrong.

                      Realistically, there's a bit of a nuance. Many modern web apps have different components that aren't HTML. You don't need HTML for a component. And those non-HTML components can provide the consistency they need. Sometimes, that's consistency for how to get the data. Sometimes, that's consistency for how to display the data. For displaying, each component basically has its own CSS, but it doesn't need to. A CSS class isn't required.

                      Tailwind isn't meant to be a component system, It's meant to supplement one. If you're writing CSS's components, it looks horrible. If you're writing components at CSS that needs a foundation of best practices, it works pretty decent. They're still consistency. They're still components. They're just not centered around HTML/CSS anymore. It doesn't have to be.

                      Sematically, it is still worse HTML. Realistically, it's often faster to iterate on, easier to avoid breakage: especially as the project becomes larger. Combine that with the code being more easily copied and pasted. It can be a tough combo to beat. It's probably just a stepping stone to whatever's next.

                      trickdacy@lemmy.worldT This user is from outside of this forum
                      trickdacy@lemmy.worldT This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #60

                      Many modern web apps have different components that aren’t HTML

                      What do you mean by this? Web Components?

                      I am not sure I understand the second paragraph either. I get that if you're doing things well, TW class names can be applied in a non-insane way. Still rubs me the wrong way as a concept though.

                      1 Reply Last reply
                      0
                      • B [email protected]

                        shadcn is the primary one for react at least. they've done a great job filling the space where you're trying to build up a design system but don't want to start from scratch, but they're great if you just want prebuilt components too

                        all the components build on something else like radix, and are pretty simple themselves. normally just the radix component with styles. Installing a component just copypastes the source into your project at configured locations.

                        if you've ever fought against something like mui to get it to fit design changes or change specific behavior, shadcn is great. at some point the extension points of a library aren't enough, but if you own all the code that'll never be a problem.

                        D This user is from outside of this forum
                        D This user is from outside of this forum
                        [email protected]
                        wrote on last edited by
                        #61

                        I don't use react, but needed a decently looking frontend complement library that didn't look dated, and found basecoat, which is shadcn but without react to be really neat.

                        Might be interesting for the htmx crowd here.

                        1 Reply Last reply
                        1
                        • pro@programming.devP [email protected]
                          • Permalink.
                          • Source code.
                          F This user is from outside of this forum
                          F This user is from outside of this forum
                          [email protected]
                          wrote on last edited by [email protected]
                          #62

                          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.

                          1 Reply Last reply
                          0
                          • pro@programming.devP [email protected]
                            • Permalink.
                            • Source code.
                            omegalemmy@discuss.onlineO This user is from outside of this forum
                            omegalemmy@discuss.onlineO This user is from outside of this forum
                            [email protected]
                            wrote on last edited by
                            #63

                            They said that You either hate or love tailwind, and when I first used tailwind I assumed it was just a joke, 'why would they hate this? It's simple to use, remember, build, and it even removes unnecessary CSS that I forget to do...'

                            Apparently it isn't as simple as that.

                            M 1 Reply Last reply
                            0
                            • F [email protected]

                              That's not accessibility.

                              M This user is from outside of this forum
                              M This user is from outside of this forum
                              [email protected]
                              wrote on last edited by
                              #64

                              You think only aria-attributes are accessibility? Most accessible is, what you not need additional tools and interpreters for.

                              F 1 Reply Last reply
                              0
                              • M [email protected]

                                You think only aria-attributes are accessibility? Most accessible is, what you not need additional tools and interpreters for.

                                F This user is from outside of this forum
                                F This user is from outside of this forum
                                [email protected]
                                wrote on last edited by
                                #65

                                No, it's of course not just aria attributes. But it's definitely not "how easy can I create user CSS". Accessibility is a term of art, you can't just expand its meaning to whatever you want.

                                https://en.wikipedia.org/wiki/Accessibility

                                M 1 Reply Last reply
                                0
                                • pupbiru@aussie.zoneP [email protected]

                                  you need to know css to use tailwind because it’s basically style= on everything: it’s css with extra steps

                                  L This user is from outside of this forum
                                  L This user is from outside of this forum
                                  [email protected]
                                  wrote on last edited by
                                  #66

                                  Well, it's className on everything 😉 And yes, it's literally CSS utility classes with an extra installation step that you only do once

                                  1 Reply Last reply
                                  1
                                  • F [email protected]

                                    No, it's of course not just aria attributes. But it's definitely not "how easy can I create user CSS". Accessibility is a term of art, you can't just expand its meaning to whatever you want.

                                    https://en.wikipedia.org/wiki/Accessibility

                                    M This user is from outside of this forum
                                    M This user is from outside of this forum
                                    [email protected]
                                    wrote on last edited by [email protected]
                                    #67

                                    Look, if it hinders me in my workarounds for my ADHD while every other framework does less so, then accessibility is worse. Shut up with your trademark gatekeeping bullshit.

                                    Also,

                                    1 Reply Last reply
                                    0
                                    • M [email protected]

                                      Now it is remembering tags for property instead.

                                      M This user is from outside of this forum
                                      M This user is from outside of this forum
                                      [email protected]
                                      wrote on last edited by
                                      #68

                                      Any passable editor nowadays does the heavy lifting for you, you can usually even write the CSS tag you want and it'll show you the options.

                                      1 Reply Last reply
                                      0
                                      • K [email protected]

                                        I was very much against frameworks initially: tailwind, bootstrap etc. However, when I started really building sites & apps using components, I found tailwind made my life a lot easier, so I could easily see and change styling while writing code/html, and it would only affect that component.

                                        Beforehand, I was trying to come up with names for CSS classes all the time, and then I'd change one thing, and fuck up styling on a diff page.

                                        M This user is from outside of this forum
                                        M This user is from outside of this forum
                                        [email protected]
                                        wrote on last edited by
                                        #69

                                        Yep, a component is a good abstraction level, no point in making life difficult by creating and coming up with names for smaller parts.

                                        1 Reply Last reply
                                        1
                                        • omegalemmy@discuss.onlineO [email protected]

                                          They said that You either hate or love tailwind, and when I first used tailwind I assumed it was just a joke, 'why would they hate this? It's simple to use, remember, build, and it even removes unnecessary CSS that I forget to do...'

                                          Apparently it isn't as simple as that.

                                          M This user is from outside of this forum
                                          M This user is from outside of this forum
                                          [email protected]
                                          wrote on last edited by
                                          #70

                                          I guess some people write code, and some people also read and maintain it.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups