From cdf55e2ae94310f82a4c63161fa006c1c2863c47 Mon Sep 17 00:00:00 2001 From: Saran Tunyasuvunakool Date: Wed, 8 Nov 2023 08:45:13 -0800 Subject: [PATCH] Do not override search bar text color when data-theme="auto" in light mode. PiperOrigin-RevId: 580546595 Change-Id: If39cd937e9288c860b8b713911f0ef5114aee5f5 --- doc/css/theme_overrides.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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%;