Hacker News new | ask | show | jobs
by fkyoureadthedoc 1015 days ago
Do you think that's representative of average tailwind, or have you chosen a particularly horrible case?

Edit: looking around my codebases (granted I don't write much code anymore) most of it doesn't look like that, but a small amount of components do have some gnarly classes.

1 comments

Not really. I copied one of the components and picked a random line. Some were worse than this.
Actually, looking at some examples, this is absolutely atrocious markup. Tons of empty divs with random CSS properties that are invisible and take up zero space. Hardcoded color values that should use the Tailwind color scales.

My bet is that they made some designs with WYSIWYG in Webflow, and automatically converted them to Tailwind.

EDIT: The dead giveaway is that they’re not using Tailwind’s breakpoints, but instead hardcoded ones, that happen to all be the same as Webflow’s hardcoded breakpoints - 478, 767, and 991 pixels.