I needed to resize standard icons from the core. Since they are svg, it is a little trickier to do than for rastport images. Happily, they already have a viewport
tag within the svg
element.
But it requires to change a little bit the svg code, for an other requirement is that either the height
or width
tag (but not both) of the svg
element be set to "auto"
.
And then, you still have to set the desired other dimension inside that svg element.
Since icons displayed within the same tiddlers would have the same dimensions, I opted for using a icon-height
field for that. It also requires that the icon tiddler type be set to tw5.
Here is the old start of those svg tiddlers in $:/core/images/
:
<svg width="22pt" height="22pt" class="tc-image-chevron-left tc-image-button" viewBox="0 0 128 128">
and what I propose instead:
<svg width=auto height={{!!icon-height}} class="tc-image-chevron-left tc-image-button" viewBox="0 0 128 128">
with an icon-height
field valued at 2em
to get current size (or about for I did not measure).
I think it would be a good idea to have these change in the standard core of tiddlywiki.
If you do not agree with these changes, perhaps would you agree to set these tiddlers type to svg graphics instead of undefined. It would make for a better tiddlers names in server mode.