Skip to content

Conversation

@benbovy
Copy link
Member

@benbovy benbovy commented May 26, 2025

Jupyterlab (custom dark theme)


Main branch:

Screenshot 2025-05-26 at 09 03 35



This PR:

Screenshot 2025-05-26 at 08 58 13

Xarray documentation (dark mode)


Main branch:

Screenshot 2025-05-26 at 12 07 19



This PR:

Screenshot 2025-05-26 at 11 55 44

Comment on lines +51 to +54
html[data-theme="dark"] div.cell_output .text_html:has(div.xr-wrap) {
background-color: var(--pst-color-on-background) !important;
color: var(--pst-color-text-base) !important;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workaround is only for Xarray's documentation.

Xarray object reprs won't be better displayed in 3rd-party documentations using Pydata Sphinx Theme until pydata/pydata-sphinx-theme#2189 is fixed.

@benbovy benbovy merged commit 50d0009 into pydata:main May 30, 2025
32 checks passed
@benbovy benbovy deleted the improve-html-repr-dark-mode branch May 30, 2025 08:35
dcherian added a commit to dcherian/xarray that referenced this pull request May 30, 2025
* main:
  Fix performance regression in interp from pydata#9881 (pydata#10370)
  html repr: improve style for dropdown sections (pydata#10354)
  Grouper tweaks. (pydata#10362)
  Docs: Add links to getting help mermaid diagram (pydata#10324)
  Enforce ruff/flynt rules (FLY) (pydata#10375)
  Add missing AbstractWritableDataStore base methods and arguments (pydata#10343)
  Improve html repr in dark mode (Jupyterlab + Xarray docs) (pydata#10353)
  Pin Mypy to 1.15 (pydata#10378)
  use numpy dtype exposed by zarr array instead of metadata.data_type (pydata#10348)
  Fix doc typo for caption "Interoperability" (pydata#10374)
  Implement cftime vectorization as discussed in PR pydata#8322 (pydata#8324)
  Enforce ruff/flake8-pyi rules (PYI) (pydata#10359)
  Apply assorted ruff/Pylint rules (PL) / Enforce PLE rules (pydata#10366)
  (fix): pandas extension array repr for int64[pyarrow] (pydata#10317)
  Enforce ruff/flake8-implicit-str-concat rules (ISC) (pydata#10368)
  Enforce ruff/refurb rules (FURB) (pydata#10367)
  Ignore ruff/Pyflakes rule F401 more precisely (pydata#10369)
  Apply assorted ruff/flake8-simplify rules (SIM) (pydata#10364)
  Apply assorted ruff/flake8-pytest-style rules (PT) (pydata#10363)
  Fix "a array" misspelling (pydata#10365)
@scottyhq scottyhq mentioned this pull request Jun 30, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation rendering issues (dark mode)

3 participants