[TW5] variables in SVG

67 views
Skip to first unread message

infurnoape

unread,
Dec 6, 2015, 5:55:13 PM12/6/15
to tiddl...@googlegroups.com
I've figured out that I can do the following:

<svg class="tc-image-reduce tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">{{!!path}}</svg>

But is there a way that I could do something like:

<svg class="tc-image-reduce tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128"><path d="$m${{!!path}}"/></svg>

It would be nice if I could reuse paths previously defined in different icons. Any suggestions welcome.

Happy Connecting. Sent from my Sprint Samsung Galaxy S® 5

Tobias Beer

unread,
Dec 6, 2015, 7:05:56 PM12/6/15
to TiddlyWiki
Hi Andrew,

Something like...

\define my-svg()
<svg><path d="$(m)$$(path)$"/></svg>
\end

<$vars m="?!?" path={{!!path}}>
<<my-svg>>
</$vars>

?

Best wishes,

Tobias.

andrew harrison

unread,
Dec 6, 2015, 10:22:01 PM12/6/15
to tiddl...@googlegroups.com
Thank you again Tobias. That worked.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e4345711-bc7e-4c42-8c3d-ed519109978f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages