mirror of https://github.com/sveltejs/svelte
parent
db0b3b3dfc
commit
a1d6b79ffc
@ -0,0 +1,12 @@
|
|||||||
|
import * as assert from "assert";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
preprocess: {
|
||||||
|
style: ({ content, attributes: { color } }) => {
|
||||||
|
assert.equal(content, "");
|
||||||
|
return {
|
||||||
|
code: `div { color: ${color}; }`
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,3 @@
|
|||||||
|
<div class='brand-color'>$brand</div>
|
||||||
|
|
||||||
|
<style color="red"/>
|
@ -0,0 +1,3 @@
|
|||||||
|
<div class='brand-color'>$brand</div>
|
||||||
|
|
||||||
|
<style color="red">div { color: red; }</style>
|
Loading…
Reference in new issue