Skip to content

Commit

Permalink
MyST-NB: Fix dark mode for tables in Jupyter Notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Jan 24, 2025
1 parent dadd00a commit 6dc0039
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
11 changes: 11 additions & 0 deletions src/crate/theme/rtd/crate/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 6dc0039

Please sign in to comment.