Skip to content

Commit e03b90b

Browse files
committed
upd
1 parent 632901d commit e03b90b

1 file changed

Lines changed: 20 additions & 10 deletions

File tree

  • src/overview/xml-capabilities

src/overview/xml-capabilities/jet.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The `key` attribute is reserved for uniquely identifying interpolated collection
1818

1919
## Linking cascading style sheets
2020

21-
`s:` attributes are used for linking style sheets (`s:link={source}`) and argumenting the stylesheet (like `s:color="red"`, which is referred by the style sheet as `param(color)`).
21+
`stylesheet:` attributes are used for linking style sheets (`stylesheet:link={source}`) and argumenting the stylesheet (like `stylesheet:color="red"`, which is referred by the style sheet as `param(color)`).
2222

2323
```
2424
package com.fun.components {
@@ -30,7 +30,11 @@ package com.fun.components {
3030
""";
3131
3232
return (
33-
<j:Button s:link={stylesheet} s:color="yellow">click me</j:Button>
33+
<j:Button
34+
stylesheet:link={stylesheet}
35+
stylesheet:color="yellow">
36+
click me
37+
</j:Button>
3438
);
3539
}
3640
}
@@ -46,7 +50,11 @@ package com.fun.components {
4650
const stylesheet = Embed("CustomComponent.css", static="text/plain");
4751
4852
return (
49-
<j:Button s:link={stylesheet} s:color="yellow">Click me</j:Button>
53+
<j:Button
54+
stylesheet:link={stylesheet}
55+
stylesheet:color="yellow">
56+
Click me
57+
</j:Button>
5058
);
5159
}
5260
}
@@ -58,10 +66,10 @@ package com.fun.components {
5866

5967
#### Linking style sheets in custom components
6068

61-
For a component to support `s:` attributes, it simply needs to support a `stylesheet : [Fuse::StyleSheet]` parameter.
69+
For a component to support `stylesheet:` attributes, it simply needs to support a `stylesheet : [Fuse::StyleSheet]` parameter.
6270

63-
- When a `s:link` attribute is given a `[Fuse::StyleSheet]`, it will not consume the given `s:` parameters and will instead add the `Fuse::StyleSheet`s directly, in attribute order.
64-
- The `s:link` attribute may appear multiple times.
71+
- When a `stylesheet:link` attribute is given a `[Fuse::StyleSheet]`, it will not consume the given `stylesheet:` parameters and will instead add the `Fuse::StyleSheet`s directly, in attribute order.
72+
- The `stylesheet:link` attribute may appear multiple times.
6573

6674
```
6775
package com.fun.components {
@@ -74,16 +82,18 @@ package com.fun.components {
7482
//
7583
7684
return (
77-
<j:Button s:link={stylesheet}>Click me</j:Button>
85+
<j:Button stylesheet:link={stylesheet}>Click me</j:Button>
7886
);
7987
}
8088
}
8189
```
8290

8391
## Specifying inline styles
8492

85-
Use `i:n={v}` attributes as a shortcut to `style={{ ..., n: v }}`.
93+
Use `style:n={v}` attributes as a shortcut to `style={{ ..., n: v }}`.
8694

8795
```
88-
<j:Button i:background="orange">button1</j:Button>
89-
```
96+
<j:Button style:background="orange">button1</j:Button>
97+
```
98+
99+
Inline style values are converted to `String` automatically.

0 commit comments

Comments
 (0)