Skip to content

Dark mode: topic background colour not applied in Sphinx 6.2.0 #132

Description

@hugovk

Currently the 3.12 docs are built with Sphinx 4.5.0 (it's shown in the page footer) and 3.13 with Sphinx 6.2.0.

Compare these pages in dark mode:

Python 3.12 / Sphinx 4.5.0 Python 3.13 / Sphinx 6.2.0
imageimage

Looks fine in light mode:

Python 3.12 / Sphinx 4.5.0 Python 3.13 / Sphinx 6.2.0
imageimage

Previously, we had this CSS from pydoctheme_dark.css applied to <div class="contents local topic" id="contents">:

div.topic,div.note {
background-color:rgba(255,255,255,0.1);
border-color: currentColor;
}

But now the HTML structure has changed to <nav class="contents local" id="contents"> so the CSS doesn't apply.

The source RST:

.. contents::
:depth: 1
:local:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions