From what I'm reading in tailwind's docs we'd use something like this to not respect the user's device theme but replace darkMode: ['class'] with darkMode: ['selector']. Then we'd add class='dark' to our html tag and it would then follow all established dark mode rules.
However, since we have the .dark class in globals.css with all the CSS variables, we can just get rid of darkMode: ['class'] and write <html className='dark:dark' in our layout.tsx
I know this can be a lot to read and I'm more than happy to talk about it in voice chat any day :slight_smile:
Are we looking to respect the user's device theme for light mode and dark mode?
Inside our
tailwind.config
file is thedarkMode: ['class]
code.From what I'm reading in tailwind's docs we'd use something like this to not respect the user's device theme but replace
darkMode: ['class']
withdarkMode: ['selector']
. Then we'd addclass='dark'
to ourhtml
tag and it would then follow all established dark mode rules.However, since we have the
.dark
class inglobals.css
with all the CSS variables, we can just get rid ofdarkMode: ['class']
and write<html className='dark:dark'
in ourlayout.tsx
I know this can be a lot to read and I'm more than happy to talk about it in voice chat any day :slight_smile: