From 69e0e992c0e1e341466be02ad1abb308498dae85 Mon Sep 17 00:00:00 2001 From: Viktor Renkema Date: Fri, 20 Dec 2024 09:12:01 +0100 Subject: [PATCH 1/3] Reintro vertical table lines + hover state --- .../components/DocumentView/Table/table.module.css | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/gitbook/src/components/DocumentView/Table/table.module.css b/packages/gitbook/src/components/DocumentView/Table/table.module.css index 7963ebd5f..4529cd5b8 100644 --- a/packages/gitbook/src/components/DocumentView/Table/table.module.css +++ b/packages/gitbook/src/components/DocumentView/Table/table.module.css @@ -27,7 +27,7 @@ } .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 { @@ -35,7 +35,7 @@ } .row { - @apply flex border-tint-700/2; + @apply flex border-tint-700/2 hover:bg-tint-700/2 transition-colors; } :global(.dark) .row { @@ -43,7 +43,7 @@ } .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 { @@ -51,9 +51,9 @@ } .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; } -:global(.dark) .cell { - @apply border-light/2; +.cell:not(:last-child) { + @apply border-r; } From baa51a4063837771be7f4df52719d10e3e325ff8 Mon Sep 17 00:00:00 2001 From: Viktor Renkema Date: Sun, 22 Dec 2024 11:00:46 +0100 Subject: [PATCH 2/3] Changeset --- .changeset/tame-worms-march.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/tame-worms-march.md diff --git a/.changeset/tame-worms-march.md b/.changeset/tame-worms-march.md new file mode 100644 index 000000000..5bd25843d --- /dev/null +++ b/.changeset/tame-worms-march.md @@ -0,0 +1,5 @@ +--- +'gitbook': minor +--- + +Improve readability of tables with hover style and vertical dividers From 482a0a97989fde23f53cb3f5acad295078887f0d Mon Sep 17 00:00:00 2001 From: Viktor Renkema Date: Mon, 23 Dec 2024 09:44:27 +0100 Subject: [PATCH 3/3] Fix inconsistent colors --- .../src/components/DocumentView/Table/table.module.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/gitbook/src/components/DocumentView/Table/table.module.css b/packages/gitbook/src/components/DocumentView/Table/table.module.css index 4529cd5b8..1421b0eac 100644 --- a/packages/gitbook/src/components/DocumentView/Table/table.module.css +++ b/packages/gitbook/src/components/DocumentView/Table/table.module.css @@ -57,3 +57,7 @@ .cell:not(:last-child) { @apply border-r; } + +:global(.dark) .cell { + @apply border-tint-300/3; +}