vinay
vinay

Reputation: 78

How to use pseudo selectors before::after in tailwindcss?

I have hard time figuring this out on Youtube and Google. Seems like this is the only place where I will get the answers.

Upvotes: 1

Views: 1641

Answers (1)

vInEnDeRsInGh
vInEnDeRsInGh

Reputation: 339

Currrently tailwindcss doesn't have Pseudo Elements utilities like before::after. For that you need to install the pseudo element plugin

 # for NPM
 npm install tailwindcss-pseudo-elements --save-dev

# for Yarn
yarn add tailwindcss-pseudo-elements -D

Then you need to add some lines in your tailwind.config.js file,
for that refer this

Upvotes: 1

Related Questions