I have one scenario, where I need to clickable .svg file object which is under anchor tag and div.
I have solution to add display:inline-block
to the div(.svg-wrapper
) or anchor tag. However, I need Display:contents
for anchor tag as well as on div due to some CSS functionality.
.component-content{
display: flex;
overflow: hidden;
}
a{
display: contents;
}
.svg-wrapper{
display: contents;
}
.svg-container{
height: auto;
align-self: start;
padding: 0 19px 0 0;
max-width: 50%;
pointer-events: none;
}
<div class="component-content">
<a href="http://google">
<div class="svg-wrapper">
<object class="svg-container" type="image/svg+xml" data="https://beta.designforventures.co/Free-Animated-SVG-Icons/warehouse/youtube-icon-dark-grey.svg">
<img src="https://beta.designforventures.co/Free-Animated-SVG-Icons/warehouse/youtube-icon-dark-grey.svg">
</object>
</div>
</a>
</div>