Skip to content

Commit 2b60b6a

Browse files
authored
move breaking change note
1 parent 18dabb7 commit 2b60b6a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ import App from './App.svelte';
9393
+ const { html, head } = render(App, { props: { message: 'hello' } });
9494
```
9595

96-
`render` also no longer returns CSS; it should be served separately from a CSS file.
96+
In Svelte 4, rendering a component to a string also returned the CSS of all components. In Svelte 5, this is no longer the case by default because most of the time you're using a tooling chain that takes care of it in other ways (like SvelteKit). If you need CSS to be returned from `render`, you can set the `css` compiler option to `'injected'` and it will add `<style>` elements to the `head`.
9797

9898
### Component typing changes
9999

@@ -217,10 +217,6 @@ In the event that you need to support ancient browsers that don't implement `:wh
217217
css = css.replace(/:where\((.+?)\)/, '$1');
218218
```
219219

220-
### CSS no longer returned from server render by default
221-
222-
In Svelte 4, rendering a component to a string also returned the CSS of all components. In Svelte 5, this is no longer the case by default because most of the time you're using a tooling chain that takes care of it in other ways (like SvelteKit). If you need CSS to be returned from `render`, you can set the `css` compiler option to `'injected'` and it will add `<style>` elements to the `head`.
223-
224220
### Error/warning codes have been renamed
225221

226222
Error and warning codes have been renamed. Previously they used dashes to separate the words, they now use underscores (e.g. foo-bar becomes foo_bar). Additionally, a handful of codes have been reworded slightly.

0 commit comments

Comments
 (0)