DEV Community

Discussion on: Tailwind isn't the answer

Collapse
 
kreha1 profile image
Tomasz Rymkiewicz

Um, as other people haven't pointed out, you can use @apply to move your inline-styles-like classes into a custom class. What's more, the whole deal with tailwind is that you can customize your config file.

@apply works great with frameworks that implement scoped css block (Vue, Svelte). There is also windicss which expands tailwinds feature set, giving you pseudo-selectors, the ability to combine variants and lately the atrributify mode - using (most of the time) the first bit of tailwind css class as a HTML attribute to group classes.

Collapse
 
madeleineostoja profile image
Madi Ostoja • Edited

I touched on it in another reply, but if you’re using @apply what benefit are you getting over regular CSS with a strong design system other than a few saved keystrokes? The price you pay — introducing a whole new DSL and preprocessor — seem steep to me for that. Like, you shouldn’t need a config file to write CSS. If you use the CSS variables we already have then you can “customise” your design system in a single css file, and do it dynamically with JS in the browser too if you want.

I haven’t heard of windicss, and it sounds cool. But again a lot of the things you mentioned are plugging feature gaps that shouldn’t exist in the first place. All of these issues go away if we just abandon the style-by-classes paradigm

Collapse
 
justindmyers profile image
Justin Myers

"Like, you shouldn’t need a config file to write CSS. "

Weird, because you don't need a config file to use Tailwind. It works just fine along-side normal CSS.

Again, seems like you don't even understand what Tailwind is, you just want to advertise your "library".

 
joshuaamaju profile image
Joshua Amaju

Guy, take it easy. You're a tailwind fan boy. God...