.m-faIcon
to set icons in CSS. For example:.p-navEl-link[data-nav-id="home"]::before
{
.m-faIcon(@fa-var-home);
}
Thank you, where do I add this?The icon system has changed in 2.3. It looks like your style or customizations are outdated and will need updating.
You should use.m-faIcon
to set icons in CSS. For example:
Less:.p-navEl-link[data-nav-id="home"]::before { .m-faIcon(@fa-var-home); }
extra.less
which appears to use CSS content
properties.<i class="fa ..."></i>
usages to use <xf:fa icon="..." />
. You can see here for more details:Can I install the old version? Because I think it will be difficult this way..Anywhere you've used CSS icons. That example is from your currentextra.less
which appears to use CSScontent
properties.
<i class="fa ..."></i>
usages to use<xf:fa icon="..." />
. You can see here for more details:
Font Awesome improvements
On almost every page we serve currently, we include as many as five different variants of the Font Awesome 5 Pro icon library. That's up to 8,000 icons split across their different variations, but on any given page we actually use... a lot less than that. The file size of each of these fonts is up to 200KB with an additional 40KB worth of CSS.
We have always wanted to ship a much smaller subset of icons but when admins, style designers and add-on developers have the full suite of icons available to them, this can be a challenge. In particular, working with...
You can't.Can I install the old version? Because I think it will be difficult this way..
I bought a theme. I don't know where to upload the codes...You can't.
How did you add icons with the previous version?
.m-faContent(@fa-var-name)
and <xf:fa>
were the recommended way to use icons in 2.1/2.2 and and would have continued to work in 2.3.You should contact the style author for an updated version.I bought a theme. I don't know where to upload the codes...
I may get a late response from the theme maker. Can you tell me how I can add it?The legacy icon approach is not compatible with 2.3, and both.m-faContent(@fa-var-name)
and<xf:fa>
were the recommended way to use icons in 2.1/2.2 and and would have continued to work in 2.3.
It should not be too difficult to switch over, and if you have any questions about it feel free to ask.
You should contact the style author for an updated version.
extra.less
template and replace all of the content
-based icons with .m-faIcon
..p-navEl-link[data-nav-id="home"]:before {
content: '\f015';
}
\f015
, and replace it with the variable corresponding to its name, home
:.p-navEl-link[data-nav-id="home"]:before {
.m-faIcon(@fa-var-home);
}
Which file should I search in? I'm pretty new to Xenforo :/The CSS shows that (or similar code) inextra.less
, but it may be the result of inclusions from other files. You might try using the template search fordata-nav-id="home"
to see if you can identify the source.
admin.php?templates/search
).Can you explain please how it works in Custom user fields? I had before:Anywhere you've used CSS icons. That example is from your currentextra.less
which appears to use CSScontent
properties.
You'll also need to update any<i class="fa ..."></i>
usages to use<xf:fa icon="..." />
. You can see here for more details:
Font Awesome improvements
On almost every page we serve currently, we include as many as five different variants of the Font Awesome 5 Pro icon library. That's up to 8,000 icons split across their different variations, but on any given page we actually use... a lot less than that. The file size of each of these fonts is up to 200KB with an additional 40KB worth of CSS.
We have always wanted to ship a much smaller subset of icons but when admins, style designers and add-on developers have the full suite of icons available to them, this can be a challenge. In particular, working with...
<a href="skype:{$valueUrl}?chat"><i class="fab fa-skype"></i></a>
<a href="skype:{$valueUrl}?chat"><xf:fa icon="fab fa-skype" /></a>
<xf:fa>
) is to use the JS renderer:<a href="skype:{$valueUrl}?chat">
<i class="fa--xf fab fa-skype" title="Skype" data-xf-init="icon" data-lazy="false"><svg></svg></i>
</a>
Ahhh, I realized there is simply no support for Custom user fields. Thank you very much for the solution!The easiest solution for places which don't support XF template syntax (<xf:fa>
) is to use the JS renderer:
HTML:<a href="skype:{$valueUrl}?chat"> <i class="fa--xf fab fa-skype" title="Skype" data-xf-init="icon" data-lazy="false"><svg></svg></i> </a>
We use essential cookies to make this site work, and optional cookies to enhance your experience.