diff --git a/shopdb/core/api/docs.py b/shopdb/core/api/docs.py
index cc266f4e..cbda186b 100644
--- a/shopdb/core/api/docs.py
+++ b/shopdb/core/api/docs.py
@@ -78,22 +78,71 @@ def docs_index():
tryit_note = ''
if _tryit_is_mounted():
tryit_note = (
- '
'
+ '
'
'This page is read-only. To send a real request against this '
'server, use the try-it view.
'
% url_for(_TRYIT_ENDPOINT)
)
+ # DARK MODE. Redoc does not read prefers-color-scheme on its own, and
+ # the element takes no theme - so the page goes through
+ # Redoc.init instead, which does. The app has a dark theme and this was
+ # the one page that stayed white when the rest of the site went dark.
+ #
+ # The page RE-INITIALISES when the OS scheme flips rather than restyling:
+ # Redoc bakes its colours into styled-components at init, so a CSS
+ # override reaches the chrome and misses the content.
page = (
''
'ShopDB API'
''
''
- ''
+ ''
'%s'
- ''
+ ''
''
- '' % (tryit_note, spec_url, redoc_url)
+ ''
+ '