Will this work?
<argument name="label" xsi:type="string">
<i class="fa fa-facebook fa-lg" aria-hidden="true"></i>
</argument>
EDIT – I am trying to add font awesome icons into the header.panel and footer. Thanks to comments here, I added phtml templates into the blocks in the default.xml, referenced the correct containers and now the custom ul>li>a are rendering. However the font awesome i class and icons wont show. The cdn is loading (checked in chrome developer) and I set a width and height to the .fa class. still they aren't appearing.
Best Answer
No, this won't work. You cannot mix HTML code with XML code in a layout
default.xml
file.In
app/design/frontend/Magento/luma/Magento_Customer/layout/default.xml
you can see for example how the header links are added:The
customer.phtml
template file looks like this:As you can see, the CSS classes are added there.
How to add the fontawsome CSS classes
The easiest thing would be to override these files (for example
account/customer.phtml
and add the fontawesome css class tags in these templates. You have to copy theaccount/customer.phtml
to your own theme and adjust the css classes there. Do not overwrite coure files :-)