Enable Stickyfill on screen width > 768px

This commit is contained in:
Michael Rose
2016-03-17 15:38:07 -04:00
parent e72642539e
commit f85dd7aee2
8 changed files with 34 additions and 12 deletions

View File

@@ -6,6 +6,8 @@
margin-bottom: 2em;
@include breakpoint($medium) {
@include span(10 of 12 last);
}
@include breakpoint($large) {
@include suffix(3 of 12);
}
}

View File

@@ -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;
}

View File

@@ -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 {

View File

@@ -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;