Revert "Remove position: sticky polyfill"

This reverts commit 6ab127f293.
This commit is contained in:
Michael Rose
2016-03-17 15:07:30 -04:00
parent 6ab127f293
commit e72642539e
8 changed files with 47 additions and 20 deletions

View File

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

View File

@@ -3,7 +3,6 @@
========================================================================== */
#main {
position: relative;
@include container;
@include clearfix;
margin-top: 2em;
@@ -14,8 +13,6 @@
.page {
@include breakpoint($medium) {
@include span(10 of 12 last);
}
@include breakpoint($large) {
padding-right: $right-sidebar-width;
}
}
@@ -26,6 +23,7 @@
}
.page__content {
position: relative;
p, li {
font-size: 16px;
}

View File

@@ -8,12 +8,15 @@
color: $gray;
text-transform: uppercase;
letter-spacing: 1px;
@include breakpoint($large) {
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;
background-color: #fff;
&.sticky {
@include breakpoint($large) {
position: fixed;
top: 0;
right: calc(50% - 512px + 2em); // 50% - 1/2 of wrapper's max-width + wrapper padding
width: $right-sidebar-width;
padding-left: 2em;
}
}
}
@@ -33,7 +36,6 @@
padding: 0;
width: 100%;
list-style: none;
background-color: #fff;
border: 1px solid $border-color;
border-top: none;
border-bottom-right-radius: $border-radius;

View File

@@ -152,6 +152,26 @@ body:hover .visually-hidden button {
}
/*
Sticky, fixed to top content
========================================================================== */
.sticky {
> * {
display: none;
}
@include breakpoint($small) {
@include clearfix();
position: -webkit-sticky;
position: sticky;
top: 3em;
> * {
display: block;
}
}
}
/*
Wells
========================================================================== */

View File

@@ -92,10 +92,10 @@ $susy: (
gutter-position: after,
container: $large,
global-box-sizing: border-box,
// debug: (
// image: show,
// color: blue,
// output: overlay,
// toggle: top right,
// ),
debug: (
image: show,
color: blue,
output: overlay,
toggle: top right,
),
);