From 602a6a92c2f4d8f3417008e18a58e9d6bbfe1fdc Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 10 Mar 2024 20:28:59 +0100 Subject: [PATCH 1/2] Improve CSV rendering (#29638) Before: Screenshot 2024-03-06 at 21 42 17 After: Screenshot 2024-03-06 at 21 41 58 --- web_src/css/repo.css | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/web_src/css/repo.css b/web_src/css/repo.css index d60fb4db21..03d9664331 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -1420,6 +1420,7 @@ .repository .data-table tr { border-top: 0; + background: none !important; } .repository .data-table td, @@ -1432,6 +1433,21 @@ border: 1px solid var(--color-secondary); } +/* the border css competes with .markup where all tables have outer border which would add a double + border here, remove only the outer borders from this table */ +.repository .data-table tr:first-child :is(td,th) { + border-top: none !important; +} +.repository .data-table tr:last-child :is(td,th) { + border-bottom: none !important; +} +.repository .data-table tr :is(td,th):first-child { + border-left: none !important; +} +.repository .data-table tr :is(td,th):last-child { + border-right: none !important; +} + .repository .data-table td { white-space: pre-line; } @@ -1469,7 +1485,7 @@ min-width: 50px; font-family: monospace; line-height: 20px; - color: var(--color-secondary-dark-2); + color: var(--color-text-light-1); white-space: nowrap; vertical-align: top; cursor: pointer; From f756c3c8d0204601f2a9b3d1990d7c8d9bfbeb45 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Mon, 18 Mar 2024 14:15:27 +0100 Subject: [PATCH 2/2] Do not override the background for `.repository .data-table tr` A previous commit (via gitea#29638) changed the `.repository .data-table .tr` CSS rule to forcibly override the background to `none`. This, in turn, disabled the even-odd row coloring. Doing so should be a preference of the theme used, and should not be enforced by the core CSS rules. This patch removes the override. Signed-off-by: Gergely Nagy --- web_src/css/repo.css | 1 - 1 file changed, 1 deletion(-) diff --git a/web_src/css/repo.css b/web_src/css/repo.css index 03d9664331..0704e7406b 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -1420,7 +1420,6 @@ .repository .data-table tr { border-top: 0; - background: none !important; } .repository .data-table td,