Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: hamburger menu styling on smaller screens #671

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ export default function Header(props: HeaderProps) {
<input
type="checkbox"
id="nav-toggle"
class="hidden [:checked&+*>:last-child>*>:first-child]:hidden [:checked&+*>:last-child>*>:last-child]:block checked:siblings:last-child:flex"
class="hidden peer"
/>

<div class="flex justify-between items-center">
<div class="flex justify-between items-center peer-checked:[&_>div>label>#IconMenu]:hidden peer-checked:[&_>div>label>#IconX]:block">
<a href="/" class="shrink-0">
<img
height="48"
Expand All @@ -41,8 +41,8 @@ export default function Header(props: HeaderProps) {
id="nav-toggle-label"
htmlFor="nav-toggle"
>
<IconMenu class="size-6" />
<IconX class="hidden size-6" />
<IconMenu class="size-6" id="IconMenu" />
<IconX class="hidden size-6" id="IconX" />
</label>
</div>
</div>
Expand All @@ -58,7 +58,7 @@ export default function Header(props: HeaderProps) {
`}
</script>
<nav
class={"hidden flex-col gap-x-4 divide-y divide-solid sm:flex sm:items-center sm:flex-row sm:divide-y-0"}
class={"hidden flex-col gap-x-4 divide-y divide-solid sm:flex sm:items-center sm:flex-row sm:divide-y-0 peer-checked:flex"}
>
<a
href="/dashboard"
Expand Down
Loading