4 ms·
> Define the style in one place and reuse it. If I had to guess, this is pure Tailwind rot.
by kaoD 2mo ago
> Define the style in one place and reuse it.
If I had to guess, this is pure Tailwind rot.
- sfn42 2mo agoI don't use tailwind but surely it has ways to standardize this kind of stuff?
- kaoD 2mo agoTailwind's philosophy is that you must not use CSS facilities at all and instead all their utility classes should be inlined into the HTML soup. This leaves framework components as the only abstraction boundary, but that means if you're writing plain HTML without a framework there's literally no way to standardize your design system. That and the huge soup of classes in DOM is (part of why) I don't like Tailwind... but that ship sailed a long time ago.
- scoopertrooper 2mo agoYou can define css classes that combine multiple tailwind classes https://tailwindcss.com/docs/functions-and-directives#apply-directive https://tailwindcss.com/docs/functions-and-directives#apply-...
- kaoD 2mo agoYou can, but it goes against Tailwind's philosophy. It used to be explicitly discouraged here[0] (see this 2022 GH comment[1]), but now they just don't mention it. [0] https://tailwindcss.com/docs/styling-with-utility-classes#managing-duplication https://tailwindcss.com/docs/styling-with-utility-classes#ma... [1] https://github.com/tailwindlabs/tailwindcss/discussions/7651#discussioncomment-2250993 https://github.com/tailwindlabs/tailwindcss/discussions/7651...