Skip to content

Commit 0591780

Browse files
authored
Overhaul tokens (#735)
* get rid of some unused junk * modularise tokens * unused * tidy up * tidy up * group colours by purpose * organise tokens * consolidate * revert * separate background colors from borders * more border stuff * move --sk-raised tokens into buttons.css
1 parent aaff89b commit 0591780

File tree

76 files changed

+464
-492
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+464
-492
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
transform: translate(-50%, -50%);
6767
width: calc(100vw - 2rem);
6868
max-width: 56rem;
69-
background: var(--sk-back-2);
70-
color: var(--sk-text-2);
69+
background: var(--sk-bg-2);
70+
color: var(--sk-fg-2);
7171
padding: 2rem;
7272
border: none;
7373
border-radius: 0.5rem;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
6262
.controls {
6363
max-width: calc(var(--sk-page-content-width) + 1rem);
64-
border-top: 1px solid var(--sk-back-4);
64+
border-top: 1px solid var(--sk-border-medium);
6565
padding: 1rem 0 0 0;
6666
margin: 1rem 0 0 0;
6767
text-wrap: balance;
@@ -83,7 +83,7 @@
8383
span {
8484
font: var(--sk-font-ui-medium);
8585
text-transform: uppercase;
86-
color: var(--sk-text-3);
86+
color: var(--sk-fg-3);
8787
8888
&.faded {
8989
opacity: 0.4;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
left: 0;
4343
top: 0;
4444
height: 100%;
45-
background-color: var(--sk-theme-1);
45+
background-color: var(--sk-fg-accent);
4646
transition: width 0.4s;
4747
}
4848

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
align-items: center;
1717
justify-content: space-between;
1818
padding: 0.6rem var(--sk-page-padding-side);
19-
background-color: var(--sk-back-2);
20-
color: var(--sk-text-1);
19+
background-color: var(--sk-bg-2);
20+
color: var(--sk-fg-1);
2121
white-space: nowrap;
2222
flex: 0;
2323
gap: 1rem;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
position: relative;
2121
2222
&:has(select:focus-visible) .raised.icon {
23-
outline: 2px solid hsla(var(--sk-theme-1-hsl), 0.6);
23+
outline: 2px solid var(--sk-fg-accent);
2424
border-radius: var(--sk-border-radius);
2525
}
2626
@@ -47,7 +47,7 @@
4747
4848
.icon {
4949
position: relative;
50-
color: var(--sk-text-3);
50+
color: var(--sk-fg-3);
5151
line-height: 1;
5252
background-size: 1.8rem;
5353
z-index: 999;

apps/svelte.dev/src/lib/tutorial/adapters/webcontainer/index.svelte.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type { Adapter } from '$lib/tutorial';
1010
import type { Item, File } from 'editor';
1111

1212
const converter = new AnsiToHtml({
13-
fg: 'var(--sk-text-3)'
13+
fg: 'var(--sk-fg-3)'
1414
});
1515

1616
/** Web container singleton */

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
padding: 0 0 0 3.2rem;
157157
position: relative;
158158
margin: 1rem 0;
159-
color: var(--sk-text-2);
159+
color: var(--sk-fg-2);
160160
font: var(--sk-font-ui-medium);
161161
162162
.avatar {
@@ -181,7 +181,7 @@
181181
font: var(--sk-font-ui-medium);
182182
z-index: 2;
183183
justify-content: space-between;
184-
outline: 1rem solid var(--sk-back-1);
184+
outline: 1rem solid var(--sk-bg-1);
185185
}
186186
187187
.controls::after {
@@ -190,7 +190,7 @@
190190
width: 100%;
191191
bottom: -2rem;
192192
height: 2rem;
193-
background: linear-gradient(to bottom, var(--sk-back-1) 0%, var(--sk-back-1) 50%, transparent);
193+
background: linear-gradient(to bottom, var(--sk-bg-1) 0%, var(--sk-bg-1) 50%, transparent);
194194
}
195195
196196
.controls form {
@@ -209,7 +209,7 @@
209209
padding: 0.5rem 1rem;
210210
line-height: 1;
211211
display: flex;
212-
border: 1px solid var(--sk-back-5);
212+
border: 1px solid var(--sk-border-medium);
213213
border-radius: var(--sk-border-radius);
214214
z-index: 2;
215215
font: var(--sk-font-ui-large);
@@ -241,15 +241,15 @@
241241
}
242242
243243
h2 {
244-
color: var(--sk-text-2);
244+
color: var(--sk-fg-2);
245245
font: var(--sk-font-ui-medium);
246246
overflow: hidden;
247247
text-overflow: ellipsis;
248248
}
249249
250250
li a {
251251
display: block;
252-
background: var(--sk-back-3);
252+
background: var(--sk-bg-3);
253253
padding: 1rem 3rem 1rem 1rem;
254254
height: 100%;
255255
line-height: 1;
@@ -259,7 +259,7 @@
259259
260260
li span {
261261
font: var(--sk-font-ui-small);
262-
color: var(--sk-text-3);
262+
color: var(--sk-fg-3);
263263
}
264264
265265
li label {
@@ -275,7 +275,7 @@
275275
}
276276
277277
ul:not(.selecting) li:hover a {
278-
background-color: var(--sk-back-4);
278+
background-color: var(--sk-bg-4);
279279
}
280280
281281
ul:not(.selecting) li:hover input {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
height: calc(100% - var(--sk-nav-height) - var(--sk-banner-height));
216216
height: calc(100dvh - var(--sk-nav-height) - var(--sk-banner-height));
217217
overflow: hidden;
218-
background-color: var(--sk-back-1);
218+
background-color: var(--sk-bg-1);
219219
box-sizing: border-box;
220220
display: flex;
221221
flex-direction: column;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@
262262
263263
.icon {
264264
position: relative;
265-
color: var(--sk-text-3);
265+
color: var(--sk-fg-3);
266266
line-height: 1;
267267
background-size: 1.8rem;
268268
z-index: 999;
@@ -303,7 +303,7 @@
303303
304304
input {
305305
background: transparent;
306-
border: 1px solid var(--sk-back-4);
306+
border: 1px solid var(--sk-border-medium);
307307
border-radius: var(--sk-border-radius);
308308
color: currentColor;
309309
width: 0;
@@ -315,7 +315,7 @@
315315
316316
.badge {
317317
position: absolute;
318-
background: var(--sk-theme-1);
318+
background: var(--sk-fg-accent);
319319
border-radius: 50%;
320320
width: 1rem;
321321
height: 1rem;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
left: 0;
6666
width: 100%;
6767
height: 100%;
68-
background-color: var(--sk-back-1);
68+
background-color: var(--sk-bg-1);
6969
overflow: hidden;
7070
box-sizing: border-box;
7171
display: flex;

0 commit comments

Comments
 (0)