I know if i add the hole SVG code in HTML i can access all the layers via CSS. But in this case i want to have my SVG as a separate file and then in HTML i'm linking to it. But is it possible to access the layers in CSS?
<div class="test"><img src="file.svg" /></div>
So i have tried this:
let poly_shapes = function myfunction() {
var x = document.getElementById("svg1");
var y = x.contentDocument.getElementById('clouds_1_');
return y;};
HTML i have:
<object id="svg1" data="pilis.svg" type="image/svg+xml"></object>
Before this if i had my svg code in html this JS would work
let poly_shapes = $('#clouds_1_')