Home > Net >  Is there a way to set content with Tailwind css?
Is there a way to set content with Tailwind css?

Time:11-16

I have to change some styling from css to tailwind but one rule seems to be impossible.

For example, having the following rule which adds an / between the elements of an ordered list.

.breadcrumb ol li:not(:last-child)::after {
  content: '/';
}

Is it possible to make it with tailwind? There is something in the documentation but seems too complicated.

CodePudding user response:

You will need the JIT mode enabled

then you can do

<div class="before:content-['/'] before:block ...">

Here's the link to the docs

  • Related