blog-static/themes/vanilla/assets/scss/sidenotes.scss

72 lines
1.4 KiB
SCSS
Raw Normal View History

@import "style.scss";
2019-12-27 23:12:35 -08:00
$sidenote-width: 30rem;
$sidenote-offset: 1.5rem;
$sidenote-padding: 1rem;
$sidenote-highlight-border-width: .2rem;
.sidenote {
&:hover {
.sidenote-label {
background-color: $primary-color;
color: white;
}
.sidenote-content {
2020-01-15 13:05:03 -08:00
border: $standard-border-width dashed;
border-color: $primary-color;
}
}
}
.sidenote-label {
2019-12-27 23:12:35 -08:00
border-bottom: .2rem solid $primary-color;
}
2019-12-07 00:16:59 -08:00
.sidenote-checkbox {
display: none;
}
.sidenote-content {
display: block;
position: absolute;
width: $sidenote-width;
2019-12-27 23:12:35 -08:00
margin-top: -1.5rem;
2019-12-07 00:16:59 -08:00
&.sidenote-right {
right: 0;
margin-right: -($sidenote-width + $sidenote-offset);
}
&.sidenote-left {
left: 0;
margin-left: -($sidenote-width + $sidenote-offset);
}
@media screen and
(max-width: $container-width + 2 * ($sidenote-width + 2 * $sidenote-offset)) {
position: static;
2019-12-27 23:12:35 -08:00
margin-top: 1rem;
margin-bottom: 1rem;
2019-12-07 00:16:59 -08:00
width: 100%;
display: none;
.sidenote-checkbox:checked ~ & {
display: block;
}
&.sidenote-left {
2019-12-27 23:12:35 -08:00
margin-left: 0rem;
2019-12-07 00:16:59 -08:00
}
&.sidenote-right {
2019-12-27 23:12:35 -08:00
margin-right: 0rem;
2019-12-07 00:16:59 -08:00
}
}
@include bordered-block;
2019-12-27 23:12:35 -08:00
padding: $sidenote-padding;
box-sizing: border-box;
text-align: left;
}