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

78 lines
1.5 KiB
SCSS
Raw Normal View History

@import "variables.scss";
@import "mixins.scss";
@import "margin.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 {
border: $sidenote-highlight-border-width dashed;
padding: $sidenote-padding -
($sidenote-highlight-border-width - $standard-border-width);
border-color: $primary-color;
}
}
}
.sidenote-label {
2020-05-04 03:23:55 -07:00
border-bottom: .2rem dashed $primary-color;
}
2019-12-07 00:16:59 -08:00
.sidenote-checkbox {
display: none;
}
.sidenote-content {
@include margin-content;
@include bordered-block;
2019-12-27 23:12:35 -08:00
margin-top: -1.5rem;
padding: $sidenote-padding;
text-align: left;
2019-12-07 00:16:59 -08:00
&.sidenote-right {
@include margin-content-right;
2019-12-07 00:16:59 -08:00
}
&.sidenote-left {
@include margin-content-left;
2019-12-07 00:16:59 -08:00
}
}
2019-12-07 00:16:59 -08:00
.sidenote-delimiter {
display: none;
}
@mixin hidden-sidenote {
position: static;
margin-top: 1rem;
margin-bottom: 1rem;
width: 100%;
2019-12-07 00:16:59 -08:00
.sidenote-checkbox:checked ~ & {
display: block;
}
}
2019-12-07 00:16:59 -08:00
@include below-two-margins {
.sidenote-content.sidenote-left {
@include hidden-sidenote;
margin-left: 0rem;
2019-12-07 00:16:59 -08:00
}
}
@include below-one-margin {
.sidenote-content.sidenote-right {
@include hidden-sidenote;
margin-right: 0rem;
}
}