Add intermediate style to fit right sidenotes
This commit is contained in:
parent
8d22acfe78
commit
153349f3d5
|
@ -1,5 +1,6 @@
|
||||||
@import "style.scss";
|
@import "style.scss";
|
||||||
|
|
||||||
|
$sidenote-accommodate-shrink: 10rem;
|
||||||
$sidenote-width: 30rem;
|
$sidenote-width: 30rem;
|
||||||
$sidenote-offset: 1.5rem;
|
$sidenote-offset: 1.5rem;
|
||||||
$sidenote-padding: 1rem;
|
$sidenote-padding: 1rem;
|
||||||
|
@ -45,8 +46,13 @@ $sidenote-highlight-border-width: .2rem;
|
||||||
margin-left: -($sidenote-width + $sidenote-offset);
|
margin-left: -($sidenote-width + $sidenote-offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and
|
@include bordered-block;
|
||||||
(max-width: $container-width + 2 * ($sidenote-width + 2 * $sidenote-offset)) {
|
padding: $sidenote-padding;
|
||||||
|
box-sizing: border-box;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin hidden-sidenote {
|
||||||
position: static;
|
position: static;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
|
@ -56,18 +62,34 @@ $sidenote-highlight-border-width: .2rem;
|
||||||
.sidenote-checkbox:checked ~ & {
|
.sidenote-checkbox:checked ~ & {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.sidenote-left {
|
@media screen and
|
||||||
|
(max-width: $container-width + 2 * ($sidenote-width + 2 * $sidenote-offset)) {
|
||||||
|
.sidenote-content.sidenote-left {
|
||||||
|
@include hidden-sidenote;
|
||||||
margin-left: 0rem;
|
margin-left: 0rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.sidenote-right {
|
.container {
|
||||||
margin-right: 0rem;
|
position: relative;
|
||||||
|
left: -$sidenote-width/2
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and
|
||||||
|
(max-width: $container-width + ($sidenote-width + 3 * $sidenote-offset)) {
|
||||||
|
.post-content {
|
||||||
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include bordered-block;
|
.sidenote-content.sidenote-right {
|
||||||
padding: $sidenote-padding;
|
@include hidden-sidenote;
|
||||||
box-sizing: border-box;
|
margin-right: 0rem;
|
||||||
text-align: left;
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
position: initial;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$container-width: 50rem;
|
$container-width: 45rem;
|
||||||
$standard-border-width: .075rem;
|
$standard-border-width: .075rem;
|
||||||
|
|
||||||
$primary-color: #36e281;
|
$primary-color: #36e281;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user