If I use an inbuilt font awesome icon on a link component, the icon and the link text look centred. If I upload an SVG asset and set the icon to the url, the icon is lower than the text.
In this screenshot, “Dashboard” is using the loaded SVG file from flaticons.com/uicons (with the link’s icon property set to ‘_/theme/home.svg’), whilst “Numbers” is using the built in FA icon (with the link’s icon property set to ‘fa:th-list’)
Is there any way to easily correct this?
edit - interestingly, the text is better centred if the icon is put to the right than if it it on the left :
edit 2 - OK, found the reason - it’s missing the “fa” class in the css for that icon. if I insert it manually using the inspector the icon raises itself correctly. Is there anyway to do this in my app? By that I mean does anyone know how I can change the CSS in theme.css to make manually loaded icons appear centred when on the left side of a link text?
edit 3 - if I take out the position: relative
from the theme.css here :
.left-nav .anvil-component-icon.left-icon {
width: 0;
margin-right: 56px;
position: relative;
top: 0.15em;
}
then it works but it messes up any font awesome positioning, forcing me to choose. Which is ok for this app, but is there a better way?