diff --git a/CHANGES.rst b/CHANGES.rst index d66004db..6ba08bf9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,8 @@ Unreleased ---------- - Added `MyST-NB`_, for rendering Jupyter notebooks - Added `JupySQL`_, for running SQL in Jupyter/IPython +- MyST-NB: Fixed dark mode for tables in Jupyter Notebooks. + Thank you, @surister and @msbt. .. _JupySQL: https://jupysql.ploomber.io/ .. _MyST-NB: https://myst-nb.readthedocs.io/ diff --git a/src/crate/theme/rtd/crate/static/css/custom.css b/src/crate/theme/rtd/crate/static/css/custom.css index c248357d..2064c4f4 100644 --- a/src/crate/theme/rtd/crate/static/css/custom.css +++ b/src/crate/theme/rtd/crate/static/css/custom.css @@ -1843,3 +1843,14 @@ html .sd-tab-set > label:hover { max-width: 100%; } } + +/* +Fix dark mode for tables in Jupyter Notebooks rendered by MyST-NB. +https://github.com/crate/crate-docs-theme/pull/566 +*/ +div.cell_output table { + color: var(--color-content-foreground); +} +div.cell_output tbody tr:nth-child(2n+1) { + background: var(--color-background-hover); +}