Skip to content

Commit dd92dc3

Browse files
authored
chore: remove self-closing tags (#617)
* remove self-closing tags in src * self-closing tags
1 parent f56c35a commit dd92dc3

File tree

60 files changed

+95
-95
lines changed

Some content is hidden

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

60 files changed

+95
-95
lines changed

content/tutorial/01-svelte/07-lifecycle/01-onmount/app-a/src/lib/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<canvas
66
width={32}
77
height={32}
8-
/>
8+
></canvas>
99

1010
<style>
1111
canvas {

content/tutorial/01-svelte/07-lifecycle/01-onmount/app-b/src/lib/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<canvas
2121
width={32}
2222
height={32}
23-
/>
23+
></canvas>
2424

2525
<style>
2626
canvas {

content/tutorial/01-svelte/07-lifecycle/03-tick/app-a/src/lib/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<textarea
2828
value={text}
2929
on:keydown={handleKeydown}
30-
/>
30+
></textarea>
3131

3232
<style>
3333
textarea {

content/tutorial/01-svelte/07-lifecycle/03-tick/app-b/src/lib/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<textarea
3030
value={text}
3131
on:keydown={handleKeydown}
32-
/>
32+
></textarea>
3333

3434
<style>
3535
textarea {

content/tutorial/02-advanced-svelte/01-motion/01-tweens/app-a/src/lib/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
const progress = writable(0);
55
</script>
66

7-
<progress value={$progress} />
7+
<progress value={$progress}></progress>
88

99
<button on:click={() => progress.set(0)}>
1010
0%

content/tutorial/02-advanced-svelte/01-motion/01-tweens/app-b/src/lib/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
});
99
</script>
1010

11-
<progress value={$progress} />
11+
<progress value={$progress}></progress>
1212

1313
<button on:click={() => progress.set(0)}>
1414
0%

content/tutorial/02-advanced-svelte/02-transitions/09-deferred-transitions/app-a/src/lib/TodoList.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<span>{todo.description}</span>
1919

20-
<button on:click={() => store.remove(todo)} aria-label="Remove" />
20+
<button on:click={() => store.remove(todo)} aria-label="Remove"></button>
2121
</label>
2222
</li>
2323
{/each}

content/tutorial/02-advanced-svelte/02-transitions/09-deferred-transitions/app-b/src/lib/TodoList.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<span>{todo.description}</span>
2323

24-
<button on:click={() => store.remove(todo)} aria-label="Remove" />
24+
<button on:click={() => store.remove(todo)} aria-label="Remove"></button>
2525
</label>
2626
</li>
2727
{/each}

content/tutorial/02-advanced-svelte/03-animations/01-animate/app-b/src/lib/TodoList.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<span>{todo.description}</span>
2525

26-
<button on:click={() => store.remove(todo)} aria-label="Remove" />
26+
<button on:click={() => store.remove(todo)} aria-label="Remove"></button>
2727
</label>
2828
</li>
2929
{/each}

content/tutorial/02-advanced-svelte/04-actions/01-actions/app-a/src/lib/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
on:click={() => {
3131
selected = color;
3232
}}
33-
/>
33+
></button>
3434
{/each}
3535
</div>
3636

content/tutorial/02-advanced-svelte/04-actions/01-actions/app-a/src/lib/Canvas.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@
6666

6767
previous = coords;
6868
}}
69-
/>
69+
></canvas>
7070

7171
{#if previous}
7272
<div
7373
class="preview"
7474
style="--color: {color}; --size: {size}px; --x: {previous.x}px; --y: {previous.y}px"
75-
/>
75+
></div>
7676
{/if}
7777

7878
<style>

content/tutorial/02-advanced-svelte/04-actions/01-actions/app-b/src/lib/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
on:click={() => {
3232
selected = color;
3333
}}
34-
/>
34+
></button>
3535
{/each}
3636
</div>
3737

content/tutorial/02-advanced-svelte/05-bindings/01-contenteditable-bindings/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ Elements with a `contenteditable` attribute support `textContent` and `innerHTML
66

77
```svelte
88
/// file: App.svelte
9-
<div +++bind:innerHTML={html}+++ contenteditable />
9+
<div +++bind:innerHTML={html}+++ contenteditable></div>
1010
```

content/tutorial/02-advanced-svelte/05-bindings/01-contenteditable-bindings/app-a/src/lib/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
let html = '<p>Write some text!</p>';
33
</script>
44

5-
<div contenteditable />
5+
<div contenteditable></div>
66

77
<pre>{html}</pre>
88

content/tutorial/02-advanced-svelte/05-bindings/01-contenteditable-bindings/app-b/src/lib/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
let html = '<p>Write some text!</p>';
33
</script>
44

5-
<div bind:innerHTML={html} contenteditable />
5+
<div bind:innerHTML={html} contenteditable></div>
66

77
<pre>{html}</pre>
88

content/tutorial/02-advanced-svelte/05-bindings/03-media-elements/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ First, add the `<audio>` element along with its bindings (we'll use the shorthan
1414
bind:currentTime={time}
1515
bind:duration
1616
bind:paused
17-
/>+++
17+
></audio>+++
1818
1919
<button
2020
class="play"
2121
aria-label={paused ? 'play' : 'pause'}
22-
/>
22+
></button>
2323
```
2424

2525
Next, add an event handler to the `<button>` that toggles `paused`:
@@ -30,7 +30,7 @@ Next, add an event handler to the `<button>` that toggles `paused`:
3030
class="play"
3131
aria-label={paused ? 'play' : 'pause'}
3232
+++on:click={() => paused = !paused}+++
33-
/>
33+
></button>
3434
```
3535

3636
Our audio player now has basic functionality. Let's add the ability to seek to a specific part of a track by dragging the slider. Inside the slider's `pointerdown` handler there's a `seek` function, where we can update `time`:
@@ -60,7 +60,7 @@ When the track ends, be kind — rewind:
6060
+++ on:ended={() => {
6161
time = 0;
6262
}}+++
63-
/>
63+
></audio>
6464
```
6565

6666
The complete set of bindings for `<audio>` and `<video>` is as follows — seven _readonly_ bindings...

content/tutorial/02-advanced-svelte/05-bindings/03-media-elements/app-a/src/lib/AudioPlayer.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<button
2222
class="play"
2323
aria-label={paused ? 'play' : 'pause'}
24-
/>
24+
></button>
2525

2626
<div class="info">
2727
<div class="description">
@@ -57,7 +57,7 @@
5757
});
5858
}}
5959
>
60-
<div class="progress" style="--progress: {time / duration}%" />
60+
<div class="progress" style="--progress: {time / duration}%"></div>
6161
</div>
6262
<span>{duration ? format(duration) : '--:--'}</span>
6363
</div>

content/tutorial/02-advanced-svelte/05-bindings/03-media-elements/app-a/src/lib/sound-on.svg

+1-1
Loading

content/tutorial/02-advanced-svelte/05-bindings/03-media-elements/app-b/src/lib/AudioPlayer.svelte

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
on:ended={() => {
2828
time = 0;
2929
}}
30-
/>
30+
></audio>
3131

3232
<button
3333
class="play"
3434
aria-label={paused ? 'play' : 'pause'}
3535
on:click={() => paused = !paused}
36-
/>
36+
></button>
3737

3838
<div class="info">
3939
<div class="description">
@@ -69,7 +69,7 @@
6969
});
7070
}}
7171
>
72-
<div class="progress" style="--progress: {time / duration}%" />
72+
<div class="progress" style="--progress: {time / duration}%"></div>
7373
</div>
7474
<span>{duration ? format(duration) : '--:--'}</span>
7575
</div>

content/tutorial/02-advanced-svelte/05-bindings/05-bind-this/app-a/src/lib/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<canvas
2121
width={32}
2222
height={32}
23-
/>
23+
></canvas>
2424

2525
<style>
2626
canvas {

content/tutorial/02-advanced-svelte/05-bindings/05-bind-this/app-b/src/lib/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
bind:this={canvas}
2323
width={32}
2424
height={32}
25-
/>
25+
></canvas>
2626

2727
<style>
2828
canvas {

content/tutorial/02-advanced-svelte/05-bindings/07-component-this/app-a/src/lib/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
on:click={() => {
3232
selected = color;
3333
}}
34-
/>
34+
></button>
3535
{/each}
3636
</div>
3737

content/tutorial/02-advanced-svelte/05-bindings/07-component-this/app-a/src/lib/Canvas.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@
6666

6767
previous = coords;
6868
}}
69-
/>
69+
></canvas>
7070

7171
{#if previous}
7272
<div
7373
class="preview"
7474
style="--color: {color}; --size: {size}px; --x: {previous.x}px; --y: {previous.y}px"
75-
/>
75+
></div>
7676
{/if}
7777

7878
<style>

content/tutorial/02-advanced-svelte/05-bindings/07-component-this/app-b/src/lib/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
on:click={() => {
3434
selected = color;
3535
}}
36-
/>
36+
></button>
3737
{/each}
3838
</div>
3939

content/tutorial/02-advanced-svelte/05-bindings/07-component-this/app-b/src/lib/Canvas.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@
7070

7171
previous = coords;
7272
}}
73-
/>
73+
></canvas>
7474

7575
{#if previous}
7676
<div
7777
class="preview"
7878
style="--color: {color}; --size: {size}px; --x: {previous.x}px; --y: {previous.y}px"
79-
/>
79+
></div>
8080
{/if}
8181

8282
<style>

content/tutorial/02-advanced-svelte/06-classes-and-styles/04-component-styles/app-a/src/lib/Box.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="box" />
1+
<div class="box"></div>
22

33
<style>
44
.box {

content/tutorial/02-advanced-svelte/06-classes-and-styles/04-component-styles/app-b/src/lib/Box.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="box" />
1+
<div class="box"></div>
22

33
<style>
44
.box {

content/tutorial/02-advanced-svelte/07-composition/01-slots/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Just like elements can have children...
1616
```svelte
1717
/// file: Card.svelte
1818
<div class="card">
19-
+++<slot />+++
19+
+++<slot></slot>+++
2020
</div>
2121
```
2222

content/tutorial/02-advanced-svelte/07-composition/02-named-slots/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ Inside `App.svelte`, we're rendering a `<Card>` component that contains `<span s
1010
/// file: Card.svelte
1111
<div class="card">
1212
+++ <header>
13-
<slot name="telephone" />
14-
<slot name="company" />
13+
<slot name="telephone"></slot>
14+
<slot name="company"></slot>
1515
</header>+++
1616
17-
<slot />
18-
17+
<slot></slot>
18+
1919
+++ <footer>
20-
<slot name="address" />
20+
<slot name="address"></slot>
2121
</footer>+++
2222
</div>
2323
```
@@ -47,12 +47,12 @@ Alternatively, we could use the `:global` modifier inside `Card.svelte` to targe
4747
```svelte
4848
/// file: Card.svelte
4949
<style>
50-
/* ... */
50+
/* ... */
5151
5252
+++.card :global(small) {
5353
display: block;
5454
font-size: 0.6em;
5555
text-align: right;
5656
}+++
5757
</style>
58-
```
58+
```

content/tutorial/02-advanced-svelte/07-composition/04-slot-props/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Open `FilterableList.svelte`. The `<slot>` is being rendered for each filtered i
1212
/// file: FilterableList.svelte
1313
<div class="content">
1414
{#each data.filter(matches) as item}
15-
<slot +++{item}+++ />
15+
<slot +++{item}+++></slot>
1616
{/each}
1717
</div>
1818
```

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
field="name"
1111
>
1212
<header slot="header" class="row">
13-
<span class="color" />
13+
<span class="color"></span>
1414
<span class="name">name</span>
1515
<span class="hex">hex</span>
1616
<span class="rgb">rgb</span>
1717
<span class="hsl">hsl</span>
1818
</header>
1919

2020
<div class="row">
21-
<span class="color" style="background-color: {row.hex}" />
21+
<span class="color" style="background-color: {row.hex}"></span>
2222
<span class="name">{row.name}</span>
2323
<span class="hex">{row.hex}</span>
2424
<span class="rgb">{row.rgb}</span>

0 commit comments

Comments
 (0)