XF 2.1 Conditional Statements in EXTRA.LESS for Styling - Per Node ID

Donny

Active member
Hi,

I'm trying to add this to forum_post_thread

<xf:if is="$forum.node_id == 167">
html fr-element {
background-color: lightpink;
}
</xf:if>

I'm trying to make the background of the text area a different colour for threads and replies in the moderators forum.

Can't seem to get that to work.

I don't know CSS too well.

Can anybody help me?
 
CSS:
html[data-container-key="node-167"] .fr-element
{
    background-color: lightpink;
}
in extra.less should do the trick.

But the color ... are you seriously planning to use lightpink? :eek:
 
Last edited:
Thanks. Afraid so. A kinda traffic light system. So amber (lightorange) in out-of-public-view forum and red (lightpink) for staff forums.

Though I've just found another way. Just create a new style applying the colour changes to it, and then apply that style to the selected nodes. Make the styles siblings of the main one so other changes apply.

Seems to do the trick.
 
Top Bottom