Skip to content
This repository was archived by the owner on May 7, 2026. It is now read-only.

Commit 89b84b3

Browse files
committed
style: Implement zebra striping and remove hover effects in TableWidget
1 parent 0a350cc commit 89b84b3

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

bigframes/display/table_widget.css

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,11 @@
8484
text-align: left;
8585
}
8686

87+
/* Light Mode Header: Light Gray */
8788
.bigframes-widget th {
8889
background-color: var(
8990
--colab-primary-surface-color,
90-
var(--jp-layout-color0, var(--vscode-editor-background, white))
91+
var(--jp-layout-color0, var(--vscode-editor-background, #f5f5f5))
9192
);
9293
padding: 0;
9394
position: sticky;
@@ -96,14 +97,25 @@
9697
z-index: 1;
9798
}
9899

99-
/* Ensure rows have a background to override external striping if needed */
100-
.bigframes-widget table tbody tr {
100+
.bigframes-widget td {
101+
padding: 0.5em;
102+
}
103+
104+
/* Light Mode Stripes: Odd = White, Even = Light Gray */
105+
.bigframes-widget table tbody tr:nth-child(odd) td {
101106
background-color: var(
102107
--colab-primary-surface-color,
103108
var(--jp-layout-color0, var(--vscode-editor-background, white))
104109
);
105110
}
106111

112+
.bigframes-widget table tbody tr:nth-child(even) td {
113+
background-color: var(
114+
--colab-primary-surface-color,
115+
var(--jp-layout-color0, var(--vscode-editor-background, #f5f5f5))
116+
);
117+
}
118+
107119
.bigframes-widget .bf-header-content {
108120
box-sizing: border-box;
109121
height: 100%;
@@ -159,18 +171,6 @@
159171
color: gray;
160172
}
161173

162-
.bigframes-widget td {
163-
padding: 0.5em;
164-
}
165-
166-
.bigframes-widget tr:hover td,
167-
.bigframes-widget td.row-hover {
168-
background-color: var(
169-
--colab-hover-surface-color,
170-
var(--jp-layout-color2, var(--vscode-list-hoverBackground, #f5f5f5))
171-
);
172-
}
173-
174174
@media (prefers-color-scheme: dark) {
175175
.bigframes-widget .footer,
176176
.bigframes-widget table {
@@ -184,15 +184,23 @@
184184
);
185185
}
186186

187+
/* Dark Mode Header: Black or Theme Background */
187188
.bigframes-widget th {
189+
background-color: var(
190+
--colab-primary-surface-color,
191+
var(--jp-layout-color0, var(--vscode-editor-background, black))
192+
);
193+
}
194+
195+
/* Dark Mode Stripes: Odd = Charcoal (#383838), Even = Dark Gray (#202124) */
196+
.bigframes-widget table tbody tr:nth-child(odd) td {
188197
background-color: var(
189198
--colab-primary-surface-color,
190199
var(--jp-layout-color0, var(--vscode-editor-background, #383838))
191200
);
192201
}
193202

194-
/* Force dark background on rows to override white stripes from external CSS */
195-
.bigframes-widget table tbody tr {
203+
.bigframes-widget table tbody tr:nth-child(even) td {
196204
background-color: var(
197205
--colab-primary-surface-color,
198206
var(--jp-layout-color0, var(--vscode-editor-background, #202124))
@@ -208,12 +216,4 @@
208216
.bigframes-widget .null-value {
209217
color: #aaa;
210218
}
211-
212-
.bigframes-widget tr:hover td,
213-
.bigframes-widget td.row-hover {
214-
background-color: var(
215-
--colab-hover-surface-color,
216-
var(--jp-layout-color2, var(--vscode-list-hoverBackground, #444))
217-
);
218-
}
219219
}

0 commit comments

Comments
 (0)