2 ms·
How do you guys manage DarkMode in Tailwind ?. using dark:bg-xxx or are there any better way ?
by isanjay 4y ago
How do you guys manage DarkMode in Tailwind ?. using dark:bg-xxx or are there any better way ?
- agloe_dreams 4y agoThere’s fundamentally two ways. First is what you just stated with the modifier. The second way is to redefine the colors with CSS vars and then write a normal CSS media class that re-wires what var means what color.
- 5Qn8mNbc2FNCiVV 4y agoThat's what I would do and use the dark: classes for adding borders and other styles that make dark themes work. F.e. shadows and floating cards doesn't really work with dark themes but does with light colors.