-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow SVG elements to have scoped CSS - fixes #1224
- Loading branch information
1 parent
d9136d9
commit b763714
Showing
4 changed files
with
33 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export default { | ||
compileOptions: { | ||
cascade: false | ||
}, | ||
|
||
data: { | ||
x: 'bar' | ||
}, | ||
|
||
html: ` | ||
<svg> | ||
<circle class="svelte-i03x00" cx=50 cy=50 r=50 /> | ||
<circle class="foo svelte-i03x00" cx=150 cy=50 r=50 /> | ||
<circle class="bar svelte-i03x00" cx=250 cy=50 r=50 /> | ||
</svg> | ||
` | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<svg> | ||
<circle cx=50 cy=50 r=50/> | ||
<circle class='foo' cx=150 cy=50 r=50/> | ||
<circle class='{{x}}' cx=250 cy=50 r=50/> | ||
</svg> | ||
|
||
<style> | ||
circle { | ||
fill: red; | ||
} | ||
</style> |