2 ms·
> While they are in the exact same repo/collection, they have clashing gradient names. If you grabbed those and put them both inline, in the same page, it would
by jancsika 10y ago
> While they are in the exact same repo/collection, they have clashing gradient names. If you grabbed those and put them both inline, in the same page, it wouldn't work.
Seems like the only way around that is to take a hash of the gradient.innerHTML and use that as the id of the gradient. Of course that increases the size of the svg file, but as you point out it's necessary (comically so, given all the complexity of xml namespaces don't prevent this clash).
- jancsika 10y ago> Seems like the only way around that is to take a hash of the gradient.innerHTML ... in which case the same gradient in two different inline svgs would create a duplicate id. Too bad CSS gradients don't work in svg shapes.