3 ms·
> can't even get Astra to consistently re-use the same font-size across all of my HTML page headings+subheadings. This is just basic software engineering. DRY.
by sfn42 18d ago
> can't even get Astra to consistently re-use the same font-size across all of my HTML page headings+subheadings.
This is just basic software engineering. DRY. Define the style in one place and reuse it.
This is also why you need a human in the loop, you need to make these kinds of design decisions and tell it to do stuff like this. Otherwise you're just building a pile of trash and you'll keep having these dumb easily avoidable issues.
Humans have the exact same problem. If you want a consistent solution to a problem, solve it once and reuse it. Otherwise it won't be consistent.
- kaoD 18d ago> Define the style in one place and reuse it. If I had to guess, this is pure Tailwind rot.
- sfn42 18d agoI don't use tailwind but surely it has ways to standardize this kind of stuff?
- kaoD 18d 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 18d 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 18d 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...