From 4338f67352ffe7add2e4f89cd40b6636dbea6849 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 16 Jan 2021 09:18:54 +0300 Subject: [PATCH] LESS: use math:parens-division This is the default mode in LESS4. Fixes #1154. --- js/usercss-compiler.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/usercss-compiler.js b/js/usercss-compiler.js index b40e7b50..e29b5414 100644 --- a/js/usercss-compiler.js +++ b/js/usercss-compiler.js @@ -37,7 +37,10 @@ const BUILDERS = Object.assign(Object.create(null), { } require(['/vendor/less-bundle/less.min']); /* global less */ const varDefs = Object.keys(vars).map(key => `@${key}:${vars[key].value};\n`).join(''); - return (await less.render(varDefs + source)).css; + const res = await less.render(varDefs + source, { + math: 'parens-division', + }); + return res.css; }, },