Skip to content

Commit 549abe3

Browse files
authored
Mobile styles (#402)
* fix grid gap * shuffle some stuff around
1 parent 9ba7bf7 commit 549abe3

File tree

5 files changed

+22
-20
lines changed

5 files changed

+22
-20
lines changed

apps/svelte.dev/src/routes/+layout.svelte

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,6 @@
8585
padding: 0 0.5rem;
8686
height: 100%;
8787
88-
:global(.dark) & {
89-
opacity: 0.8;
90-
}
91-
9288
/* visually hidden, but visible to screen readers */
9389
span {
9490
clip: rect(0 0 0 0);

apps/svelte.dev/src/routes/_home/Testimonials.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
margin: 4rem auto;
4747
padding: 0 var(--sk-page-padding-side);
4848
display: grid;
49-
gap: 4rem;
49+
row-gap: 4rem;
5050
grid-template-areas:
5151
'definition'
5252
'blurb'
@@ -179,6 +179,7 @@
179179
display: grid;
180180
margin: 4em auto;
181181
grid-template-columns: 1fr 1fr;
182+
column-gap: 4rem;
182183
grid-template-areas:
183184
'definition definition'
184185
'blurb screenshots';

packages/site-kit/src/lib/components/ThemeToggle.svelte

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,9 @@
3232
<style>
3333
button {
3434
background-image: url($lib/icons/theme-light.svg);
35-
margin-left: 1rem;
3635
3736
:global(.dark) & {
3837
background-image: url($lib/icons/theme-dark.svg);
39-
opacity: 0.8;
4038
}
4139
}
4240
</style>

packages/site-kit/src/lib/nav/Nav.svelte

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Top navigation bar for the application. It provides a slot for the left side, th
7979
{/if}
8080

8181
<div class="desktop">
82-
<div class="menu">
82+
<div class="links">
8383
{#each links as link}
8484
{#if link.sections?.[0].path}
8585
<Dropdown>
@@ -122,7 +122,9 @@ Top navigation bar for the application. It provides a slot for the left side, th
122122
<div class="menu">
123123
{@render search?.()}
124124

125-
{@render external_links?.()}
125+
<div class="external-links">
126+
{@render external_links?.()}
127+
</div>
126128

127129
<ThemeToggle />
128130
</div>
@@ -139,17 +141,12 @@ Top navigation bar for the application. It provides a slot for the left side, th
139141
<Icon name="search" size={16} />
140142
</button>
141143

144+
<ThemeToggle />
145+
142146
<Menu bind:open={$nav_open} {links}>
143147
<Separator />
144148

145149
{@render external_links?.()}
146-
147-
<Separator />
148-
149-
<div class="appearance">
150-
<span class="caption">Theme</span>
151-
<ThemeToggle />
152-
</div>
153150
</Menu>
154151
</div>
155152
</nav>
@@ -199,12 +196,11 @@ Top navigation bar for the application. It provides a slot for the left side, th
199196
}
200197
}
201198
202-
.menu {
203-
position: relative;
199+
.links {
204200
display: flex;
205201
width: 100%;
202+
align-items: center;
206203
207-
/* :global { */
208204
a {
209205
color: var(--sk-text-2);
210206
font: var(--sk-font-ui-medium);
@@ -236,6 +232,18 @@ Top navigation bar for the application. It provides a slot for the left side, th
236232
}
237233
}
238234
235+
.menu {
236+
position: relative;
237+
display: flex;
238+
width: 100%;
239+
gap: 1rem;
240+
241+
.external-links {
242+
display: flex;
243+
height: 100%;
244+
}
245+
}
246+
239247
.home-link {
240248
--padding-right: 1rem;
241249
width: 11.2rem;

packages/site-kit/src/lib/search/Search.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ Renders a search widget which when clicked (or the corresponding keyboard shortc
108108
@media (min-width: 800px) {
109109
.search-container {
110110
width: 11rem;
111-
margin: 0 2rem;
112111
}
113112
114113
.shortcut {

0 commit comments

Comments
 (0)