From ce7f54d1fb685dc4130f3a998efc9bf5c84bf7a4 Mon Sep 17 00:00:00 2001
From: alexisben <alex@noesya.coop>
Date: Mon, 14 Nov 2022 18:39:40 +0100
Subject: [PATCH] fix sticky

---
 assets/sass/_theme/_utils.sass             | 9 +++------
 assets/sass/_theme/design-system/grid.sass | 2 +-
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/assets/sass/_theme/_utils.sass b/assets/sass/_theme/_utils.sass
index 71854c33..b8e7b05c 100644
--- a/assets/sass/_theme/_utils.sass
+++ b/assets/sass/_theme/_utils.sass
@@ -37,16 +37,13 @@
         &::#{$pseudo}
             transform: translateX(#{px2rem($distance)})
 
-@mixin sticky($offset-y: false)
+@mixin sticky($offset-y: 0)
     position: sticky
-    top: 0
+    top: $offset-y
     @if $header-sticky-enabled
         transition: top $header-sticky-transition
         html:not(.is-scrolling-down) &
-            @if $offset-y
-                top: calc(var(--header-height) + #{$offset-y})
-            @else 
-                top: var(--header-height)
+            top: calc(var(--header-height) + #{$offset-y})
 
 // NEW UTILS
 @mixin icon($icon-name: '', $pseudo-element: before, $font-size: px2rem(10))
diff --git a/assets/sass/_theme/design-system/grid.sass b/assets/sass/_theme/design-system/grid.sass
index ab9cee24..0a1ccf81 100644
--- a/assets/sass/_theme/design-system/grid.sass
+++ b/assets/sass/_theme/design-system/grid.sass
@@ -14,7 +14,7 @@
                 transform: translateX(-50%)
                 width: 100%
                 > div
-                    @include sticky($spacing1)
+                    @include sticky($spacing2)
                     > *
                         width: col(4)
                         pointer-events: auto
-- 
GitLab