diff --git a/doc/css/theme_overrides.css b/doc/css/theme_overrides.css index 74cedc1b..5d0bc476 100644 --- a/doc/css/theme_overrides.css +++ b/doc/css/theme_overrides.css @@ -19,9 +19,14 @@ body { } /* Make the search bar query text readable in dark theme. */ -body:not([data-theme="light"]) { +body[data-theme="dark"] { --color-sidebar-search-foreground: white; } +@media (prefers-color-scheme: dark) { + body[data-theme="auto"] { + --color-sidebar-search-foreground: white; + } +} .schema-small { font-size: 93%;