.rect-x {
fill: red;
}
.rect-y {
fill: pink;
}
<svg viewBox="0 0 1024 768">
<rect class="rect-x" x="0" y="0" width="100" height="100"></rect>
<rect class="rect-y" x="0" y="0" width="100" height="100"></rect>
</svg>
Screenshot showing the issue:
https://i.sstatic.net/QUwcg.png
Can you explain why this is happening?
Any suggestions on how to resolve it?