XF 2.0 [SOLVED] Custom CSS stylesheet in template

#1
How can I create a custom CSS stylesheet for my addon's template?

1520279283723.png
I tried simply including a css file in the templates folder but this isn't recognised (is there anything else I need to do?)

XML:
<xf:title>Link Minecraft Account</xf:title>
<xen:require css="continuity_general.css">

<br>

...
As you can see, I do xen:require it in the template.
 

Jeremy P

Well-known member
#3
@SamJakob That would work on XF1. For XF2:

HTML:
<xf:css src="continuity_general.css" />
You can use LESS too if you want, by renaming the template continuity_general.less
 
#11
Additional note:
XML:
<xf:css src="continuity_general.css" />
^ This is how you include CSS stylesheets in XenForo 2 (so if your CSS isn't showing up, that's what went wrong).
 
Top