Skip to content

Commit 8126a83

Browse files
Reintro vertical table lines + hover state (#2653)
1 parent 210c432 commit 8126a83

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

.changeset/tame-worms-march.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'gitbook': minor
3+
---
4+
5+
Improve readability of tables with hover style and vertical dividers

packages/gitbook/src/components/DocumentView/Table/table.module.css

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,37 @@
2727
}
2828

2929
.columnHeader {
30-
@apply text-sm font-medium py-3 px-4 text-tint-900;
30+
@apply text-sm font-medium py-2 px-4 text-tint-900;
3131
}
3232

3333
:global(.dark) .columnHeader {
3434
@apply text-white;
3535
}
3636

3737
.row {
38-
@apply flex border-tint-700/2;
38+
@apply flex border-tint-700/2 hover:bg-tint-700/2 transition-colors;
3939
}
4040

4141
:global(.dark) .row {
4242
@apply border-tint-300/3;
4343
}
4444

4545
.rowGroup {
46-
@apply flex flex-col border rounded-lg bg-tint-800/1 border-tint-700/2;
46+
@apply flex flex-col border rounded-lg bg-tint-800/1 border-tint-700/2 mb-1;
4747
}
4848

4949
:global(.dark) .rowGroup {
5050
@apply bg-tint-300/2 border-tint-300/3;
5151
}
5252

5353
.cell {
54-
@apply flex-1 align-middle border-dark/2 py-2 px-4 text-sm;
54+
@apply flex-1 align-middle border-tint-700/2 py-2 px-4 text-sm relative;
55+
}
56+
57+
.cell:not(:last-child) {
58+
@apply border-r;
5559
}
5660

5761
:global(.dark) .cell {
58-
@apply border-light/2;
62+
@apply border-tint-300/3;
5963
}

0 commit comments

Comments
 (0)