1
0
Fork 0

fix(dev:docs): Improve SVG signatures

This commit is contained in:
Benjamin Fan 2025-05-19 17:25:17 -07:00
parent af0dcc9784
commit 630fa96417
2 changed files with 24 additions and 4 deletions

View file

@ -9,8 +9,21 @@ SVG document.
## Signature ## Signature
```svg ```js
Defs svg.defs = {
list = {
buttonhole: `<g id="buttonhole" transform="scale(1)">
<path class="mark" d="M -1,-5 L 1,-5 L 1,5 L -1,5 z"></path>
</g>`,
},
}
```
Result:
```
<defs> <defs>
/* svg.defs will be inserted */ <g id="buttonhole" transform="scale(1)">
<path class="mark" d="M -1,-5 L 1,-5 L 1,5 L -1,5 z"></path>
</g>
</defs> </defs>
``` ```

View file

@ -7,9 +7,16 @@ section of the SVG document.
## Signature ## Signature
```svg ```js
String svg.style += 'circle {stroke:black;}'
```
Result:
```
<style type="text/css"> <style type="text/css">
/* svg.style will be inserted */ circle {
stroke: black;
}
</style> </style>
``` ```