From d1d9c00af2a5d10f3f41893a61f592de90b3c040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Fri, 18 Aug 2023 17:11:52 +0200 Subject: [PATCH] fix(theme-common): ThemedComponent should display something when JS is disabled (#9243) --- .../src/theme/DocPage/Layout/styles.module.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/styles.module.css b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/styles.module.css index 3cc2c95bdd7f..e5435c64edd7 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/styles.module.css +++ b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/styles.module.css @@ -15,3 +15,11 @@ display: flex; flex: 1 0 auto; } + +/* +JS disabled??? Show light version by default => better than showing nothing +TODO bad, but we currently always show light mode when there's no data-theme + */ +html:not([data-theme]) .themedComponent--light { + display: initial; +}