Magento 2 – How to Add Icons to User Links (My Account, Login, Sign In)

magento2toplinks

Further in Magento 1, I could just edit the html template file and do anything I could imagine. Now with this complicated with xml thing, extending templates etc. I'm confused.

What I' trying to do is the following :
Text under Icon on top.

I don't know where I can add that span tag before the text, so I can style them in CSS?

I looked into all files can't find it.

Below is an example of what I want to do.

enter image description here

Best Answer

You have to pass an arguments in default.xml for add class in account link:

<block class="Magento\Customer\Block\Account\Link" name="my-account-link">
 <arguments>
       <argument name="label" xsi:type="string" translate="true">My Account</argument>
       <argument name="class" xsi:type="string" translate="true">account-link</argument>
  </arguments>
</block>