Skip to content
Snippets Groups Projects
Commit ce7f54d1 authored by alexisben's avatar alexisben
Browse files

fix sticky

parent b8a4fe24
No related branches found
No related tags found
No related merge requests found
...@@ -37,16 +37,13 @@ ...@@ -37,16 +37,13 @@
&::#{$pseudo} &::#{$pseudo}
transform: translateX(#{px2rem($distance)}) transform: translateX(#{px2rem($distance)})
@mixin sticky($offset-y: false) @mixin sticky($offset-y: 0)
position: sticky position: sticky
top: 0 top: $offset-y
@if $header-sticky-enabled @if $header-sticky-enabled
transition: top $header-sticky-transition transition: top $header-sticky-transition
html:not(.is-scrolling-down) & html:not(.is-scrolling-down) &
@if $offset-y top: calc(var(--header-height) + #{$offset-y})
top: calc(var(--header-height) + #{$offset-y})
@else
top: var(--header-height)
// NEW UTILS // NEW UTILS
@mixin icon($icon-name: '', $pseudo-element: before, $font-size: px2rem(10)) @mixin icon($icon-name: '', $pseudo-element: before, $font-size: px2rem(10))
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
transform: translateX(-50%) transform: translateX(-50%)
width: 100% width: 100%
> div > div
@include sticky($spacing1) @include sticky($spacing2)
> * > *
width: col(4) width: col(4)
pointer-events: auto pointer-events: auto
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment