Skip to content

Commit c3f916c

Browse files
committed
Fix: Hybrid theme detection for VS Code and Colab
1 parent d12ba3d commit c3f916c

File tree

4 files changed

+367
-359
lines changed

4 files changed

+367
-359
lines changed

bigframes/display/table_widget.css

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@
4343
box-sizing: border-box;
4444
}
4545

46-
/* Dark Mode Overrides via Media Query */
46+
/* Dark Mode Overrides:
47+
* 1. @media (prefers-color-scheme: dark) - System-wide dark mode
48+
* 2. .bigframes-dark-mode - Explicit class for VSCode theme detection
49+
* 3. html[theme="dark"], body[data-theme="dark"] - Colab/Pantheon manual override
50+
*/
4751
@media (prefers-color-scheme: dark) {
4852
.bigframes-widget.bigframes-widget {
4953
--bf-bg: var(--vscode-editor-background, #202124);
@@ -59,8 +63,9 @@
5963
}
6064
}
6165

62-
/* Dark Mode Overrides via Explicit Class */
63-
.bigframes-widget.bigframes-dark-mode.bigframes-dark-mode {
66+
.bigframes-widget.bigframes-dark-mode.bigframes-dark-mode,
67+
html[theme='dark'] .bigframes-widget.bigframes-widget,
68+
body[data-theme='dark'] .bigframes-widget.bigframes-widget {
6469
--bf-bg: var(--vscode-editor-background, #202124);
6570
--bf-border-color: #444;
6671
--bf-error-bg: #511;
@@ -230,4 +235,4 @@
230235

231236
.bigframes-widget .debug-info {
232237
border-top: 1px solid var(--bf-border-color);
233-
}
238+
}

0 commit comments

Comments
 (0)