XF 1.2 EXTRA.css

Amaury

Well-known member
In vBulletin, if I want to add color to something that isn't controlled by a style variable by default, in additional.css I could do color: white, for example. However, if I later made all the text red, I would have to go back in additional.css and change that accordingly. However, if I do color: {vb:stylevar postbit_color}, then I would not.

Is there a similar function in XenForo with the style properties?
 
Yeah, you can reference a style property in the CSS with the @ symbol

eg:

Code:
.competitionList .sectionHeaders a
{
    display: block;
    color: @subHeading.color;
    outline: none;
}

Which takes the subHeading group and the colour property
 
Yeah, you can reference a style property in the CSS with the @ symbol

eg:

Code:
.competitionList .sectionHeaders a
{
    display: block;
    color: @subHeading.color;
    outline: none;
}

Which takes the subHeading group and the colour property

Thanks!

Question, though: How did you get that? The only place I see the @ symbols is on the color palette. On the individual style properties, I just see, for example, Sub-Heading. Where did you get subHeading.color?
 
That snippet is from @Chris Deeming 's Competitions add-on.

Have a look in some of the other .css templates via the ACP and you'll see other examples of it being used.

If you hover over the name of the style property in the ACP, it will give you the @ value to use

upload_2014-1-1_6-10-51.webp
 
Top Bottom