I'm hoping somebody here can help me find a practical solution to a style-variation problem I'm having on XenForo 2.3.10.
I want to disable style variations on my custom style.
The problem is that if I uncheck "Enable variations" and save the style, large portions of the site's CSS immediately fail to compile and the layout becomes essentially unusable.
With variations enabled, everything works normally.
The errors are caused by ordinary CSS clamp() expressions such as:
and:
When variations are disabled, I start getting errors such as:
error evaluating function
[E_NOTICE] Object of class Less_Tree_Dimension could not be converted to int
The stack trace eventually reaches:
src/vendor/oyejorge/less.php/lib/Less/Functions.php
where clamp() is defined as:
As soon as I re-enable style variations, the site works normally again.
I've already run XenForo's File Health Check, and the relevant XenForo/LESS files involved in the error are not reported as modified.
I also posted the detailed technical findings in Bug reports, but what I'm really looking for here is a practical solution.
Has anyone encountered this on XF 2.3.10?
Is there a supported way to disable style variations without having valid CSS clamp() expressions get interpreted by the LESS numeric clamp function?
I'd really prefer not to modify XenForo core/vendor files or go through the entire custom style rewriting otherwise-valid CSS just to work around it.
At the moment I'm forced to leave variations enabled even though I don't want members using them.
Any ideas would be appreciated.
I want to disable style variations on my custom style.
The problem is that if I uncheck "Enable variations" and save the style, large portions of the site's CSS immediately fail to compile and the layout becomes essentially unusable.
With variations enabled, everything works normally.
The errors are caused by ordinary CSS clamp() expressions such as:
gap: clamp(2rem, 5vw, 5rem);and:
--custom-layout-width: clamp(12rem, 12.5vw, 14.5rem);When variations are disabled, I start getting errors such as:
error evaluating function
clamp[E_NOTICE] Object of class Less_Tree_Dimension could not be converted to int
The stack trace eventually reaches:
src/vendor/oyejorge/less.php/lib/Less/Functions.php
where clamp() is defined as:
public static function clamp($val, $max = 1){ return min(max($val, 0), $max);}As soon as I re-enable style variations, the site works normally again.
I've already run XenForo's File Health Check, and the relevant XenForo/LESS files involved in the error are not reported as modified.
I also posted the detailed technical findings in Bug reports, but what I'm really looking for here is a practical solution.
Has anyone encountered this on XF 2.3.10?
Is there a supported way to disable style variations without having valid CSS clamp() expressions get interpreted by the LESS numeric clamp function?
I'd really prefer not to modify XenForo core/vendor files or go through the entire custom style rewriting otherwise-valid CSS just to work around it.
At the moment I'm forced to leave variations enabled even though I don't want members using them.
Any ideas would be appreciated.