From 55a434c0396e6c5049d2822ccfb4e9d10fb41cb3 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 13 Jul 2024 11:39:55 -0700 Subject: [PATCH] Try to fix search overlay broken by blur --- docs/stylesheets/extra.css | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index 52d13ee45..feefa0b9c 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -14,6 +14,16 @@ --md-default-fg-color: white; } +[data-md-color-scheme="default"] .md-search__inner { + --md-default-fg-color--light: gray; + --md-default-fg-color--lighter: black; + --md-default-bg-color: hsla(0, 0%, 100%, 0.9); +} + +[data-md-color-scheme="default"] .md-search__inner .md-search__input { + color: var(--md-default-fg-color--light); +} + [data-md-toggle="search"]:not(:checked) ~ .md-header .md-search__form::after { position: absolute; top: 0.3rem; @@ -152,6 +162,12 @@ body[data-md-color-scheme="default"] { -webkit-backdrop-filter: blur(16px); } +.md-header:has(.md-search-result__item), +.md-header:has(.md-search__input.focus-visible) { + backdrop-filter: none !important; + -webkit-backdrop-filter: none !important; +} + .md-footer-meta { background-color: transparent; } @@ -212,7 +228,7 @@ body[data-md-color-scheme="default"] { } .md-search__scrollwrap { - background-color: hsla(0, 0%, 0%, 0.3); + background-color: hsla(0, 0%, 0%, 0.8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }