dniccum / nova-documentation

A Laravel Nova tool that allows you to add markdown-based documentation to your administrator's dashboard.
MIT License
37 stars 15 forks source link

The style doesn't play well with the Nova light theme #30

Closed bernig closed 1 year ago

bernig commented 1 year ago

Capture d’écran du 2023-02-25 21-26-07

A solution would be to allow us to override the CSS through artisan vendor:publish?

dm-pf commented 1 year ago

@dniccum this is still broken even after your PR #32 because you're setting darkMode:media.

Using darkMode:media in tailwind will ignore the theme already preselected in Nova so you end up with:

We should instead rely on manually triggered dark mode in tailwind by simply setting darkMode:class.

Nova already sets 'dark' class in the body so everything nova-documentation related should work by default.

Because you're using a tailwind prefix, darkMode:class will not work by default. A hackish workaround that we found works for us, and does not require extra js, is: darkMode: ['class', 'html[class~=\'dark\']'],