You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/content/docs/03-template-syntax.md
+13-15Lines changed: 13 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -663,7 +663,7 @@ A `<select>` value binding corresponds to the `value` property on the selected `
663
663
664
664
---
665
665
666
-
A `<select multiple>` element behaves similarly to a checkbox group.
666
+
A `<select multiple>` element behaves similarly to a checkbox group. The bound variable is an array with an entry corresponding to the `value` property of each selected `<option>`.
667
667
668
668
```sv
669
669
<select multiple bind:value={fillings}>
@@ -1024,7 +1024,7 @@ Like actions, transitions can have parameters.
1024
1024
1025
1025
Transitions can use custom functions. If the returned object has a `css` function, Svelte will create a CSS animation that plays on the element.
1026
1026
1027
-
The `t` argument passed to `css` is a value between `0` and `1` after the `easing` function has been applied. *In* transitions run from `0` to `1`, *out* transitions run from `1` to `0` — in other words `1` is the element's natural state, as though no transition had been applied. The `u` argument is equal to `1 - t`.
1027
+
The `t` argument passed to `css` is a value between `0` and `1` after the `easing` function has been applied. *In* transitions run from `0` to `1`, *out* transitions run from `1` to `0` — in other words,`1` is the element's natural state, as though no transition had been applied. The `u` argument is equal to `1 - t`.
1028
1028
1029
1029
The function is called repeatedly *before* the transition begins, with different `t` and `u` arguments.
1030
1030
@@ -1307,14 +1307,12 @@ A custom animation function can also return a `tick` function, which is called *
@@ -1415,7 +1413,7 @@ Svelte's CSS Variables support allows for easily themeable components:
1415
1413
1416
1414
---
1417
1415
1418
-
So you can set a highlevel theme color:
1416
+
So you can set a high-level theme color:
1419
1417
1420
1418
```css
1421
1419
/* global.css */
@@ -1575,7 +1573,7 @@ Note that explicitly passing in an empty named slot will add that slot's name to
1575
1573
1576
1574
---
1577
1575
1578
-
Slots can be rendered zero or more times, and can pass values *back* to the parent using props. The parent exposes the values to the slot template using the `let:` directive.
1576
+
Slots can be rendered zero or more times and can pass values *back* to the parent using props. The parent exposes the values to the slot template using the `let:` directive.
1579
1577
1580
1578
The usual shorthand rules apply — `let:item` is equivalent to `let:item={item}`, and `<slot {item}>` is equivalent to `<slot item={item}>`.
1581
1579
@@ -1666,11 +1664,11 @@ If `this` is falsy, no component is rendered.
1666
1664
1667
1665
The `<svelte:element>` element lets you render an element of a dynamically specified type. This is useful for example when displaying rich text content from a CMS. Any properties and event listeners present will be applied to the element.
1668
1666
1669
-
The only supported binding is `bind:this`, since the element typespecific bindings that Svelte does at build time (e.g. `bind:value` for input elements) do not work with a dynamic tag type.
1667
+
The only supported binding is `bind:this`, since the element type-specific bindings that Svelte does at build time (e.g. `bind:value` for input elements) do not work with a dynamic tag type.
1670
1668
1671
1669
If `this` has a nullish value, the element and its children will not be rendered.
1672
1670
1673
-
If `this` is the name of a void tag (e.g., `br`) and `<svelte:element>` has child elements, a runtime error will be thrown in development mode.
1671
+
If `this` is the name of a [void element](https://developer.mozilla.org/en-US/docs/Glossary/Void_element) (e.g., `br`) and `<svelte:element>` has child elements, a runtime error will be thrown in development mode.
1674
1672
1675
1673
```sv
1676
1674
<script>
@@ -1716,7 +1714,7 @@ You can also bind to the following properties:
1716
1714
*`outerHeight`
1717
1715
*`scrollX`
1718
1716
*`scrollY`
1719
-
*`online` — an alias for window.navigator.onLine
1717
+
*`online` — an alias for `window.navigator.onLine`
0 commit comments