Skip to content

Commit

Permalink
fix: Navbar center slot responsive position (#269)
Browse files Browse the repository at this point in the history
* Push

* Add changeset
  • Loading branch information
PuruVJ authored Dec 7, 2023
1 parent 78138ab commit fc3a172
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-comics-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/site-kit': patch
---

fix: Navbar Center positionin
20 changes: 18 additions & 2 deletions packages/site-kit/src/lib/nav/Nav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ Top navigation bar for the application. It provides a slot for the left side, th
{/if}

<div class="desktop">
<slot name="search" />
<div class="center-area">
<slot name="search" />
</div>

<div class="menu">
{#each links as link}
Expand Down Expand Up @@ -312,10 +314,17 @@ Top navigation bar for the application. It provides a slot for the left side, th
}
}
.desktop .center-area {
display: flex;
align-items: center;
justify-content: center;
flex: 1;
}
@media (min-width: 800px) {
nav {
display: grid;
grid-template-columns: 1fr auto 1fr;
grid-template-columns: auto 1fr 1fr;
}
nav::after {
Expand Down Expand Up @@ -345,4 +354,11 @@ Top navigation bar for the application. It provides a slot for the left side, th
display: none;
}
}
@media (min-width: 1240px) {
nav {
display: grid;
grid-template-columns: 1fr auto 1fr;
}
}
</style>

0 comments on commit fc3a172

Please sign in to comment.