feat(shortcodes): add 'aside' shortcode for side notes (#452)

This commit is contained in:
Óscar 2024-12-24 10:50:47 +01:00 committed by GitHub
parent e1b60542df
commit 98b0c8d161
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 131 additions and 3 deletions

31
sass/parts/_aside.scss Normal file
View file

@ -0,0 +1,31 @@
aside {
margin-block-end: var(--paragraph-spacing);
border-radius: 4px;
background: var(--bg-0);
padding-block: 0.8rem;
padding-inline: 1rem;
color: var(--meta-color);
font-size: 0.9rem;
article & p {
margin: 0;
font-family: var(--sans-serif-font);
}
@media only screen and (min-width: 1300px) {
position: absolute;
inset-inline-start: -14rem;
margin-block: 0;
border-radius: 0;
background: none;
padding: 0;
width: 12rem;
text-align: end;
&[data-position="right"] {
inset-inline-start: auto;
inset-inline-end: -14rem;
text-align: start;
}
}
}