svg suggestion - use css

4 views
Skip to first unread message

Ofir Shemesh

unread,
Apr 19, 2025, 10:54:28 AMApr 19
to TopoDroid
hi Marco and friends,
looking deep into the outcome of the exported SVG,
i have a suggestion for enhancement - use CSS classes instead of style attributes.
this way the appearance of features can be easily controlled,
by both TDX code and by users that wish to change the appearance.
just for example, for the grid:
inside the <defs> add:
<style type="text/css" id="style1">
  .grid_line {
    stroke: #999999;
    stroke-width: 2.5;
    fill: none;
  }
</style>
than instead of <path stroke-width="2.50" stroke="#999999" d="..."/>
use <path class="grid_line" d="..."/>

do the same for all features and you got better control and ease of customization.
what you think?

regards,
Ofir Shemesh

Marco Corvi

unread,
Apr 21, 2025, 5:37:49 AMApr 21
to topo...@googlegroups.com

hopefully inkscape and illustrator support css.

that's a good idea, and does not look difficult.
if you are willing to implement it, i will be happy to accept the code in the main repository.

--
You received this message because you are subscribed to the Google Groups "TopoDroid" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topodroid+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/topodroid/91263e2a-1a95-4802-8ad7-8781e1ba1115n%40googlegroups.com.

Balambér Hakapesz

unread,
Apr 21, 2025, 8:38:42 AMApr 21
to topo...@googlegroups.com
Illustrator CS4:  OK
Inkscape 1.2, 1.4: OK
LibreOffice: OK
Firefox: OK
Chrome: OK
Edge: OK
GIMP: OK


Reply all
Reply to author
Forward
0 new messages