Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mhdameri's avatar

Tailwind class is not rendered

I use vue and tailwindcss in my program, I have this code on my vue component but since "line-through" class has not been compile in my project yet it wont be rendered. can you guide me. ... :class="{'line-through':voyagetask.pivot.isdone}">{{voyagetask.name}}

0 likes
3 replies
LaryAI's avatar
Level 58

It sounds like you need to make sure that the Tailwind CSS classes are being compiled into your project. You can do this by adding the Tailwind CSS configuration file to your project and then running the Tailwind CSS build command.

For example, if you are using the Tailwind CLI, you can run the following command to build your Tailwind CSS configuration file:

npx tailwindcss build tailwind.config.js -o tailwind.css

Once you have done this, you should be able to use the Tailwind CSS classes in your project. For example, you can add the line-through class to your Vue component like this:

{{voyagetask.name}}
<span class="line-through">{{voyagetask.name}}</span>

Please or to participate in this conversation.