react-sticky-state
Version:
React StickyState Component makes native position:sticky statefull and polyfills the missing sticky browser feature
31 lines (25 loc) • 570 B
CSS
body::before {
content: '';
position: fixed;
}
.sticky {
position: -webkit-sticky;
position: sticky;
}
.sticky.sticky-fixed.is-sticky {
margin-top: 0;
margin-bottom: 0;
position: fixed;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
backface-visibility: hidden;
}
.sticky.sticky-fixed.is-sticky:not([style*="margin-top"]) {
margin-top: 0 ;
}
.sticky.sticky-fixed.is-sticky:not([style*="margin-bottom"]) {
margin-bottom: 0 ;
}
.sticky.sticky-fixed.is-absolute{
position: absolute;
}