Skip to content

Commit 4f6bb41

Browse files
authored
More docs stuff (#13769)
* fix * link * more docs stuff * more * more * fix * more * more * fix * fix * more * ffs * FML
1 parent 4c7cfff commit 4f6bb41

37 files changed

+1052
-995
lines changed

documentation/docs/01-introduction/03-svelte-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ CSS inside a `<style>` block will be scoped to that component.
6666
</style>
6767
```
6868

69-
For more information regarding styling, read the documentation around [styles and classes](styles-and-classes).
69+
For more information, head to the section on [styling](scoped-styles).

documentation/docs/02-runes/04-$effect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ $effect(() => {
9595
});
9696
```
9797

98-
An effect only reruns when the object it reads changes, not when a property inside it changes. (If you want to observe changes _inside_ an object at dev time, you can use [`$inspect`](debugging#$inspect).)
98+
An effect only reruns when the object it reads changes, not when a property inside it changes. (If you want to observe changes _inside_ an object at dev time, you can use [`$inspect`]($inspect).)
9999

100100
```svelte
101101
<script>

documentation/docs/03-template-syntax/[email protected]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ It also will not compile Svelte code.
2222

2323
## Styling
2424

25-
Content rendered this way is 'invisible' to Svelte and as such will not receive [scoped styles](styles-and-classes) — in other words, this will not work, and the `a` and `img` styles will be regarded as unused:
25+
Content rendered this way is 'invisible' to Svelte and as such will not receive [scoped styles](scoped-styles) — in other words, this will not work, and the `a` and `img` styles will be regarded as unused:
2626

2727
<!-- prettier-ignore -->
2828
```svelte
Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,7 @@
11
---
2-
title: Debugging
2+
title: {@debug ...}
33
---
44

5-
- `@debug`
6-
- `$inspect`
7-
8-
Svelte provides two built-in ways to debug your application.
9-
10-
## `$inspect`
11-
12-
TODO
13-
14-
## @debug
15-
16-
```svelte
17-
<!--- copy: false --->
18-
{@debug}
19-
```
20-
21-
```svelte
22-
<!--- copy: false --->
23-
{@debug var1, var2, ..., varN}
24-
```
25-
265
The `{@debug ...}` tag offers an alternative to `console.log(...)`. It logs the values of specific variables whenever they change, and pauses code execution if you have devtools open.
276

287
```svelte
@@ -53,3 +32,4 @@ The `{@debug ...}` tag offers an alternative to `console.log(...)`. It logs the
5332
```
5433

5534
The `{@debug}` tag without any arguments will insert a `debugger` statement that gets triggered when _any_ state changes, as opposed to the specified variables.
35+

documentation/docs/03-template-syntax/10-bind.md renamed to documentation/docs/03-template-syntax/11-bind.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,14 @@ To get a reference to a DOM node, use `bind:this`. The value will be `undefined`
249249
Components also support `bind:this`, allowing you to interact with component instances programmatically.
250250

251251
```svelte
252-
<!--- App.svelte --->
252+
<!--- file: App.svelte --->
253253
<ShoppingCart bind:this={cart} />
254254
255255
<button onclick={() => cart.empty()}> Empty shopping cart </button>
256256
```
257257

258258
```svelte
259-
<!--- ShoppingCart.svelte --->
259+
<!--- file: ShoppingCart.svelte --->
260260
<script>
261261
// All instance exports are available on the instance object
262262
export function empty() {
@@ -279,7 +279,7 @@ You can bind to component props using the same syntax as for elements.
279279

280280
While Svelte props are reactive without binding, that reactivity only flows downward into the component by default. Using `bind:property` allows changes to the property from within the component to flow back up out of the component.
281281

282-
To mark a property as bindable, use the `$bindable` rune:
282+
To mark a property as bindable, use the [`$bindable`]($bindable) rune:
283283

284284
```svelte
285285
<script>

documentation/docs/03-template-syntax/11-use.md

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

0 commit comments

Comments
 (0)