Skip to content

Commit 12fe24b

Browse files
[feat] styles update (sveltejs#116)
Co-authored-by: Rich Harris <hello@rich-harris.dev>
1 parent 5700d33 commit 12fe24b

File tree

43 files changed

+219
-305
lines changed

Some content is hidden

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

43 files changed

+219
-305
lines changed

content/tutorial/01-svelte/03-props/03-spread-props/app-a/src/lib/PackageInfo.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@
88
</script>
99

1010
<p>
11-
The <code>{name}</code> package is {speed} fast.
12-
Download version {version} from
11+
The <code>{name}</code> package is {speed} fast. Download version {version}
12+
from
1313
<a {href}>npm</a>
1414
and <a href={website}>learn more here</a>
1515
</p>
1616

1717
<style>
1818
code {
1919
font-family: Menlo;
20-
background: #eee;
2120
padding: 0.1em 0.2em;
2221
border-radius: 0.2em;
2322
}

content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-a/src/lib/Thing.svelte

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,10 @@
3030
border-radius: 0.2em;
3131
background-color: #ffdfd3;
3232
}
33+
34+
@media (prefers-color-scheme: dark) {
35+
span {
36+
background-color: #4f352b;
37+
}
38+
}
3339
</style>

content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-b/src/lib/Thing.svelte

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,10 @@
2929
border-radius: 0.2em;
3030
background-color: #ffdfd3;
3131
}
32+
33+
@media (prefers-color-scheme: dark) {
34+
span {
35+
background-color: #4f352b;
36+
}
37+
}
3238
</style>

content/tutorial/01-svelte/04-logic/06-await-blocks/app-a/src/lib/App.svelte

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script>
22
async function getRandomNumber() {
33
const res = await fetch(
4-
`tutorial/random-number`
4+
`https://svelte.dev/tutorial/random-number`
55
);
66
const text = await res.text();
77
@@ -19,9 +19,7 @@
1919
}
2020
</script>
2121

22-
<button on:click={handleClick}>
23-
generate random number
24-
</button>
22+
<button on:click={handleClick}> generate random number </button>
2523

2624
<!-- replace this element -->
2725
<p>{promise}</p>

content/tutorial/01-svelte/04-logic/06-await-blocks/app-b/src/lib/App.svelte

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script>
22
async function getRandomNumber() {
33
const res = await fetch(
4-
`tutorial/random-number`
4+
`https://svelte.dev/tutorial/random-number`
55
);
66
const text = await res.text();
77
@@ -19,9 +19,7 @@
1919
}
2020
</script>
2121

22-
<button on:click={handleClick}>
23-
generate random number
24-
</button>
22+
<button on:click={handleClick}> generate random number </button>
2523

2624
{#await promise}
2725
<p>...waiting</p>

content/tutorial/02-sveltekit/06-errors-and-redirects/03-fallback-errors/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ You can customise the fallback error page. Create a `src/error.html` file:
2222
<head>
2323
<meta charset="utf-8" />
2424
<title>%sveltekit.error.message%</title>
25+
<style>
26+
body {
27+
color: #ff531a;
28+
}
29+
</style>
2530
</head>
2631
<body>
2732
<h1>Game over</h1>

content/tutorial/02-sveltekit/06-errors-and-redirects/03-fallback-errors/app-b/src/error.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
<head>
44
<meta charset="utf-8" />
55
<title>%sveltekit.error.message%</title>
6+
<style>
7+
body {
8+
color: #ff531a;
9+
}
10+
</style>
611
</head>
712
<body>
813
<h1>Game over</h1>

content/tutorial/03-advanced-svelte/07-composition/04-optional-slots/app-a/src/lib/Project.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@
5353
}
5454
5555
p {
56-
color: #777;
56+
opacity: 0.9;
5757
margin: 0;
5858
}
5959
6060
.discussion {
61-
background-color: #eee;
61+
background-color: rgba(82, 81, 75, 0.1);
6262
border-top: 1px #ccc solid;
6363
}
6464
</style>

content/tutorial/03-advanced-svelte/07-composition/04-optional-slots/app-b/src/lib/Project.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555
}
5656
5757
p {
58-
color: #777;
58+
opacity: 0.9;
5959
margin: 0;
6060
}
6161
6262
.discussion {
63-
background-color: #eee;
63+
background-color: rgba(82, 81, 75, 0.1);
6464
border-top: 1px #ccc solid;
6565
}
6666
</style>

content/tutorial/03-advanced-svelte/07-composition/05-slot-props/app-a/src/lib/App.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
div {
1717
padding: 1em;
1818
margin: 0 0 1em 0;
19-
background-color: #eee;
19+
border: 1px solid #ff3e00;
2020
}
2121
2222
.active {

0 commit comments

Comments
 (0)