This commit is contained in:
Septatrix 2020-03-14 14:54:31 +01:00
parent a34ff848dc
commit a9cc5bf6f3
2 changed files with 13 additions and 0 deletions

View File

@ -63,6 +63,12 @@ Python :mod:`ConfigParser` module) and has the following structure:
highlighting. This can be overridden by the user in the highlighting. This can be overridden by the user in the
:confval:`pygments_style` config value. :confval:`pygments_style` config value.
* The **pygments_dark_style** setting gives the name of a Pygments style to use
for highlighting when the CSS media query ``(prefers-color-scheme: dark)``
evaluates to true. It is injected into the page using
:meth:`~Sphinx.add_css_file()`. This can be overriden by the user in the
:confval:`html_pygments_dark_style` config value.
* The **sidebars** setting gives the comma separated list of sidebar templates * The **sidebars** setting gives the comma separated list of sidebar templates
for constructing sidebars. This can be overridden by the user in the for constructing sidebars. This can be overridden by the user in the
:confval:`html_sidebars` config value. :confval:`html_sidebars` config value.

View File

@ -939,6 +939,13 @@ that use Sphinx's HTMLWriter class.
The image file will be copied to the ``_static`` directory of the output The image file will be copied to the ``_static`` directory of the output
HTML, but only if the file does not already exist there. HTML, but only if the file does not already exist there.
.. confval:: html_pygments_dark_style
The style name to use for an additional Pygments stylesheet similar to
:confval:`pygments_style` . If not set and the theme defines a default
``'pygments_dark_style'`` it will be used, otherwise no additional style
will be generated. See :doc:`/usage/theming` for further information.
.. confval:: html_css_files .. confval:: html_css_files
A list of CSS files. The entry must be a *filename* string or a tuple A list of CSS files. The entry must be a *filename* string or a tuple