Skip to content

Commit 04b2216

Browse files
fix(components): remove transform property from scroll-locked parent (#4957)
1 parent 04692d8 commit 04b2216

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.changeset/moody-mice-design.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@swisspost/design-system-components': patch
3+
'@swisspost/design-system-styles': patch
4+
---
5+
6+
Removed the `transform` property from the scroll-locked `post-header` parent, to avoid side effects. Updated the mobile menu of the `post-header`, so it works as before.

packages/components/src/components/post-header/post-header.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,10 @@
207207
// only for tablet and mobile
208208
@include media.max(lg) {
209209
.navigation {
210-
position: fixed;
210+
position: sticky;
211211
z-index: 1;
212212
inset-inline: 0;
213-
inset-block-start: calc(var(--header-scroll-top) + var(--header-height));
213+
inset-block-start: var(--header-height);
214214
}
215215

216216
.mobile-menu {

packages/styles/src/components/header/index.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ tokens.$default-map: elements.$post-link;
1010

1111
[data-post-scroll-locked] {
1212
overflow: hidden !important;
13-
transform: translate3d(0, 0, 0) !important;
1413
}
1514

1615
post-header {

0 commit comments

Comments
 (0)