I'm struggling with an element that has a CSS style ::before
to display an arrow-up inside a black circle.
The issue I'm facing is that the character \25b2
isn't centered vertically within the circle.
Adjusting the vertical-alignment
property moves the entire pseudo-element, including the circle. How can I move just the content inside of it?
I've managed to vertically center by adding padding to the sides but I want to keep the size of the circle unchanged...
.calculated-property-name.--expanded::before {
content: '\25b2';
color: black;
background-color: white;
border-radius: 1em;
margin: 0 0.25em 0 0;
padding: 0 0.25em;
border: 2px solid black;
font-size: 0.75em;
vertical-align: baseline;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
<a href="#" class="calculated-property-name --expanded">Confirmed Balance</a>