Wildcat Media
Well-known member
I was trying to use some advanced LESS functions and realized some were failing because the LESS compiler is about five years old. Using conditionals in a LESS stylesheet can really come in handy. For instance, in extra.less, I can have a change of color (or opacity) of an element based on the background color of the content, by using the @xf-contentBg color variable to test against. (I could do a boolean check of the luminance being greater than a given percentage, then use the true/false outcome in an if() statement to apply either of two colors and/or opacities.) That way, I can use it so that it passes down to child styles and saves me having to edit each one separately for each change. (When creating dark and light styles, this can be helpful.) There are a few others functions that are also helpful.
Are there plans for an update of the LESS compiler in the next release of XenForo (2.2)? I see that the oyejorge compiler was archived as of 2017, but Wikimedia has now forked it with newer releases. Alternately, would there be a way to use the official less.js release easily? (I'm thinking no, because XF would have used it in the first place.)
Are there plans for an update of the LESS compiler in the next release of XenForo (2.2)? I see that the oyejorge compiler was archived as of 2017, but Wikimedia has now forked it with newer releases. Alternately, would there be a way to use the official less.js release easily? (I'm thinking no, because XF would have used it in the first place.)