XF 2.0 Custom style property conditionals in extra.less

nrep

Well-known member
I'm very new to LESS and XF2 and I've been unable to figure out a way to add a basic conditional in extra.less to work as a font colour override for a custom style property.

I only want this CSS to appear if the custom style property has been set, but this code isn't valid:

Code:
<xf:if is="(@xf-link_override_colour)">
a {
    color: @xf-link_override_colour !important;
}
</xf:if>

It looks like I can't use the LESS variable in the conditional statement. Is there any way around this?
 
Top Bottom