I am trying to vertically center a smaller "@" symbol sandwiched between larger text, but "vertical-align: middle;" is barely bringing it up to the baseline with the other text.
As this screengrab shows, with the vertical-align property, the @ sign is still sitting on the baseline of the text. I suppose this is due to the extra space that is included above the @ character? Code snippet attached below roughly approximates my issue.
html{
font-size: 20px;
}
h1 {
font-size: 3.5rem;
font-weight: 600;
line-height: 1;
color: orange;
letter-spacing: -.1rem;
}
h1 .alt {
color: black;
font-weight: 400;
white-space: nowrap;
}
h1 span.mini {
font-size: 2rem;
vertical-align: middle;
}
<h1>
Hello <span class="alt"><span class="mini">@</span> Py</span>
</h1>