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_47 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.
| 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"]).
antonwolfy
left a comment
There was a problem hiding this comment.
Thank you @vlad-perevezentsev, LGTM!
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