rawilk / laravel-form-components

Form components built for Tailwind & Livewire.
https://randallwilk.dev/docs/laravel-form-components
MIT License
383 stars 41 forks source link

Provide better dark mode support #93

Closed rawilk closed 1 year ago

rawilk commented 1 year ago

This PR introduces a Tailwind plugin which will provide better dark mode support than the dark-mode.css file currently does. It will work for the following kinds of tailwind configs for the darkMode setting:

module.exports = {
    darkMode: 'media',
};
module.exports = {
    darkMode: 'class',
};
module.exports = {
    darkMode: ['class', '.is-dark'],
};

The dark-mode.css class is getting removed in this PR, and any other references to dark mode in any css file will also be removed. Essentially, dark mode will be opt-in.