Skip to content

Commit 9c458dc

Browse files
authored
fix: Remove margins at end of highlight or expander (#443)
Resolves #407 Supports nested elements as well, since the the margin sometimes is only applied to a child of the last element.
1 parent 98cae24 commit 9c458dc

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

assets/sass/expander.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@
4545

4646
.o-expander__content {
4747
padding: 1.2rem;
48+
49+
// Remove margins from last elements of expander (up to 3 levels deep)
50+
& > *:last-child,
51+
& > *:last-child > *:last-child,
52+
& > *:last-child > *:last-child > *:last-child {
53+
margin-bottom: 0;
54+
}
4855
}
4956

5057
.details-print {

assets/sass/textHighlight.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
border-radius: var(--border-radius-m);
66
border-left: var(--bg-neutral) solid 1rem;
77

8+
// Remove margins from last elements of expander (up to 2 levels deep)
9+
& > *:last-child,
10+
& > *:last-child > *:last-child {
11+
margin-bottom: 0;
12+
}
13+
814
@media print {
915
page-break-inside: avoid;
1016
}

0 commit comments

Comments
 (0)