Enable Stickyfill on screen width > 768px
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
margin-bottom: 2em;
|
||||
@include breakpoint($medium) {
|
||||
@include span(10 of 12 last);
|
||||
}
|
||||
@include breakpoint($large) {
|
||||
@include suffix(3 of 12);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#main {
|
||||
@include container;
|
||||
@include clearfix;
|
||||
position: relative;
|
||||
margin-top: 2em;
|
||||
padding-left: 2em;
|
||||
padding-right: 2em;
|
||||
@@ -13,6 +14,8 @@
|
||||
.page {
|
||||
@include breakpoint($medium) {
|
||||
@include span(10 of 12 last);
|
||||
}
|
||||
@include breakpoint($large) {
|
||||
padding-right: $right-sidebar-width;
|
||||
}
|
||||
}
|
||||
@@ -23,7 +26,6 @@
|
||||
}
|
||||
|
||||
.page__content {
|
||||
position: relative;
|
||||
p, li {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
background-color: #fff;
|
||||
&.sticky {
|
||||
// &.sticky {
|
||||
@include breakpoint($large) {
|
||||
position: fixed;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: calc(50% - 512px + 2em); // 50% - 1/2 of wrapper's max-width + wrapper padding
|
||||
width: $right-sidebar-width;
|
||||
padding-left: 2em;
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
.toc__title {
|
||||
|
||||
@@ -157,10 +157,7 @@ body:hover .visually-hidden button {
|
||||
========================================================================== */
|
||||
|
||||
.sticky {
|
||||
> * {
|
||||
display: none;
|
||||
}
|
||||
@include breakpoint($small) {
|
||||
@include breakpoint($medium) {
|
||||
@include clearfix();
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
|
||||
Reference in New Issue
Block a user