Skip to content

Commit 8bce3eb

Browse files
committed
remove theme-2
1 parent 45d2448 commit 8bce3eb

File tree

14 files changed

+51
-170
lines changed

14 files changed

+51
-170
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@
168168

169169
<style>
170170
.repl-outer {
171-
--pane-controls-h: 4.2rem;
172171
position: relative;
173172
height: calc(100% - var(--sk-nav-height) - var(--sk-banner-bottom-height));
174173
height: calc(100dvh - var(--sk-nav-height) - var(--sk-banner-bottom-height));

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
background-color: var(--sk-back-1);
7272
overflow: hidden;
7373
box-sizing: border-box;
74-
--pane-controls-h: 4.2rem;
7574
display: flex;
7675
flex-direction: column;
7776
}

apps/svelte.dev/src/routes/tutorial/[...slug]/+page.svelte

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import Filetree from './filetree/Filetree.svelte';
88
import ImageViewer from './ImageViewer.svelte';
99
import Output from './Output.svelte';
10-
import ScreenToggle from './ScreenToggle.svelte';
10+
import { ScreenToggle } from '@sveltejs/site-kit/components';
1111
import Sidebar from './Sidebar.svelte';
1212
import {
1313
create_directories,
@@ -323,18 +323,20 @@
323323
324324
<div class="screen-toggle">
325325
<ScreenToggle
326-
on:change={(e) => {
327-
show_editor = e.detail.pressed;
326+
left="show text"
327+
right="show editor"
328+
onchange={(checked) => {
329+
show_editor = checked;
328330
329331
const url = new URL(location.origin + location.pathname);
330332
331333
if (show_editor) {
332334
url.searchParams.set('file', $selected_name ?? '');
333335
}
334336
335-
history.pushState({}, '', url);
337+
history.pushState({}, '', url); // TODO use SvelteKit pushState
336338
}}
337-
pressed={show_editor}
339+
checked={show_editor}
338340
/>
339341
</div>
340342
</div>
@@ -366,7 +368,7 @@
366368
}
367369
368370
.screen-toggle {
369-
height: 4.6rem;
371+
height: var(--sk-pane-controls-height);
370372
}
371373
372374
.content {

apps/svelte.dev/src/routes/tutorial/[...slug]/ScreenToggle.svelte

Lines changed: 0 additions & 56 deletions
This file was deleted.

apps/svelte.dev/src/routes/tutorial/[...slug]/ToggleButton.svelte

Lines changed: 0 additions & 82 deletions
This file was deleted.

packages/repl/src/lib/Message.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,6 @@
9393
}
9494
9595
.info {
96-
background-color: var(--sk-theme-2);
96+
background-color: var(--sk-text-4);
9797
}
9898
</style>

packages/repl/src/lib/Output/CompilerOptions.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import { get_repl_context } from '../context';
3-
import Checkbox from '../Checkbox.svelte';
3+
import { Checkbox } from '@sveltejs/site-kit/components';
44
55
const { compile_options } = get_repl_context();
66
</script>

packages/repl/src/lib/Output/Output.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108

109109
<style>
110110
.view-toggle {
111-
height: var(--pane-controls-h);
111+
height: var(--sk-pane-controls-height);
112112
overflow: hidden;
113113
white-space: nowrap;
114114
box-sizing: border-box;
@@ -150,7 +150,7 @@
150150
.tab-content {
151151
position: absolute;
152152
width: 100%;
153-
height: calc(100% - var(--pane-controls-h)) !important;
153+
height: calc(100% - var(--sk-pane-controls-height)) !important;
154154
visibility: hidden;
155155
pointer-events: none;
156156
}

packages/repl/src/lib/Output/PaneWithPanel.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
<style>
5858
.panel-header {
59-
height: var(--pane-controls-h);
59+
height: var(--sk-pane-controls-height);
6060
display: flex;
6161
justify-content: space-between;
6262
align-items: center;

packages/repl/src/lib/Repl.svelte

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<script lang="ts">
22
import { EditorState } from '@codemirror/state';
33
import { SplitPane } from '@rich_harris/svelte-split-pane';
4+
import { ScreenToggle } from '@sveltejs/site-kit/components';
45
import { BROWSER } from 'esm-env';
56
import { derived, writable } from 'svelte/store';
67
import Bundler from './Bundler.js';
78
import ComponentSelector from './Input/ComponentSelector.svelte';
89
import ModuleEditor from './Input/ModuleEditor.svelte';
9-
import InputOutputToggle from './InputOutputToggle.svelte';
1010
import Output from './Output/Output.svelte';
1111
import { set_repl_context } from './context.js';
1212
import { get_full_filename } from './utils.js';
@@ -326,13 +326,12 @@
326326
</div>
327327

328328
{#if $toggleable}
329-
<InputOutputToggle bind:checked={show_output} />
329+
<ScreenToggle bind:checked={show_output} />
330330
{/if}
331331
</div>
332332

333333
<style>
334334
.container {
335-
--pane-controls-h: 4.2rem;
336335
position: relative;
337336
flex: 1;
338337
background: var(--sk-back-1);
@@ -345,7 +344,7 @@
345344
:global {
346345
section {
347346
position: relative;
348-
padding: var(--pane-controls-h) 0 0 0;
347+
padding: var(--sk-pane-controls-height) 0 0 0;
349348
height: 100%;
350349
box-sizing: border-box;
351350
@@ -354,7 +353,7 @@
354353
top: 0;
355354
left: 0;
356355
width: 100%;
357-
height: var(--pane-controls-h);
356+
height: var(--sk-pane-controls-height);
358357
box-sizing: border-box;
359358
}
360359
@@ -369,8 +368,8 @@
369368
}
370369
371370
[data-pane='main'] > .divider::after {
372-
height: calc(100% - var(--pane-controls-h));
373-
top: var(--pane-controls-h);
371+
height: calc(100% - var(--sk-pane-controls-height));
372+
top: var(--sk-pane-controls-height);
374373
}
375374
}
376375
}
@@ -381,7 +380,7 @@
381380
382381
.toggleable .viewport {
383382
width: 200%;
384-
height: calc(100% - var(--pane-controls-h));
383+
height: calc(100% - var(--sk-pane-controls-height));
385384
transition: transform 0.3s;
386385
}
387386

0 commit comments

Comments
 (0)