my .svg inside my next-js project wont show no matter what, because of:
svg:not(:root) {
overflow: hidden;
}
what is this for?
changing it to:
svg:not(:root) {
overflow: visible;
}
will show the svg icons, but I have another website also using svg:not(:root) { overflow: hidden; } and the svg icons are showing, I do not see any significant differences of the CSS for these 2x websites, so I am now confused, what is svg:not(:root) for?
here is how I use my svg in HTML:
<svg aria-label="check" style="width: 24px; height: 24px; position: relative;" role="presentation">
<use xlink:href="/assets/icons/test.svg?v=130#check" style="fill: currentcolor;"></use>
</svg>
here is how the content of test.svg look like:
<svg viewBox="0 0 750 500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
:root>svg {
display: none
}
:root>svg:target {
display: block
}
</style>
...
<svg viewBox="0 0 24 24" id="check" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none" />
<path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" />
</svg>
...
</svg>