I have a program that depending on the output of one function, gets the status code of one function and returns a font-awesome icon in a card in angular. However the font awesome icons have different dimensions each, so I cannot use the transform: scale()
function of css, but I all the icons have to be 45x45px.
I have already tried using transform
but I found out the icons didn't have the same dimensions. I have also tried using font-size
which fixed only the height (obviously).
Here is the element with the icon
<div class="msgbox_icon">
<span class="text-gray-500 fa-4x far {{icon}}"></span>
</div>
my default font-size is
$font-size-base: 0.875rem; //14px
and here is my
.msgbox_icon {
padding-right:60px;
padding-left:20px;
display: flex;
align-items: center;
}
so I had tried adding font-size: 3.2142857em!important;
and then using
transform: scale(1.15, 0.987)
because for some reason the height wouldn't be 45 but 45.6
I had also tried earlier using width and height but then found out that font-awesome icons behave like text characters.