2020-03-08 00:35:11 -08:00
|
|
|
@import "variables.scss";
|
|
|
|
@import "mixins.scss";
|
2019-12-06 00:10:26 -08:00
|
|
|
|
2020-02-03 13:38:21 -08:00
|
|
|
$sidenote-accommodate-shrink: 10rem;
|
2019-12-27 23:12:35 -08:00
|
|
|
$sidenote-width: 30rem;
|
|
|
|
$sidenote-offset: 1.5rem;
|
|
|
|
$sidenote-padding: 1rem;
|
|
|
|
$sidenote-highlight-border-width: .2rem;
|
2019-12-06 00:10:26 -08:00
|
|
|
|
2020-03-01 16:07:38 -08:00
|
|
|
@mixin below-two-sidenotes {
|
|
|
|
@media screen and
|
|
|
|
(max-width: $container-width +
|
|
|
|
2 * ($sidenote-width + 2 * $sidenote-offset)) {
|
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin below-one-sidenote {
|
|
|
|
@media screen and
|
|
|
|
(max-width: $container-width +
|
|
|
|
($sidenote-width + 3 * $sidenote-offset)) {
|
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-06 00:10:26 -08:00
|
|
|
.sidenote {
|
|
|
|
&:hover {
|
|
|
|
.sidenote-label {
|
|
|
|
background-color: $primary-color;
|
|
|
|
color: white;
|
|
|
|
}
|
|
|
|
|
|
|
|
.sidenote-content {
|
2020-01-15 18:32:34 -08:00
|
|
|
border: $sidenote-highlight-border-width dashed;
|
|
|
|
padding: $sidenote-padding -
|
|
|
|
($sidenote-highlight-border-width - $standard-border-width);
|
2019-12-06 00:10:26 -08:00
|
|
|
border-color: $primary-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.sidenote-label {
|
2020-05-04 03:23:55 -07:00
|
|
|
border-bottom: .2rem dashed $primary-color;
|
2019-12-06 00:10:26 -08:00
|
|
|
}
|
|
|
|
|
2019-12-07 00:16:59 -08:00
|
|
|
.sidenote-checkbox {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2019-12-06 00:10:26 -08:00
|
|
|
.sidenote-content {
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
width: $sidenote-width;
|
2019-12-27 23:12:35 -08:00
|
|
|
margin-top: -1.5rem;
|
2019-12-06 00:10:26 -08:00
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2020-02-03 13:38:21 -08:00
|
|
|
@include bordered-block;
|
|
|
|
padding: $sidenote-padding;
|
|
|
|
box-sizing: border-box;
|
|
|
|
text-align: left;
|
|
|
|
}
|
2019-12-07 00:16:59 -08:00
|
|
|
|
2020-03-02 21:30:23 -08:00
|
|
|
.sidenote-delimiter {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2020-02-03 13:38:21 -08:00
|
|
|
@mixin hidden-sidenote {
|
|
|
|
position: static;
|
|
|
|
margin-top: 1rem;
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
width: 100%;
|
|
|
|
display: none;
|
2019-12-07 00:16:59 -08:00
|
|
|
|
2020-02-03 13:38:21 -08:00
|
|
|
.sidenote-checkbox:checked ~ & {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
2019-12-07 00:16:59 -08:00
|
|
|
|
2020-03-01 16:07:38 -08:00
|
|
|
@include below-two-sidenotes {
|
2020-02-03 13:38:21 -08:00
|
|
|
.sidenote-content.sidenote-left {
|
|
|
|
@include hidden-sidenote;
|
|
|
|
margin-left: 0rem;
|
2019-12-07 00:16:59 -08:00
|
|
|
}
|
|
|
|
|
2020-02-03 13:38:21 -08:00
|
|
|
.container {
|
|
|
|
left: -$sidenote-width/2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-01 16:07:38 -08:00
|
|
|
@include below-one-sidenote {
|
2020-02-03 13:38:21 -08:00
|
|
|
.post-content {
|
|
|
|
max-width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.sidenote-content.sidenote-right {
|
|
|
|
@include hidden-sidenote;
|
|
|
|
margin-right: 0rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.container {
|
|
|
|
position: initial;
|
|
|
|
}
|
2019-12-06 00:10:26 -08:00
|
|
|
}
|
2020-02-03 13:38:21 -08:00
|
|
|
|