Today I Learned

A Hashrocket project

Ready to join Hashrocket? Find Openings here and apply today.

Pseudo selectors with Tailwind 2.2

With Tailwind 2.2 now you can easily use before and after pseudo selectors.

Here’s an example:

Screen Shot 2021-07-28 at 12 26 37 PM
<p class="flex flex-row items-center before:mr-2 before:bg-gray-400 before:h-2 before:w-2">
 Hello Tailwind 2.2
</p>

There are other great new features added to version 2.2, check them out here.