From d019fc63dfa2f1610987889dab956af9fd0fe4a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Fri, 10 Nov 2023 17:46:25 +0100 Subject: [PATCH] fix(theme): fix firefox CSS :has() support bug (#9530) --- .../src/theme/Navbar/Search/styles.module.css | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/Search/styles.module.css b/packages/docusaurus-theme-classic/src/theme/Navbar/Search/styles.module.css index b4e81167aeb2..2ac02325131a 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/Search/styles.module.css +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/Search/styles.module.css @@ -9,8 +9,15 @@ Workaround to avoid rendering empty search container See https://github.com/facebook/docusaurus/pull/9385 */ -.navbarSearchContainer:not(:has(> *)) { - display: none; +/* +TODO temporary @supports check, remove before 2025 +only needed for Firefox < 121 +see https://github.com/facebook/docusaurus/issues/9527#issuecomment-1805272379 + */ +@supports selector(:has(*)) { + .navbarSearchContainer:not(:has(> *)) { + display: none; + } } @media (max-width: 996px) {