Skip to content

Commit

Permalink
adjust sticky nav height for desktop
Browse files Browse the repository at this point in the history
follow up to #347
  • Loading branch information
outofambit committed May 9, 2024
1 parent 373850f commit 88c778b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Settings/index.astro
Expand Up @@ -5,6 +5,7 @@ import {
removeLocalePrefix,
getUiTranslator,
} from "@/src/i18n/utils";
import { jumpToState } from "@/src/globals/state";
import { AccessibilitySettings } from "@components/AccessibilitySettings/";
import SearchForm from "@components/SearchForm/index.astro";
import { LocaleSelect } from "@components/LocaleSelect";
Expand Down Expand Up @@ -72,7 +73,7 @@ const a11ySettingsProps = [
const { hideSearch } = Astro.props;
---

<div class={styles.container}>
<div class={`${styles.container} ${jumpToState ? "" : "noJumpTo"}`}>
<div id="settings-placeholder" class={styles.placeholder}></div>
<div id="settings-hitbox" class={styles.hitbox}></div>
<div id="settings-container" class={`${styles.wrapper} settings`}>
Expand Down
10 changes: 10 additions & 0 deletions src/components/Settings/styles.module.scss
Expand Up @@ -93,6 +93,16 @@
position 0.3s;
}

.container:global(.noJumpTo) .wrapper:global(.open) {
top: 40px;
@media (min-width: $breakpoint-tablet) {
top: 0px;
}
}

.wrapper:global(.open) {
top: 80px;
@media (min-width: $breakpoint-tablet) {
top: 0px;
}
}

0 comments on commit 88c778b

Please sign in to comment.