Skip to content

Commit 900316a

Browse files
authored
Fix: Base icon CSS (#4193)
- Fix top margin for unfolded base row - Fix CSS variables (added new, remove ununsed)
1 parent 41b1b93 commit 900316a

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

app/src/lib/commit/CommitList.svelte

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -247,24 +247,21 @@
247247
/* border-bottom: 1px solid var(--clr-border-2); */
248248
249249
--base-top-margin: 8px;
250-
--base-icon-top: 16px;
251-
--base-unfolded: 48px;
250+
--base-row-height: 20px;
251+
--base-row-height-unfolded: 48px;
252+
253+
--base-icon-top: -8px;
252254
253255
--avatar-first-top: 50px;
254256
--avatar-top: 16px;
255257
}
256258
257-
/* .commit-group {
258-
padding-right: 14px;
259-
padding-left: 8px;
260-
} */
261-
262259
/* BASE ROW */
263260
264261
.base-row-container {
265262
display: flex;
266263
flex-direction: column;
267-
height: 20px;
264+
height: var(--base-row-height);
268265
269266
overflow: hidden;
270267
transition: height var(--transition-medium);
@@ -281,8 +278,8 @@
281278
}
282279
283280
.base-row-container_unfolded {
284-
height: var(--base-unfolded);
285-
--base-icon-top: 20px;
281+
--base-row-height: var(--base-row-height-unfolded);
282+
--base-icon-top: -3px;
286283
287284
& .base-row__text {
288285
opacity: 1;
@@ -293,7 +290,7 @@
293290
display: flex;
294291
gap: 8px;
295292
border-top: 1px solid var(--clr-border-3);
296-
min-height: calc(var(--base-unfolded) - var(--base-top-margin));
293+
min-height: calc(var(--base-row-height-unfolded) - var(--base-top-margin));
297294
margin-top: var(--base-top-margin);
298295
transition: background-color var(--transition-fast);
299296
}

app/src/lib/commitLines/BaseNode.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
height: 16px;
3030
width: 16px;
3131
32-
margin-top: -8px;
32+
margin-top: var(--base-icon-top);
3333
margin-bottom: -8px;
3434
margin-left: -9px;
3535
margin-right: -7px;
@@ -40,6 +40,8 @@
4040
display: flex;
4141
align-items: center;
4242
justify-content: center;
43+
44+
transition: margin-top var(--transition-medium);
4345
}
4446
}
4547
</style>

0 commit comments

Comments
 (0)