GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Dark mode: topic background colour not applied in Sphinx 6.2.0 · Issue #132 · python/python-docs-theme

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

New issue
Copy link
New issue
Copy link
Closed
#138
Closed
Dark mode: topic background colour not applied in Sphinx 6.2.0#132
#138
Copy link
Labels
bug

Description

@hugovk
hugovk
opened on Jul 5, 2023
Issue body actions

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:

  • https://docs.python.org/3.12/library/asyncio-task.html
  • https://docs.python.org/3.13/library/asyncio-task.html
Python 3.12 / Sphinx 4.5.0 Python 3.13 / Sphinx 6.2.0
image image

Looks fine in light mode:

Python 3.12 / Sphinx 4.5.0 Python 3.13 / Sphinx 6.2.0
image image

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:

Activity

  1. hugovk
    added
    bug
    help wanted
    on Jul 5, 2023
  2. hugovk
    changed the title [-]Dark mode: topic and note background colour not applying in Sphinx 6.2.0[/-] [+]Dark mode: topic background colour not applied in Sphinx 6.2.0[/+] on Jul 5, 2023
  3. hugovk commented on Jul 7, 2023

    @hugovk
    hugovk
    on Jul 7, 2023
    MemberAuthor
    More actions

    Bisecting the Sphinx releases, this first occurred between Sphinx 5.0.1 and 5.0.2.

    Checking the diff:

    sphinx-doc/sphinx@v5.0.1...v5.0.2

    Which contains this commit: sphinx-doc/sphinx@5806f0a

    Add nav.contents everywhere that div.topic is used

    From this PR: sphinx-doc/sphinx#10535

    Which fixed this issue: sphinx-doc/sphinx#10534

    Which said:

    Previously, docutils produced div.topic for the contents directive, the latest version produces nav.contents.

    This means that those tables of contents change appearance when switching to docutils 0.18.

    So let's try the same fix as sphinx-doc/sphinx@5806f0a.

  4. hugovk commented on Jul 15, 2023

    @hugovk
    hugovk
    on Jul 15, 2023
    MemberAuthor
    More actions

    Another page affected by this:

    • https://docs.python.org/3.12/howto/clinic.html
    • https://docs.python.org/3.13/howto/clinic.html
  5. hugovk commented on Jul 27, 2023

    @hugovk
    hugovk
    on Jul 27, 2023
    MemberAuthor
    More actions

    Please see PR #138 to fix this.

    Reacted by Erlend E. Aasland
  6. hugovk
    removed
    help wanted
    on Jul 27, 2023
  7. hugovk
    closed this as completedin #138on Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.