Ok, this is an odd one. I have some SVGs generated by a procedure from a JSON configuration string. They seem to be working fine, except, when they’re in the right-hand column of a zig-zag table.
I’m working on a political site for a local party ahead of this year’s municipal elections, similar to what I did two years ago. This is what one page looked like then:
This year, I am not creating these images in an external tool and importing the PNGs to TiddlyWiki. Instead, I’m building them as SVGs inside TW, and planning on exporting the resulting file for the sign-maker. Everything seemed to go fine until I went to display them in a similar page to the above. This time all the text
nodes seem to be offset about 300 pixels left, cutting most of it off… but only when the SVG is in the right-hand column!
When viewed by itself, it looks find:
This seems extremely bizarre. I have no ideas why this happens; I don’t even have a useful way to investigate. (The DOM/CSS inspectors in Brave, Firefox, and Chrome developer tools don’t seem to tell me anything useful.)
This is at http://scott.sauyet.com/Tiddlywiki/WIP/DTC/2025/#Lawn%20Sign. The previous version is at
http://scott.sauyet.com/Tiddlywiki/WIP/DTC/2023/#Lawn%20Sign. In both, you can use (CTRL|CMD)-SHIFT-/
to toggle off read-only mode. (Update: reduced examples created in place of the old ones.)These are temporary, I’m afraid. I’ll delete these versions before long, as I don’t want even slightly sensitive political information permanently on the web. But I also don’t have the time to usefully anonymize it.
The standalone SVG looks fine. I generate it with this call:
<<lawn-sign """{
"type": "3-name",
"footer": {"text": "Vote Democratic!", "xOffset": "50"},
"position": {"text": "Board of Finance", "xOffset": "280"},
"names": [
{"name": "Nicholas Clark", "xOffset": "75"},
{"name": "Robert England", "xOffset": "65"},
{"name": "Heather Van Cara", "xOffset": "45"}
]
}""">>
passing a JSON string into the lawn-sign
procedure, which can be found in $:/_/adtc/procedures/lawn-sign.
This is not a critical problem. It’s just an annoyance. But I don’t understand it at all, and would really like to. Does anyone have advice about CSS in SVG or proper generation of SVG in TW that might fix this?