Using Tailwind CSS is a great way to learn CSS

I was in a pair programming session today, working on some Twig components with Tailwind CSS.

We knew what we needed to implement and did so based on an example from a Tailwind component library and some additional styles.

After implementing the feature, we could review the classes we added and review what each did.

We could easily move or remove a class and see what effect it had.

Something nice is that the Tailwind classes usually relate to what CSS they're applying, such as block and flex for display and relative and absolute for positioning.

This makes Tailwind a great way to learn CSS compared to other frameworks that give you prebuilt HTML and expect you to add a generic class like card.

In that case, the knowledge is hidden within a stylesheet the Developer doesn't see, which makes it harder to read and learn from.

Other utility-class frameworks have shorter class names that are less readable.

Tailwind strikes the perfect balance, in my opinion.

- Oliver

Was this interesting?

Sign up here and get more like this delivered straight to your inbox every day.

About me

Picture of Oliver

I'm an Acquia-certified Drupal Triple Expert with 17 years of experience, an open-source software maintainer and Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.