mirror of https://github.com/sveltejs/svelte
parent
c1588b21d8
commit
83b2c820b6
@ -1,8 +1,15 @@
|
|||||||
<script>
|
<script>
|
||||||
export let foo = "font-size: 20px; color: blue;";
|
export let foo = "font-size: 20px; color: blue;";
|
||||||
let bar = "32";
|
let baz = "red"; // static value
|
||||||
let baz = "red";
|
let bar = "32"; // static value interpolated
|
||||||
export let bg = "gre";
|
export let bg = "gre"; // dynamic value interpolated/cached
|
||||||
|
export let borderColor = "green"; // dynamic value non-cached
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<p style:font-size="{bar}px" style:color={baz} style="{foo}" style:background-color="{bg}en" />
|
<p
|
||||||
|
style:font-size="{bar}px"
|
||||||
|
style:color={baz}
|
||||||
|
style="{foo}"
|
||||||
|
style:background-color="{bg}en"
|
||||||
|
style:border-color={borderColor}
|
||||||
|
/>
|
||||||
|
|||||||
Loading…
Reference in new issue