SVG Authoring
General Handing
Some of these tools modify SVG files in situ, with the potential for destructive change, so - keep good backups.
Develop batch routines to call the tooling and HAVE THOSE BATCH FILES MAKE BACKUPS.
Differentiate between the versions that will get pipelined by Anthora from the backups, because you’ll want "easy" ways to clean up those backups.
SVG Tooling
SVGO
Be careful - this will strip all kinds of stuff out if you’re not careful. Here’s the recommended configuration for svgo.config.js:
{
"plugins": [
"removeComments",
"removeMetadata",
"removeEditorsNSData",
"cleanupAttrs",
"removeEmptyAttrs",
"removeHiddenElems",
"removeEmptyContainers",
{
"name": "cleanupIDs",
"active": false
}
]
}
SVG class- and ID- naming
Obviously, SVGs can be large and structurally complicated. Consistent naming for entities are going to be the key to useful domain structure. Maps are particularly prone to this kind of complexity. No underscores and lower-case chars only should be the rule.
The following should be used within maps:
ID Prefix |
Applies to |
Example |
h- |
Direct Hyperlinkable area |
h-gazetteer |
lm- |
Landmass |
lm-kintora |
lg- |
Landmass Group |
lg-velasia |
pol- |
Political entity or geo-region |
pol-sudholm-reede |
g- |
Group |
|
ly- |
Layer |
|
cr- |
Map Region |
|
cd- |
Map District |
|
lc- |
Locus |
|
loc- |
Location |
Class Prefix |
Applies to |
Example |