After experimenting with bootstrap, I have encountered an issue where I cannot vertically center an inline SVG relative to text. Below is a simplified example showcasing this problem:
<!DOCTYPE html>
<html>
<head>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="187a77777c7b7c7a6968733e7c607f6a">[email protected]</a>/dist/css/bootstrap.min.css"
/>
</head>
<body">
<div style="background-color: lightgrey;" class="row align-items-center">
<div class="col-auto">
<svg height="16" viewBox="0 0 100 100">
<circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
</svg>
</div>
<div style="text-transform: uppercase;" class="col pl-0">test</div>
</div>
</body>
</html>
Upon zooming to 500%, it becomes apparent that the SVG is not perfectly centered but slightly lower than expected. Interestingly, I found that removing the !DOCTYPE declaration results in the SVG being centered correctly in both Firefox and Chrome. Additionally, increasing the SVG size to 32 also resolves the issue. I am baffled as to why the presence of the doctype or the SVG size would impact the vertical alignment. Can you shed light on the root cause of this problem?