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
Bind an element's `[attribute](https://developer.mozilla.org/docs/Web/HTML/Attributes)` value.
7
+
Bind an element's [`attribute`](https://developer.mozilla.org/docs/Web/HTML/Attributes) value.
8
8
9
9
```html
10
10
<a:href="url">
@@ -20,21 +20,21 @@ Bind an element's `[attribute](https://developer.mozilla.org/docs/Web/HTML/Attri
20
20
> [!WARNING][`:class`](#bind-class) and [`:style`](#bind-style) have specific handling described below.
21
21
22
22
> [!NOTE]
23
-
> Multiple attributes can be bound in a single directive using the empty shorthand `:="object"`_(e.g. `:="{ foo: 'bar', bar: true }"`)_.
23
+
> Bind multiple attributes in a single directive using the shorthand `:="object"`_(e.g. `:="{ foo: 'bar', bar: true }"`)_.
24
24
25
25
> [!NOTE]
26
-
> Any [boolean attribute defined by the HTML spec](https://html.spec.whatwg.org/#attributes-3)is handled accordingly (removed from the element when falsy).
26
+
> Boolean attributes defined by the [HTML spec](https://html.spec.whatwg.org/#attributes-3)are handled accordingly (removed when falsy).
27
27
28
28
> [!NOTE]
29
-
> Bound attributes with `null` or `undefined` values are removed from the element.
29
+
> Attributes with `null` or `undefined` values are removed.
Bind an element's `[style](https://developer.mozilla.org/docs/Web/HTML/Global_attributes/style)` attribute.
66
+
Bind an element's [`style`](https://developer.mozilla.org/docs/Web/HTML/Global_attributes/style) attribute.
67
67
68
68
```html
69
69
<p:style="{ color: 'salmon' }">
@@ -74,16 +74,16 @@ Bind an element's `[style](https://developer.mozilla.org/docs/Web/HTML/Global_at
74
74
## Notes
75
75
76
76
> [!NOTE]
77
-
> Evaluated expression can be either be:
77
+
> The expression can be:
78
78
>
79
-
> - A `string` supported by [`HTMLElement.style.cssText`](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssText)_(e.g. `"color: blue;"`)_.
80
-
> - A `Record<PropertyKey, unknown>`of CSS properties mapped to their current value _(e.g. `{ backgroundColor: "red", "border-color": "green", width: 1 }`)_.
81
-
> -[« camelCase »](https://developer.mozilla.org/docs/Glossary/Camel_case)may be used inplace of [« kebab-case »](https://developer.mozilla.org/docs/Glossary/Kebab_case) to avoid escaping CSS properties names.
82
-
> - Values of type `number` are implicitely converted to `px`unit whenever applicable _( [`HTMLElement.style.setProperty()`](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/setProperty) will be called again with `"px"` appended)_.
83
-
> - An `Array` of any of the listed supported types _(e.g. `[ "color: blue", { backgroundColor: "red" }, [] ]`)_.
79
+
> - A `string` supported by [`HTMLElement.style.cssText`](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssText)_(e.g.,`"color: blue;"`)_.
80
+
> - A `Record<PropertyKey, unknown>`mapping CSS properties to their values _(e.g.,`{ backgroundColor: "red", "border-color": "green", width: 1 }`)_.
81
+
> -Use [« camelCase »](https://developer.mozilla.org/docs/Glossary/Camel_case)instead of [« kebab-case »](https://developer.mozilla.org/docs/Glossary/Kebab_case) to avoid escaping CSS property names.
82
+
> - Values of type `number` are implicitly converted to `px`units when applicable _( [`HTMLElement.style.setProperty()`](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/setProperty) will be called with `"px"` appended)_.
83
+
> - An `Array` of the supported types _(e.g.,`[ "color: blue", { backgroundColor: "red" }, [] ]`)_.
84
84
85
85
> [!NOTE]
86
-
> Initial`style` attribute value is preserved.
86
+
> The initial`style` attribute value is preserved.
87
87
88
88
> [!NOTE]
89
-
> Specified CSS properties values are processed in the order they are defined, regardless of whether they were marked as[`!important`](https://developer.mozilla.org/docs/Web/CSS/important).
89
+
> CSS properties are processed in the order they are defined, regardless of [`!important`](https://developer.mozilla.org/docs/Web/CSS/important).
Bind an element's <code><ahref="https://developer.mozilla.org/docs/Web/HTML/Attributes">attribute</a></code> value.
4
+
Bind an element's <ahref="https://developer.mozilla.org/docs/Web/HTML/Attributes"><code>attribute</code></a> value.
5
5
</p>
6
6
<code#example*skip>
7
7
<a:href="url">
@@ -15,43 +15,43 @@
15
15
<ahref="#bind-class"><codeclass="hljs-keyword">:class</code></a> and <ahref="#bind-style"><codeclass="hljs-keyword">:style</code></a> have specific handling described below.
16
16
</mizu-warn>
17
17
<mizu-note#note>
18
-
Multiple attributes can be bound in a single directive using the empty shorthand <code><spanclass="hljs-keyword">:</span><spanclass="muted">="object"</span></code>
19
-
<i>(e.g. <code>:="{ foo: 'bar', bar: true }"</code>)</i>.
18
+
Bind multiple attributes in a single directive using the shorthand <code><spanclass="hljs-keyword">:</span><spanclass="muted">="object"</span></code>
19
+
<i>(e.g. <code><spanclass="hljs-keyword">:</span>="{ foo: 'bar', bar: true }"</code>)</i>.
20
20
</mizu-note>
21
21
<mizu-note#note>
22
-
Any <ahref="https://html.spec.whatwg.org/#attributes-3">boolean attribute defined by the HTML spec</a>is handled accordingly (removed from the element when falsy).
22
+
Boolean attributes defined by the <ahref="https://html.spec.whatwg.org/#attributes-3">HTML spec</a>are handled accordingly (removed when falsy).
23
23
</mizu-note>
24
24
<mizu-note#note>
25
-
Bound attributes with <code>null</code> or <code>undefined</code> values are removed from the element.
25
+
Attributes with <code>null</code> or <code>undefined</code> values are removed.
Bind an element's <code><ahref="https://developer.mozilla.org/docs/Web/HTML/Global_attributes/style">style</a></code> attribute.
64
+
Bind an element's <ahref="https://developer.mozilla.org/docs/Web/HTML/Global_attributes/style"><code>style</code></a> attribute.
65
65
</p>
66
66
<code#example*skip>
67
67
<p:style="{ color: 'salmon' }">
68
68
<!--...-->
69
69
</p>
70
70
</code>
71
71
<mizu-note#note>
72
-
Evaluated expression can be either be:
72
+
The expression can be:
73
73
<ul>
74
74
<li>
75
75
A <code>string</code> supported by <ahref="https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssText"><code>HTMLElement.style.cssText</code></a>
76
-
<i>(e.g. <code>"color: blue;"</code>)</i>.
76
+
<i>(e.g.,<code>"color: blue;"</code>)</i>.
77
77
</li>
78
78
<li>
79
-
A <code>Record<PropertyKey, unknown></code>of CSS properties mapped to their current value <i>(e.g. <code>{ backgroundColor: "red", "border-color": "green", width: 1 }</code>)</i>.
79
+
A <code>Record<PropertyKey, unknown></code>mapping CSS properties to their values <i>(e.g.,<code>{ backgroundColor: "red", "border-color": "green", width: 1 }</code>)</i>.
80
80
<ul>
81
81
<li>
82
-
<ahref="https://developer.mozilla.org/docs/Glossary/Camel_case"><q>camelCase</q></a>may be used inplace of <ahref="https://developer.mozilla.org/docs/Glossary/Kebab_case"><q>kebab-case</q></a> to avoid escaping CSS properties names.
82
+
Use <ahref="https://developer.mozilla.org/docs/Glossary/Camel_case"><q>camelCase</q></a>instead of <ahref="https://developer.mozilla.org/docs/Glossary/Kebab_case"><q>kebab-case</q></a> to avoid escaping CSS property names.
83
83
</li>
84
84
<li>
85
-
Values of type <code>number</code> are implicitely converted to <code>px</code>unit whenever applicable <i>(<ahref="https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/setProperty"><code>HTMLElement.style.setProperty()</code></a> will be called again with
86
-
<code>"px"</code> appended)</i>.
85
+
Values of type <code>number</code> are implicitly converted to <code>px</code>units when applicable <i>(<ahref="https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/setProperty"><code>HTMLElement.style.setProperty()</code></a> will be called with<code
86
+
>"px"</code> appended)</i>.
87
87
</li>
88
88
</ul>
89
89
</li>
90
90
<li>
91
-
An <code>Array</code> of any of the listed supported types <i>(e.g. <code>[ "color: blue", { backgroundColor: "red" }, [] ]</code>)</i>.
91
+
An <code>Array</code> of the supported types <i>(e.g.,<code>[ "color: blue", { backgroundColor: "red" }, [] ]</code>)</i>.
92
92
</li>
93
93
</ul>
94
94
</mizu-note>
95
95
<mizu-note#note>
96
-
Initial<code>style</code> attribute value is preserved.
96
+
The initial<code>style</code> attribute value is preserved.
97
97
</mizu-note>
98
98
<mizu-note#note>
99
-
Specified CSS properties values are processed in the order they are defined, regardless of whether they were marked as<ahref="https://developer.mozilla.org/docs/Web/CSS/important"><code>!important</code></a>.
99
+
CSS properties are processed in the order they are defined, regardless of <ahref="https://developer.mozilla.org/docs/Web/CSS/important"><code>!important</code></a>.
Copy file name to clipboardExpand all lines: @mizu/clean/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
Clean up the element and its children from specified content.
8
8
9
9
```html
10
-
<div*clean="">
10
+
<div*clean>
11
11
<!--...-->
12
12
</div>
13
13
```
@@ -16,16 +16,16 @@ Clean up the element and its children from specified content.
16
16
17
17
### `.comments[boolean]`
18
18
19
-
Clean up all [`Comment`](https://developer.mozilla.org/docs/Web/API/Comment) nodes from subtree.
19
+
Remove all [`Comment`](https://developer.mozilla.org/docs/Web/API/Comment) nodes within the subtree.
20
20
21
21
### `.spaces[boolean]`
22
22
23
-
Clean up all spaces (except non-breaking spaces [` `](https://developer.mozilla.org/docs/Glossary/Character_reference)) from subtree.
23
+
Remove all spaces (except non-breaking spaces [` `](https://developer.mozilla.org/docs/Glossary/Character_reference)) within the subtree.
24
24
25
25
### `.templates[boolean]`
26
26
27
-
Clean up all [`<template>`](https://developer.mozilla.org/docs/Web/HTML/Element/template) nodes from subtree **after processing the subtree entirely**.
27
+
Clear all [`<template>`](https://developer.mozilla.org/docs/Web/HTML/Element/template) nodes from the subtree **after fully processing it**.
28
28
29
29
### `.directives[boolean]`
30
30
31
-
Clean up all known directives from subtree **after processing the subtree entirely**. If `.comments` modifier is also enabled, then comments generated by directives will be cleaned up as well.
31
+
Strip all known directives from the subtree **after fully processing it**. If the `.comments` modifier is also enabled, comments generated by directives will be removed as well.
Copy file name to clipboardExpand all lines: @mizu/clean/mod.html
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -9,15 +9,15 @@
9
9
</div>
10
10
</code>
11
11
<mizu-modifier#modifiername="comments">
12
-
Clean up all <ahref="https://developer.mozilla.org/docs/Web/API/Comment"><code>Comment</code></a> nodes from subtree.
12
+
Remove all <ahref="https://developer.mozilla.org/docs/Web/API/Comment"><code>Comment</code></a> nodes within the subtree.
13
13
</mizu-modifier>
14
14
<mizu-modifier#modifiername="spaces">
15
-
Clean up all spaces (except non-breaking spaces <ahref="https://developer.mozilla.org/docs/Glossary/Character_reference"><code>&nbsp;</code></a>) from subtree.
15
+
Remove all spaces (except non-breaking spaces <ahref="https://developer.mozilla.org/docs/Glossary/Character_reference"><code>&nbsp;</code></a>) within the subtree.
16
16
</mizu-modifier>
17
17
<mizu-modifier#modifiername="templates">
18
-
Clean up all <ahref="https://developer.mozilla.org/docs/Web/HTML/Element/template"><code><template></code></a> nodes from subtree <strong>after processing the subtree entirely</strong>.
18
+
Clear all <ahref="https://developer.mozilla.org/docs/Web/HTML/Element/template"><code><template></code></a> nodes from the subtree <strong>after fully processing it</strong>.
19
19
</mizu-modifier>
20
20
<mizu-modifier#modifiername="directives">
21
-
Clean up all known directives from subtree <strong>after processing the subtree entirely</strong>. If <code>.comments</code> modifier is also enabled, then comments generated by directives will be cleaned up as well.
21
+
Strip all known directives from the subtree <strong>after fully processing it</strong>. If the <codeclass="hljs-meta">.comments</code> modifier is also enabled, comments generated by directives will be removed as well.
0 commit comments