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

71 lines
1.3 KiB
SCSS

@import "style.scss";
$sidenote-width: 350px;
$sidenote-offset: 15px;
.sidenote {
&:hover {
.sidenote-label {
background-color: $primary-color;
color: white;
}
.sidenote-content {
border: 2px dashed;
padding: 9px;
border-color: $primary-color;
}
}
}
.sidenote-label {
border-bottom: 2px solid $primary-color;
}
.sidenote-checkbox {
display: none;
}
.sidenote-content {
display: block;
position: absolute;
width: $sidenote-width;
margin-top: -1.5em;
&.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;
margin-top: 10px;
margin-bottom: 10px;
width: 100%;
display: none;
.sidenote-checkbox:checked ~ & {
display: block;
}
&.sidenote-left {
margin-left: 0px;
}
&.sidenote-right {
margin-right: 0px;
}
}
@include bordered-block;
padding: 10px;
box-sizing: border-box;
text-align: left;
}