-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
inlineStyles plugin should not remove id attribute from elements.
- Loading branch information
1 parent
9078e8c
commit 6dfded9
Showing
3 changed files
with
22 additions
and
19 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,20 @@ | ||
inlineStyles plugin should not remove id attribute from target element. | ||
|
||
See: https://github.com/svg/svgo/issues/1486 | ||
|
||
=== | ||
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"> | ||
<style> | ||
#a {stroke:red;} | ||
</style> | ||
<path id="a" d="M 2 2 h10"/> | ||
<use href="#a" x="5" y="5"/> | ||
</svg> | ||
|
||
@@@ | ||
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"> | ||
<path id="a" d="M 2 2 h10" style="stroke:red"/> | ||
<use href="#a" x="5" y="5"/> | ||
</svg> |