This repository has been archived by the owner on Mar 18, 2021. It is now read-only.
This repository has been archived by the owner on Mar 18, 2021. It is now read-only.
Programmatic dynamic classes do not render #17
Open
Description
I started using windicss in a Nuxt project and I have a lot of code like this:
<NuxtLink
v-for="(entry, index) in entries"
:key="index"
:to="entry.url"
class="group flex items-center px-2 py-2 text-sm leading-6 font-normal rounded-md"
:class="selectedClass(entry.url)"
>
...
function selectedClass(url) {
return route.value.path === url
? 'bg-cyan-800 text-white'
: 'text-cyan-100 hover:text-white hover:bg-cyan-600'
}
But the above classes do not get evaluated. What can I do to make this work?
EDIT: I have the most current version of Nuxt with vue-windicss-preprocess added as stated in the documentation.
Metadata
Assignees
Labels
No labels