python / python-docs-theme

Sphinx theme for Python documentation
Other
74 stars 58 forks source link

Add colour to version change directives #185

Closed hugovk closed 4 months ago

hugovk commented 4 months ago

Similar to the sidebars in PEP 7 and PEP 8, we can add coloured sidebars and text to the version change directives.

Dark theme

image

Light theme

image

Accessibility check

versionremoved

I also pre-emptively applied the red styling for the versionremoved directive, which will be released in the next Sphinx 7.3.0 (https://github.com/sphinx-doc/sphinx/pull/11905).

Comparison with other themes

This is similar to how the Awesome theme does it.

These themes also add a background colour:

And Nefertiti for Sphinx adds a coloured box around it.