1
0
Fork 0

Merge pull request 'fix(dev:docs): Improve SVG signatures' (#376) from BenJamesBen/freesewing:svg-docs-improvements into develop

Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/376
Reviewed-by: Joost De Cock <joostdecock@noreply.codeberg.org>
This commit is contained in:
Joost De Cock 2025-05-24 08:24:22 +02:00
commit 503d0d731c
2 changed files with 24 additions and 4 deletions

View file

@ -9,8 +9,21 @@ SVG document.
## 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>
/* 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>
```

View file

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