Skip to content

Commit 1373783

Browse files
fixed some bugs related to theme
1 parent b6e0c6c commit 1373783

File tree

3 files changed

+20
-21
lines changed

3 files changed

+20
-21
lines changed

src/css/custom.css

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -181,16 +181,16 @@
181181
color: transparent;
182182
}
183183

184-
/* Light mode background and text fix */
185-
[data-theme='light'] {
184+
/* Light mode background and text fix - EXCLUDE community page */
185+
[data-theme='light'] body:not(:has(.community-page)) {
186186
--ifm-background-color: #ffffff; /* white background */
187187
--ifm-font-color-base: #000000; /* black text */
188188
background-color: var(--ifm-background-color);
189189
color: var(--ifm-font-color-base);
190190
}
191191

192-
/* Dark mode overrides (already there, ensure it's working) */
193-
[data-theme='dark'] {
192+
/* Dark mode overrides - EXCLUDE community page */
193+
[data-theme='dark'] body:not(:has(.community-page)) {
194194
background-color: var(--dark-bg-primary);
195195
color: var(--dark-text-primary);
196196
}
@@ -357,26 +357,26 @@
357357

358358
/* ===== DOCUSAURUS DOCUMENTATION PAGES DARK THEME ===== */
359359

360-
/* Main documentation layout */
361-
[data-theme='dark'] .main-wrapper {
360+
/* Main documentation layout - EXCLUDE community page */
361+
[data-theme='dark'] body:not(:has(.community-page)) .main-wrapper {
362362
background-color: var(--dark-bg-primary) !important;
363363
color: var(--dark-text-primary) !important;
364364
}
365365

366-
[data-theme='dark'] .docusaurus-wrapper {
366+
[data-theme='dark'] body:not(:has(.community-page)) .docusaurus-wrapper {
367367
background-color: var(--dark-bg-primary) !important;
368368
}
369369

370-
/* Documentation content area */
371-
[data-theme='dark'] .container {
370+
/* Documentation content area - EXCLUDE community page */
371+
[data-theme='dark'] body:not(:has(.community-page)) .container {
372372
background-color: var(--dark-bg-primary) !important;
373373
}
374374

375-
[data-theme='dark'] .row {
375+
[data-theme='dark'] body:not(:has(.community-page)) .row {
376376
background-color: var(--dark-bg-primary) !important;
377377
}
378378

379-
[data-theme='dark'] .col {
379+
[data-theme='dark'] body:not(:has(.community-page)) .col {
380380
background-color: var(--dark-bg-primary) !important;
381381
}
382382

src/pages/badges/github-badges.module.css

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
body{
2-
background-color: #fff;
3-
}
4-
5-
/* Dark theme body override */
6-
[data-theme='dark'] body {
7-
background-color: var(--dark-bg-primary) !important;
8-
color: var(--dark-text-primary) !important;
9-
}
1+
/* GitHub badges page styling - light theme */
102
.github-badges-page {
113
background: #f6f5f5;
124
border-radius: 18px;
@@ -15,6 +7,12 @@ body{
157
margin-top: 24px;
168
}
179

10+
/* Dark theme body override - EXCLUDE community page */
11+
[data-theme='dark'] body:not(:has(.community-page)) {
12+
background-color: var(--dark-bg-primary) !important;
13+
color: var(--dark-text-primary) !important;
14+
}
15+
1816
/* Dark theme for main page container */
1917
[data-theme='dark'] .github-badges-page {
2018
background: var(--dark-bg-secondary) !important;

src/pages/community/community.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
transition: background-color 0.3s ease;
77
}
88

9+
/* Community page should maintain its own background regardless of theme */
910
[data-theme='dark'] .community-page {
10-
background: var(--dark-bg-primary);
11+
background: transparent;
1112
}
1213

1314
/* CSS Custom Properties for better browser support */

0 commit comments

Comments
 (0)