Skip to content

Commit e28f7d4

Browse files
authored
tighten up playground buttons (#303)
1 parent 2550097 commit e28f7d4

File tree

3 files changed

+20
-21
lines changed

3 files changed

+20
-21
lines changed

apps/svelte.dev/src/routes/(authed)/playground/[id]/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
flex-direction: column;
169169
170170
@media (min-width: 800px) {
171-
--app-controls-h: 4.4rem;
171+
--app-controls-h: 4.8rem;
172172
}
173173
}
174174

apps/svelte.dev/src/routes/(authed)/playground/[id]/AppControls.svelte

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -220,29 +220,29 @@ export default app;`
220220
<div class="buttons">
221221
<button class="raised icon" onclick={() => (zen_mode = !zen_mode)} title="fullscreen editor">
222222
{#if zen_mode}
223-
<Icon name="close" />
223+
<Icon size={18} name="close" />
224224
{:else}
225-
<Icon name="maximize" />
225+
<Icon size={18} name="maximize" />
226226
{/if}
227227
</button>
228228

229229
<button class="raised icon" disabled={downloading} onclick={download} title="download zip file">
230-
<Icon name="download" />
230+
<Icon size={18} name="download" />
231231
</button>
232232

233233
<button class="raised icon" disabled={saving || !user} onclick={() => fork(false)} title="fork">
234234
{#if justForked}
235-
<Icon name="check" />
235+
<Icon size={18} name="check" />
236236
{:else}
237-
<Icon name="git-branch" />
237+
<Icon size={18} name="git-branch" />
238238
{/if}
239239
</button>
240240

241241
<button class="raised icon" disabled={saving || !user} onclick={save} title="save">
242242
{#if justSaved}
243-
<Icon name="check" />
243+
<Icon size={18} name="check" />
244244
{:else}
245-
<Icon name="save" />
245+
<Icon size={18} name="save" />
246246
{#if modified_count}
247247
<div class="badge">{modified_count}</div>
248248
{/if}
@@ -252,7 +252,11 @@ export default app;`
252252
{#if user}
253253
<UserMenu {user} />
254254
{:else}
255-
<button class="raised icon" onclick={(e) => (e.preventDefault(), login())}>
255+
<button
256+
class="raised icon"
257+
onclick={(e) => (e.preventDefault(), login())}
258+
style="width: auto; padding: 0 0.4rem"
259+
>
256260
<Icon name="log-in" />
257261
<span>&nbsp;Log in to save</span>
258262
</button>
@@ -301,15 +305,18 @@ export default app;`
301305
gap: 0.2em;
302306
}
303307
308+
button {
309+
width: 3.2rem;
310+
height: 3.2rem;
311+
}
312+
304313
.icon {
305314
transform: translateY(0.1rem);
306315
display: inline-block;
307-
padding: 0.4em;
308-
opacity: 0.7;
309316
transition: opacity 0.3s;
310317
font-family: var(--sk-font-ui);
311-
font-size: 1.6rem;
312-
color: var(--sk-text-1);
318+
font-size: var(--sk-font-size-ui-small);
319+
color: var(--sk-text-3);
313320
line-height: 1;
314321
}
315322

packages/site-kit/src/lib/styles/base.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,6 @@ button[disabled] {
156156
pointer-events: none;
157157
}
158158

159-
button > svg {
160-
position: relative;
161-
top: -0.1rem;
162-
width: 2rem !important;
163-
height: 2rem !important;
164-
stroke: currentColor !important;
165-
}
166-
167159
.raised {
168160
border-radius: var(--sk-border-radius);
169161
border-style: solid;

0 commit comments

Comments
 (0)