Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bernig opened this issue Feb 25, 2023 · 1 comment · Fixed by #32
Closed

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

bernig opened this issue Feb 25, 2023 · 1 comment · Fixed by #32
Assignees
Labels
bug Something isn't working

Comments

@bernig
Copy link

bernig commented Feb 25, 2023

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?

@dniccum dniccum added the bug Something isn't working label Feb 28, 2023
@dniccum dniccum self-assigned this Feb 28, 2023
@dm-pf
Copy link
Contributor

dm-pf commented Mar 7, 2023

@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:

  • Nova using light theme & nova-documentation displaying text as if dark theme was applied (because OS set to dark mode). This is what happens in the screenshot provided above by @bernig
  • Nova using dark theme & nova-documentation displaying text as if light theme was applied (because OS set to light mode)

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\']'],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants