Skip to content

Commit

Permalink
tools/clean-svg: don't force the group ID onto sub-elements
Browse files Browse the repository at this point in the history
The theory (I think) here is that we can have a group "A" that
then applies to each subsequent element automatically without having
to indidivually name those elements.

This is both buggy and unnecessary and it completely breaks SVG files
generated by inkscape (1.4 at least) which will automatically assign a
group ID like "g1" to the group - resulting in our buttons etc. all
labeled as "Buttong1".

Remove this "feature".
  • Loading branch information
whot committed Oct 27, 2024
1 parent 6904482 commit e1c71d1
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions tools/clean_svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ def traverse_and_clean(node):
for key in list(node.attrib.keys()):
if key.startswith("{"):
del node.attrib[key]
if node.tag == "g" and "id" in node.attrib:
apply_id_and_class_from_group(node)
del node.attrib["id"]
if "style" in node.attrib:
if node.tag == "text":
node.attrib["style"] = "text-anchor:start;"
Expand Down

0 comments on commit e1c71d1

Please sign in to comment.