Refresh documentation styling with Furo theme#2934
Conversation
|
View rendered docs @ https://intelpython.github.io/dpnp/pull/2934/index.html |
|
Array API standard conformance tests for dpnp=0.21.0dev1=py313h509198e_40 ran successfully. |
| } | ||
|
|
||
| /* Dark mode */ | ||
| @media (prefers-color-scheme: dark) { |
There was a problem hiding this comment.
The dark-mode blocks only override table colors. The hardcoded background-color: #f5f5f5 on dd p.rubric / .admonition-title (line 40) is not overridden in dark mode → light text on a near-white background = unreadable section headers and admonition titles.
An an option we can either add matching dark-mode overrides, or better, use furo CSS variables (e.g. --color-background-secondary) which auto-adapt and would let you delete the duplicated dark-mode block entirely.
| "sphinxcontrib.spelling", | ||
| ] | ||
|
|
||
| copybutton_prompt_text = ">>> " |
There was a problem hiding this comment.
copybutton_prompt_text = ">>> " handles only >>>. Multi-line doctest blocks with ... continuation lines (see dpnp.where for an example) will copy with the ... prompts left in.
It would be better to cover ... also, as an option through:
| copybutton_prompt_text = ">>> " | |
| copybutton_prompt_text = r">>> |\.\.\. " | |
| copybutton_prompt_is_regexp = True | |
| return; | ||
|
|
||
| var firstP = paragraphs[0]; | ||
| var idx = firstP.innerHTML.indexOf(separator); |
There was a problem hiding this comment.
If the separator appears inside an HTML tag/attribute (e.g. a title= with an en dash), substring splits mid-tag and corrupts markup. Locating the boundary via textContent (or DOM walking) might be safer.
| } | ||
|
|
||
| /* Dark mode */ | ||
| @media (prefers-color-scheme: dark) { |
There was a problem hiding this comment.
@media (prefers-color-scheme: dark) table rules (lines 77–84) still apply if the OS is dark but the user toggles furo to light. Furo's own CSS gates these with body:not([data-theme="light"]).
| # further. For a list of options available for each theme, see the | ||
| # documentation. | ||
| # | ||
| # html_theme_options = {} |
This PR proposes a refresh of
dpnp documentationstyling and layout by migrating to thefurotheme and improving the overall API documentation appearancesphinx_rtd_themewithfuropyproject.toml,building_docs.yml andbase_build_docs.txtdpnp logo (
dpnp.svg) will be added in the future