From b39bb958cc44511c3590e832f77cebdf70616b8c Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 21 Oct 2023 12:38:19 +0200 Subject: [PATCH] Improve diff tree spacing (#27714) 1. Un-indent top-level items, matching GitHub rendering 2. Increase item padding and add 1px gap between items Before and After: Screenshot 2023-10-20 at 18 37 32 Screenshot 2023-10-20 at 18 40 46 --------- Co-authored-by: 6543 --- web_src/js/components/DiffFileTree.vue | 10 +++++++++- web_src/js/components/DiffFileTreeItem.vue | 11 +++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/web_src/js/components/DiffFileTree.vue b/web_src/js/components/DiffFileTree.vue index 6136f7b94..3686629df 100644 --- a/web_src/js/components/DiffFileTree.vue +++ b/web_src/js/components/DiffFileTree.vue @@ -126,7 +126,7 @@ export default { }; + diff --git a/web_src/js/components/DiffFileTreeItem.vue b/web_src/js/components/DiffFileTreeItem.vue index 553ab1464..22c23f3ca 100644 --- a/web_src/js/components/DiffFileTreeItem.vue +++ b/web_src/js/components/DiffFileTreeItem.vue @@ -58,11 +58,14 @@ a, a:hover { } .sub-items { - padding-left: 9px; + display: flex; + flex-direction: column; + gap: 1px; + padding-left: 8px; } -.item-file { - margin-left: 20px; +.sub-items .item-file { + padding-left: 24px; } .item-file.selected { @@ -80,7 +83,7 @@ a, a:hover { display: flex; align-items: center; gap: 0.25em; - padding: 2px; + padding: 3px 6px; } .item-file:hover,