Following up here as Mike asked in the PR, now that the 6.1beta is out.
We (Fellows) have two concerns about ingesting the djangoproject.com CSS into Django, and then I (Natalia) have a proposal to look at the opposite direction.
1. Licensing/provenance. The current website CSS styling was contributed as an in-kind donation, and that donation does not cover/include shipping the CSS inside Django’s source tree/released artifacts. This is the same hesitation @bmispelon raised earlier in the thread, and I don’t think we can wave it away.
2. Maintenance. A copy of the compiled CSS in django/django would drift from its source. Realistically we wouldn’t keep it in sync, and we’d recreate the exact staleness this ticket is about, just against a newer baseline.
3. A different direction (my strong preference). I’d rather drop our bespoke local theme entirely and adopt the Read the Docs theme, instead of ingesting the production CSS. Adopting sphinx-rtd-theme fixes exactly what the ticket is about (the current local theme has usability problems, is missing semantically-important styles, and has no dark mode), with zero licensing risk and zero sync burden, since it’s maintained by its own community.
Worth making explicit why this is safe
docs.djangoproject.com doesn't use the Sphinx HTML theme at all. It consumes the JSON builder output and applies the site's own templates and styles, so docs/_theme/djangodocs/ only affects local and RTD preview builds therefore production is unaffected by whatever we pick there. The custom directives emit their HTML from docs/_ext/djangodocs.py regardless of theme, so switching themes doesn't change the content the site ingests.
There’s a second benefit I care about: it removes the confusion. Right now local looks a little somehow like the website but not quite, and that near-match is what trips authors up (IMHO). Adopting something clearly different, and equal to a widely known theme, sets clear expectations: contributors know they’re previewing in a standard Sphinx theme, not a stand-in for docs.djangoproject.com. A maintained theme with clear admonition boxes would also have surfaced the versionchanged issue that Mike raised.
The one genuinely functional piece in our django theme is the ~46-line pure-CSS console-tabs stylesheet, which we can keep as a small supplemental stylesheet on top of the base theme.
@medmunds I really appreciate the work in PR #21416 but I’d love to redirect that toward adopting sphinx-rtd-theme (or another well known and well maintained theme), which gets us the same benefit on a foundation we can actually sustain.