XF 2.3 Extra css for forum_ids in options?

Robert9

Well-known member
How can I have aconnection between

add-on options <edit_format_params>\XF\Option\Forum::renderSelectMultiple</edit_format_params>[(icode]
and my extra css?

Like if node_id in options, then css:

xyz_value = 100%
else 50%

Normally i use something like

[CODE][data-container-key="node-1"], [data-container-key="node-3"]
{[/CODE]

if i need extra css for less specific nodes/forums,

but now i have to connect the forum_id from the options with the extra css?
Any idea or an add-on where to look-up this, please?
 
These are like regular templates, you can use conditions and other syntaxes.
Yes - and no.

Yes you could just use a condition to check an option within a less template.
But the rendered CSS would not change when the option is modified, only when it is rendered again (for whatever reason).

The correct approach would be to add classes to body or html in PAGE_CONTAINER depending on the options and use appropriate selectors in CSS.
 
Yes - and no.

Yes you could just use a condition to check an option within a less template.
But the rendered CSS would not change when the option is modified, only when it is rendered again (for whatever reason).

The correct approach would be to add classes to body or html in PAGE_CONTAINER depending on the options and use appropriate selectors in CSS.
You could force its rendering upon option change.
 
Back
Top Bottom