Remove position: sticky polyfill

This commit is contained in:
Michael Rose 2016-03-16 16:47:28 -04:00
parent 1ce8926272
commit 6ab127f293
8 changed files with 20 additions and 47 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

@ -3,6 +3,7 @@
========================================================================== */
#main {
position: relative;
@include container;
@include clearfix;
margin-top: 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

@ -8,17 +8,14 @@
color: $gray;
text-transform: uppercase;
letter-spacing: 1px;
background-color: #fff;
&.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 {
margin: 0;
@ -36,6 +33,7 @@
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,26 +152,6 @@ 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,
// ),
);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long