Safari is displaying box-shadow
cut when hovering SVGs. I assume this is a Safari only bug, as it renders fine on every other browser (Chromium based & Firefox).
If I apply the shadow to the static element as svg {box-shadow: 0px 0px 0px 1px #5030FF;}
it shows fine.
Tried suggestions in the following threads but no luck. Ideally would like it to work with box-shadow
, if the chance exists.
svg {
border-radius: 50%;
}
svg:hover {
box-shadow: 0px 0px 0px 1px #5030FF;
}
<div>
<svg xmlns="http://www.w3.org/2000/svg" width="150" height="150" viewBox="0 0 150 150">
<rect fill="#ddd" width="150" height="150" />
<text fill="rgba(0,0,0,0.5)" font-family="sans-serif" font-size="30" dy="10.5" font-weight="bold" x="50%" y="50%" text-anchor="middle">150×150</text>
</svg>
</div>