-
Notifications
You must be signed in to change notification settings - Fork 890
Tailwind CSS dark mode variants not working in the newest version #100
Copy link
Copy link
Open
Description
Bug Description
Standard Tailwind CSS dark mode variants are not working with built-in color utilities when using PrimeNG with Tailwind CSS v4.
Expected Behavior
Standard Tailwind dark mode classes should work as expected:
bg-blue-50 dark:bg-blue-500should switch background colors in light/dark modetext-red-600 dark:text-red-100should switch text colors in light/dark mode
Current Behavior
bg-green-50 dark:bg-green-500- colors do not switch in dark/light modebg-red-50 dark:bg-red-500- colors do not switch in dark/light modetext-red-600 dark:text-red-100- text colors do not switch in dark/light mode
However, PrimeNG surface utilities work correctly:
bg-surface-900 dark:bg-surface-0- ✅ works perfectly
Code example of the code that is not working as before
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="bg-blue-50 dark:bg-blue-500 p-4 rounded-lg text-center">
<div class="text-2xl font-bold text-blue-600 dark:text-blue-100">{{ currentFormTypes.length }}</div>
<div class="text-sm font-medium text-blue-800 dark:text-blue-200">{{ 'typeSoumission.totalForms' | translate }}</div>
</div>
<div class="bg-green-50 dark:bg-green-500 p-4 rounded-lg text-center">
<div class="text-2xl font-bold text-green-600 dark:text-green-100">{{ getActiveFormTypesCount() }}</div>
<div class="text-sm font-medium text-green-800 dark:text-green-200">{{ 'typeSoumission.activeForms' | translate }}</div>
</div>
<div class="bg-red-50 dark:bg-red-500 p-4 rounded-lg text-center">
<div class="text-2xl font-bold text-red-600 dark:text-red-100">{{ getInactiveFormTypesCount() }}</div>
<div class="text-sm font-medium text-red-800 dark:text-red-200">{{ 'typeSoumission.inactiveForms' | translate }}</div>
</div>
</div>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels