Simple question but I cannot find / figure it our by trying different syntax.
Working in vue and need to apply multiple styles (with tailwindcss). One style works nicely and below code validates but only the last style text-red-300 for show` is applied somehow.
:class="{ ['bg-green-500, text-xs, text-red-300']: show, 'ml-12': !show }"
>Solution :
Just drop the array brackets and the commas:
:class="{
'bg-green-500 text-xs text-red-300': show,
'ml-12': !show
}"