Skip to content

Commit

Permalink
Fix sidenotes margin inside quote-container
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasrla committed Apr 19, 2022
1 parent 66c2e3d commit 4d4726c
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions _sass/_sidenotes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,6 @@ body {
margin-left: calc(var(--sn-pos) - (1 / #{$coef-small})*1em);
}

details.content-details div.quote-container p.citation .sn-content {
// revert sn-content font-size back up to "normal"
font-size: 1em;

// correct vertical and horizontal alignments
margin-top: -1.5em;
margin-left: var(--sn-pos);

// realign sn-content to left (.citation is aligned to the right)
text-align: left;
}

details blockquote {
p .sn-content {
margin-left: calc(var(--sn-pos) - (1 / #{$coef-small})*2em);
Expand All @@ -95,6 +83,30 @@ body {
margin-left: calc(var(--sn-pos) - (1 / #{$coef-small})*(2em + #{$list-padding-inline-start}));
}
}

details.content-details div.quote-container {
p.citation .sn-content {
// revert sn-content font-size back up to "normal"
font-size: 1em;

// correct vertical and horizontal alignments
margin-top: -1.5em;
margin-left: var(--sn-pos);

// realign sn-content to left (.citation is aligned to the right)
text-align: left;
}

blockquote {
p .sn-content {
margin-left: calc(var(--sn-pos) - (1 / #{$coef-small})*1em);
}

li .sn-content {
margin-left: calc(var(--sn-pos) - (1 / #{$coef-small})*(1em + #{$list-padding-inline-start}));
}
}
}
}

// narrow viewports get sidenotes hidden by default; they're shown only when
Expand Down

0 comments on commit 4d4726c

Please sign in to comment.