Below is a screen capture of a problem I have encountered many times already, which I have ignored, but now it sorts of bothers me.
The relevant code for this snippet is
.container {
width: 200px;
}
.labelContainer {
display: flex;
flex-direction: row;
margin-right: 48px;
}
.label {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
<div>
<a href="#" class="labelContainer">
<span class="label">Super Transporter Company 3000 Ltd.</span>
<svg width="24" height="24" fill="currentColor" viewBox="0 0 24 24" style="width:24px !important;">
<path d="M10,17L15,12L10,7V17Z"></path>
</svg>
</a>
</div>
<div class="container">
<a href="#" class="labelContainer">
<span class="label">Super Transporter Company 3000 Ltd.</span>
<svg width="24" height="24" fill="currentColor" viewBox="0 0 24 24" style="width:24px !important;">
<path d="M10,17L15,12L10,7V17Z"></path>
</svg>
</a>
</div>
Why does this happen? How can I prevent the SVG element from resizing?
