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

enable_default_pandas_dataframe_styling to enable dark mode #35

Closed
timvink opened this issue Jul 15, 2020 · 0 comments · Fixed by #37
Closed

enable_default_pandas_dataframe_styling to enable dark mode #35

timvink opened this issue Jul 15, 2020 · 0 comments · Fixed by #37

Comments

@timvink
Copy link
Contributor

timvink commented Jul 15, 2020

Hi @greenape, great plugin and super useful !

I'm using mkdocs-material theme with this plugin, setting enable_default_pandas_dataframe_styling: true. Works and looks great in light mode, but in dark mode (recently introduced in mkdocs-material) it does not render nicely:

image

image

This can be solved by using the CSS prefers-color-scheme media feature, basically adding a

@media (prefers-color-scheme: dark) {
   ...
}

section to mknotebooks/templates/pandas-dataframe.css. This is the same way how mkdocs-material implemented their dark mode).

I'd also be willing to give a PR try if you want, let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant