Skip to content

A platform for community discussion. Free, open, simple.

UX: Use 1px lines instead of 2px for nested replies vertical lines (#41029)

Mark VanLandingham8127144a5d8a
diff --git a/app/assets/stylesheets/common/nested-view.scss b/app/assets/stylesheets/common/nested-view.scss
index 44bdc0e3fab..6fbf210192f 100644
--- a/app/assets/stylesheets/common/nested-view.scss
+++ b/app/assets/stylesheets/common/nested-view.scss
@@ -386,7 +386,9 @@
--nested-line-offset: calc(
var(--nested-connector-offset) + var(--nested-avatar-size) / 2
);
- --nested-load-more-left-adjust: 2px;
+ --nested-line-width: 1px;
+ --nested-line-center-adjust: 0.5px;
+ --nested-load-more-left-adjust: var(--nested-line-width);
// Grid splits article (row 1) from children (row 2) so the gutter's
// depth-line naturally stops at the article bottom.
@@ -410,8 +412,8 @@
height: calc(
var(--nested-vertical-gap) + var(--nested-avatar-size) / 2 + 5px // +5px visually centers the hook on the avatar
);
- border-left: 2px solid var(--primary-low);
- border-bottom: 2px solid var(--primary-low);
+ border-left: var(--nested-line-width) solid var(--primary-low);
+ border-bottom: var(--nested-line-width) solid var(--primary-low);
border-radius: 0 0 0 12px;
transition: border-color 0.15s ease;
}
@@ -431,7 +433,7 @@
var(--nested-vertical-gap) + var(--nested-avatar-size) / 2 + 1px - 10px
);
bottom: 0;
- width: 2px;
+ width: var(--nested-line-width);
background: var(--primary-low);
transition: background-color 0.15s ease;
}
@@ -522,8 +524,8 @@
left: calc(var(--nested-avatar-size) / 2);
top: 6px;
bottom: 0;
- width: 2px;
- border-radius: 1px;
+ width: var(--nested-line-width);
+ border-radius: var(--nested-line-center-adjust);
background: var(--primary-low);
transition: background-color 0.15s ease;
}
@@ -591,8 +593,8 @@
width: calc(var(--nested-avatar-size) / 2);
transform: none;
background: none;
- border-left: 2px solid var(--primary-low);
- border-bottom: 2px solid var(--primary-low);
+ border-left: var(--nested-line-width) solid var(--primary-low);
+ border-bottom: var(--nested-line-width) solid var(--primary-low);
border-radius: 0 0 0 12px;
transition: border-color 0.15s ease;
}
@@ -632,7 +634,7 @@
&__depth-line-icon {
position: absolute;
bottom: 0;
- left: calc(50% + 1px);
+ left: calc(50% + var(--nested-line-center-adjust));
transform: translateX(-50%);
z-index: 1;
display: flex;
@@ -969,8 +971,8 @@
top: -1em;
height: calc(50% + 1em);
width: var(--nested-line-offset);
- border-left: 2px solid var(--primary-low);
- border-bottom: 2px solid var(--primary-low);
+ border-left: var(--nested-line-width) solid var(--primary-low);
+ border-bottom: var(--nested-line-width) solid var(--primary-low);
border-radius: 0 0 0 12px;
transition: border-color 0.15s ease;
}
@@ -1304,7 +1306,9 @@
pointer-events: auto;
&::after {
- left: calc(var(--nested-mobile-line-offset) - 1px);
+ left: calc(
+ var(--nested-mobile-line-offset) - var(--nested-line-center-adjust)
+ );
top: 0;
bottom: 0;
}
@@ -1313,9 +1317,11 @@
&--collapsed::after {
border: none;
background: var(--primary-low);
- width: 2px;
+ width: var(--nested-line-width);
border-radius: 0;
- left: calc(var(--nested-mobile-line-offset) - 1px);
+ left: calc(
+ var(--nested-mobile-line-offset) - var(--nested-line-center-adjust)
+ );
bottom: 0;
}
}