all 2 comments

sorted by: hot top controversial new old
[–] 8 points 1 month ago

Forever watching people reinvent CSS classes for no reason. (I appreciate that this article actually does show doing it with classes, but it's still grating to me that these "frameworks" just keep reinventing style="...")

  • source
  • [–] 5 points 1 month ago

    The eternal pendulum swinging between BEM and atomic css forever. The best is to start with atomic and then extract a few BEM use cases as duplication emerges. Then you've got the best of both worlds.

    Roughly half of css is extremely specific to one place and not worth extracting. The remainder though is actually important to the design system and is worth deduplicating and formalizing into BEM / variants. The trouble is when you try to BEM everything and end up with thousands of classes that are only used once.

  • source
  • 2 comments in c/programming@programming.dev view that post
    [–] 7 points 1 month ago* (1 child)

    Tailwind class soup is something I see often in LLM-generated code. For some reason, every starter template in existence decided to include Tailwind, and then the coworker generating this code (who doesn't have frontend experience at all) just rolls with whatever the LLM shits out.

    I believe there's a proper way to use Tailwind, but I can't be bothered to read the docs for it. It makes far more sense to me to either use plain CSS or, if I'm using a component library, then whatever that library comes with for its theming system.

    Also, this whole article basically boils down to "use a proper theming system", which it even admits can be as simple as some CSS classes with standardized names.

  • source
  • hideshow 1 child comment
  • [–] 0 points 1 month ago

    Eh, if you’re using React or any other modern app framework (or “library” as they call themselves) then Tailwind classes are nicer for co-locating styles with their respective components. Vue lets you co-locate the actual style block, but even that’s not as nice as seeing the styles directly on the elements themselves. There are still uses for global-level CSS of course, but there’s no “central” place for those besides the html tag.

  • source
  • parent