invalid option modify-var or global-var
I want to use the "--modify-var" less option in my code, but i m not able to use it. It always give the message: "invalid option modify-var". Same happens for "--global-var" less option. Below is the code snippet
... List<String> list = new ArrayList<String>(); list.add("--modify-var="base=#400854""); LessCompiler lesscompiler = new LessCompiler(); lesscompiler.setOptions(list); try { String css = lesscompiler.compile(<lessSourceFile>); ...
Less file:
@base: #f938ab; .box-shadow(@style, @c) when (iscolor(@c)) { -webkit-box-shadow: @style @c; box-shadow: @style @c; } .box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) { .box-shadow(@style, rgba(0, 0, 0, @alpha)); } .box { color: saturate(@base, 5%); border-color: lighten(@base, 30%); div { .box-shadow(0 0 5px, 30%) } }
Is there no support for these options or am i doing it wrong?
I am also seeing this problem.