Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reintro vertical table lines + hover state #2653

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tame-worms-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'gitbook': minor
---

Improve readability of tables with hover style and vertical dividers
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,37 @@
}

.columnHeader {
@apply text-sm font-medium py-3 px-4 text-tint-900;
@apply text-sm font-medium py-2 px-4 text-tint-900;
}

:global(.dark) .columnHeader {
@apply text-white;
}

.row {
@apply flex border-tint-700/2;
@apply flex border-tint-700/2 hover:bg-tint-700/2 transition-colors;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally I'd apply hover:bg-tint-700/1 dark:hover:bg-tint-700/2 so the dark mode hover color is different than the light-mode, but tailwind doesn't agree. Open to suggestions, otherwise ill look into it later and fix after.

}

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

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

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

.cell {
@apply flex-1 align-middle border-dark/2 py-2 px-4 text-sm;
@apply flex-1 align-middle border-tint-700/2 py-2 px-4 text-sm relative;
}

.cell:not(:last-child) {
@apply border-r;
}

:global(.dark) .cell {
@apply border-light/2;
@apply border-tint-300/3;
}
Loading