XF 2.1 Template modification of less Files

wedge1001

Active member
Hello,

I'm doing a template modification with some less-Files from xenforo (not yet using an own less file)

The modification will use my own option-fields.

Unfortunately it looks like the less-files are somehow generated and then kept.
Is there a way to have them updated, if the option was changed or do I have to put my in my own less files and then link them?
But even then: how can i trigger changes to this files?

I'm trying to modify e.g. message.less
Regex-Expression:
Code:
/(^\s.*)(\.m-fixedWidthFlex\(\(@xf-messageUserBlockWidth\))(.*\))(\);\s$)/m
Replace:
Code:
$1 min-width: {$xf.options.ava_maxwidth}px $3;
$0

I hope someone can help me.
Thanks.
 
You can give your option a validation callback to invalidate the cache: XF\Option\Style::triggerStyleUpdate

You can also consider using style properties instead if it makes sense for your use-case.
 
Top Bottom