You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a lot of flags with linear gradients, which are give ids like "linearGradient-1".."linearGradient-n".
So, let's say you have the AR flag, followed by RO.
AR has two linear-gradient elements: id="linearGradient-1" and id="linearGradient-2"
RO has 3: id="linearGradient-1", id="linearGradient-2" and id="linearGradient-3"
In this case, if they are on the same HTML page, the RO flag will use the gradients 1 and 2 from the AG file:
AG: => RO: , AUS: , UK:
The text was updated successfully, but these errors were encountered:
One solution is to use an svg optimization library such as svgo to prefix all the IDs with a code unique to each SVG.
Here is some example code (for Node) that I used in my own project. You can generalize this to run over each file, but the main bit is to use the cleanupIDs plugin with svgo.
constfs=require('fs');constSVGO=require('svgo');// Processing US onlyconstsvgo=newSVGO({plugins: {// lots of plugins & optimizations availablecleanupIDs: {prefix: 'US'}}});constsvgUS=fs.readFileSync('./US.svg').toString();svgo.optimize(svgUS).then(res=>{fs.writeFileSync('./optimized/US.svg',res.data);});
There are a lot of flags with linear gradients, which are give ids like "linearGradient-1".."linearGradient-n".
So, let's say you have the AR flag, followed by RO.
AR has two linear-gradient elements: id="linearGradient-1" and id="linearGradient-2"
RO has 3: id="linearGradient-1", id="linearGradient-2" and id="linearGradient-3"
In this case, if they are on the same HTML page, the RO flag will use the gradients 1 and 2 from the AG file:
=> RO:
, AUS:
, UK: 
AG:
The text was updated successfully, but these errors were encountered: