XF 2.0 How to add a css template?

Aivaras

Well-known member
Licensed customer
I would like to add a new CSS template to XF2.

If I insert:
CSS:
.test
{
    color: red;
}

in "extra.less" the code is working.

If I insert the above code in a newly created CSS template "test.css" the code is not working.

I've also tried inserting <xf:css src="test.css" /> in "extra.less" to no avail.

What's the missing bit here?
 
You can use <xf:include template="test.less" />, notice the “.less”. I would generally use the other method in an HTML template.
 
It would benefit us to know what you want to do. Normally just adding to extra.css is all that is required.
It is a CSS rule-set for a custom BB code. In FX1, I have a number of BB codes with their corresponding CSS rule-sets in a separate CSS template. I was trying to replicate the same practice in FX2, but so far it's not working. Something is different.
You can use <xf:include template="test.less" />, notice the “.less”.
Should this be placed in "extra.less"?
I would generally use the other method in an HTML template.
What is the "other method"?
 
Back
Top Bottom