Skip to content

Commit 4bdda3b

Browse files
authored
Remove --sk-theme-2 (#411)
* tidy up * remove some junk * fix some stuff * remove unused components * remove theme-2
1 parent 68c58ca commit 4bdda3b

File tree

22 files changed

+60
-379
lines changed

22 files changed

+60
-379
lines changed

apps/svelte.dev/content/tutorial/01-svelte/01-introduction/01-welcome-to-svelte/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ This tutorial is split into four main parts:
2727

2828
Each section will present an exercise designed to illustrate a feature. Later exercises build on the knowledge gained in earlier ones, so it's recommended that you go from start to finish. If necessary, you can navigate via the menu above.
2929

30-
If you get stuck, you can click the `solve` button <span class="desktop">to the left of the editor</span><span class="mobile">in the top right of the editor view</span>. (<span class="mobile">Use the toggle below to switch between tutorial and editor views. </span>The `solve` button is disabled on sections like this one that don't include an exercise.) Try not to rely on it too much; you will learn faster by figuring out where to put each suggested code block and manually typing it in to the editor.
30+
If you get stuck, you can click the `solve` button in the top right of the screen. (The `solve` button is disabled on sections like this one that don't include an exercise.) Try not to rely on it too much; you will learn faster by figuring out where to put each suggested code block and manually typing it in to the editor.

apps/svelte.dev/src/lib/components/ScreenToggle.svelte

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

apps/svelte.dev/src/routes/(authed)/apps/+page.svelte

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,7 @@
275275
}
276276
277277
ul:not(.selecting) li:hover a {
278-
background-color: var(--sk-theme-2);
279-
color: white;
280-
}
281-
282-
ul:not(.selecting) li:hover h2,
283-
ul:not(.selecting) li:hover span {
284-
color: white;
278+
background-color: var(--sk-back-4);
285279
}
286280
287281
ul:not(.selecting) li:hover input {

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/_home/common.css

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
}
44

55
.home {
6-
--background-1: radial-gradient(circle at top right, rgb(230, 233, 236), rgb(244, 245, 247));
7-
--background-2: var(--sk-theme-2);
86
overflow-x: hidden;
97
}
108

@@ -24,23 +22,3 @@
2422
gap: 7rem;
2523
}
2624
}
27-
28-
/* In case JS disabled */
29-
@media screen and (prefers-color-scheme: dark) {
30-
.home {
31-
/* --background-1: radial-gradient(circle at top right, rgb(49, 49, 49), rgb(77, 77, 77)); */
32-
--background-1: #222;
33-
--background-2: #444;
34-
}
35-
36-
html.light .home {
37-
--background-1: radial-gradient(circle at top right, rgb(230, 233, 236), rgb(244, 245, 247));
38-
--background-2: var(--sk-theme-2);
39-
}
40-
}
41-
42-
html.dark .home {
43-
/* --background-1: radial-gradient(circle at top right, rgb(49, 49, 49), rgb(77, 77, 77)); */
44-
--background-1: #222;
45-
--background-2: #444;
46-
}

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

Lines changed: 8 additions & 38 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 {
@@ -387,30 +389,6 @@
387389
font: var(--sk-font-ui-small);
388390
}
389391
390-
.navigator .solve {
391-
position: relative;
392-
background: var(--sk-theme-2);
393-
padding: 0.5rem;
394-
width: 100%;
395-
height: 4rem;
396-
border-right: 1px solid var(--sk-back-4);
397-
color: white;
398-
opacity: 1;
399-
font: var(--sk-font-ui-small);
400-
}
401-
402-
.navigator .solve:disabled {
403-
opacity: 0.5;
404-
}
405-
406-
.navigator .solve:not(:disabled) {
407-
background: var(--sk-theme-1);
408-
}
409-
410-
.navigator .solve.completed {
411-
background: var(--sk-theme-2);
412-
}
413-
414392
.preview {
415393
display: flex;
416394
flex-direction: column;
@@ -441,14 +419,6 @@
441419
text-align: left;
442420
}
443421
444-
.mobile .navigator .solve {
445-
width: 9rem;
446-
height: auto;
447-
padding: 0.2rem;
448-
border-radius: 4rem;
449-
border: none;
450-
}
451-
452422
.mobile-filetree {
453423
position: absolute;
454424
top: 0;

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.

apps/svelte.dev/src/routes/tutorial/[...slug]/codemirror.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,6 @@
108108
border: 2px solid transparent;
109109
}
110110

111-
.cm-editor .cm-button:active {
112-
background: var(--sk-theme-2-variant);
113-
}
114-
115111
.cm-editor .cm-textfield {
116112
background: var(--sk-back-1);
117113
color: var(--sk-text-1);

0 commit comments

Comments
 (0)