I using Laravel Framework 10.43.0. and installing Laravel Breeze and answer yes when support Dark Mode.
How can I change to light mode?
I have try to put darkMode: ‘class’ in tailwind.config.js but it didn’t work.
This is my tailwind.config.js
export default {
content: [
"./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php",
"./storage/framework/views/*.php",
"./resources/views/**/*.blade.php",
],
theme: {
extend: {
fontFamily: {
sans: ["Figtree", ...defaultTheme.fontFamily.sans],
},
},
},
plugins: [forms],
darkMode: "class",
};
2
Answers
Change darkMode: "class" to darkMode: ‘false’. It worked for me.
ensure that the class name
dark
is not applied earlier in the html ( in any parent element).darkMode: "class",
should make your app light mode unlessdark
class is applied .You may also want to remove anything which contains the following like
@media (prefers-color-scheme: dark) {...}
e.g. in defaule welcome.blade.php file
you may remove