Skip to content

Commit 88c778b

Browse files
committed
adjust sticky nav height for desktop
follow up to #347
1 parent 373850f commit 88c778b

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/components/Settings/index.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
removeLocalePrefix,
66
getUiTranslator,
77
} from "@/src/i18n/utils";
8+
import { jumpToState } from "@/src/globals/state";
89
import { AccessibilitySettings } from "@components/AccessibilitySettings/";
910
import SearchForm from "@components/SearchForm/index.astro";
1011
import { LocaleSelect } from "@components/LocaleSelect";
@@ -72,7 +73,7 @@ const a11ySettingsProps = [
7273
const { hideSearch } = Astro.props;
7374
---
7475

75-
<div class={styles.container}>
76+
<div class={`${styles.container} ${jumpToState ? "" : "noJumpTo"}`}>
7677
<div id="settings-placeholder" class={styles.placeholder}></div>
7778
<div id="settings-hitbox" class={styles.hitbox}></div>
7879
<div id="settings-container" class={`${styles.wrapper} settings`}>

src/components/Settings/styles.module.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@
9393
position 0.3s;
9494
}
9595

96+
.container:global(.noJumpTo) .wrapper:global(.open) {
97+
top: 40px;
98+
@media (min-width: $breakpoint-tablet) {
99+
top: 0px;
100+
}
101+
}
102+
96103
.wrapper:global(.open) {
97104
top: 80px;
105+
@media (min-width: $breakpoint-tablet) {
106+
top: 0px;
107+
}
98108
}

0 commit comments

Comments
 (0)