DEV Community

Discussion on: Classless CSS Isn't Trashy

Collapse
 
nbhankes profile image
Nathan B Hankes

Thanks for sharing. I haven't tried Tailwind yet, but thought it was similar to Bootstrap. From what I understood, Tailwind styles apply to your HTML where ever you use the Tailwind classes.

Classless CSS is different in that it doesn't even require this. The stylesheet would apply a typography style directly to the p or h1 elements, things like responsive text sizing, centered text, etc. So there's no need to memorize or add classes.

The classless CSS stylesheet is basically like a theme template if that makes sense. Just link it to your HTML and voila!

Here's a link to a demo website for the Water CSS stylesheet to see a classless stylesheet in action:

Water CSS

Collapse
 
jakobbouchard profile image
Jakob Bouchard

Classless CSS sounds pretty fun to do yeah! I feel like bigger websites might not be able to use it though. I might try building a complete-ish website using it 🤔
By the way, I also thought Tailwind was similar to Bootstrap, but it’s really not. Especially if you use its PostCSS features, as you can @apply their classes to elements or other classes:

h1 {
  @apply text-white mb-4;
}
Enter fullscreen mode Exit fullscreen mode

I had a much better time with Tailwind than Bootstrap personally. I will try out classless for sure though!

Thread Thread
 
nbhankes profile image
Nathan B Hankes

That @apply functionality is pretty slick! Thanks for letting me know about that.

And have fun with classless CSS!