Skip to content

Commit e7e8a9c

Browse files
authored
docs: remove 'thus', fix some phrasing (#16559)
1 parent e1ff6dd commit e7e8a9c

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

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 thus 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:
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

documentation/docs/06-runtime/03-lifecycle-hooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ If a function is returned from `onMount`, it will be called when the component i
4141
</script>
4242
```
4343

44-
> [!NOTE] This behaviour will only work when the function passed to `onMount` _synchronously_ returns a value. `async` functions always return a `Promise`, and thus cannot _synchronously_ return a function.
44+
> [!NOTE] This behaviour will only work when the function passed to `onMount` is _synchronous_. `async` functions always return a `Promise`.
4545
4646
## `onDestroy`
4747

documentation/docs/07-misc/07-v5-migration-guide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ In Svelte 4, you can add event modifiers to handlers:
245245
<button on:click|once|preventDefault={handler}>...</button>
246246
```
247247

248-
Modifiers are specific to `on:` and thus do not work with modern event handlers. Adding things like `event.preventDefault()` inside the handler itself is preferable, since all the logic lives in one place rather than being split between handler and modifiers.
248+
Modifiers are specific to `on:` and so do not work with modern event handlers. Adding things like `event.preventDefault()` inside the handler itself is preferable, since all the logic lives in one place rather than being split between handler and modifiers.
249249

250250
Since event handlers are just functions, you can create your own wrappers as necessary:
251251

@@ -340,7 +340,7 @@ When spreading props, local event handlers must go _after_ the spread, or they r
340340
341341
## Snippets instead of slots
342342

343-
In Svelte 4, content can be passed to components using slots. Svelte 5 replaces them with snippets, which are more powerful and flexible, and so slots have been deprecated in Svelte 5.
343+
In Svelte 4, content can be passed to components using slots. Svelte 5 replaces them with snippets, which are more powerful and flexible, and so slots are deprecated in Svelte 5.
344344

345345
They continue to work, however, and you can pass snippets to a component that uses slots:
346346

@@ -835,7 +835,7 @@ Assignments to destructured parts of a `@const` declaration are no longer allowe
835835

836836
### :is(...), :has(...), and :where(...) are scoped
837837

838-
Previously, Svelte did not analyse selectors inside `:is(...)`, `:has(...)`, and `:where(...)`, effectively treating them as global. Svelte 5 analyses them in the context of the current component. Thus, some selectors may now be treated as unused if they were relying on this treatment. To fix this, use `:global(...)` inside the `:is(...)/:has(...)/:where(...)` selectors.
838+
Previously, Svelte did not analyse selectors inside `:is(...)`, `:has(...)`, and `:where(...)`, effectively treating them as global. Svelte 5 analyses them in the context of the current component. Some selectors may now therefore be treated as unused if they were relying on this treatment. To fix this, use `:global(...)` inside the `:is(...)/:has(...)/:where(...)` selectors.
839839

840840
When using Tailwind's `@apply` directive, add a `:global` selector to preserve rules that use Tailwind-generated `:is(...)` selectors:
841841
@@ -964,7 +964,7 @@ Since these mismatches are extremely rare, Svelte 5 assumes that the values are
964964

965965
### Hydration works differently
966966

967-
Svelte 5 makes use of comments during server-side rendering which are used for more robust and efficient hydration on the client. Thus, you shouldn't remove comments from your HTML output if you intend to hydrate it, and if you manually authored HTML to be hydrated by a Svelte component, you need to adjust that HTML to include said comments at the correct positions.
967+
Svelte 5 makes use of comments during server-side rendering which are used for more robust and efficient hydration on the client. You therefore should not remove comments from your HTML output if you intend to hydrate it, and if you manually authored HTML to be hydrated by a Svelte component, you need to adjust that HTML to include said comments at the correct positions.
968968

969969
### `onevent` attributes are delegated
970970

documentation/docs/98-reference/.generated/compile-errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ In legacy mode, it was possible to reassign or bind to the each block argument i
392392
{/each}
393393
```
394394

395-
This turned out to be buggy and unpredictable, particularly when working with derived values (such as `array.map(...)`), and thus is forbidden in runes mode. You can achieve the same outcome by using the index instead:
395+
This turned out to be buggy and unpredictable, particularly when working with derived values (such as `array.map(...)`), and as such is forbidden in runes mode. You can achieve the same outcome by using the index instead:
396396

397397
```svelte
398398
<script>

packages/svelte/messages/compile-errors/script.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ In legacy mode, it was possible to reassign or bind to the each block argument i
5454
{/each}
5555
```
5656

57-
This turned out to be buggy and unpredictable, particularly when working with derived values (such as `array.map(...)`), and thus is forbidden in runes mode. You can achieve the same outcome by using the index instead:
57+
This turned out to be buggy and unpredictable, particularly when working with derived values (such as `array.map(...)`), and as such is forbidden in runes mode. You can achieve the same outcome by using the index instead:
5858

5959
```svelte
6060
<script>

0 commit comments

Comments
 (0)