Closed devuxer closed 3 years ago
require('./styles.less') in _app
can't overwrite antd
default variables;
lessVarsFilePath
and modifyVars
for JS
(It's actually for javascriptEnabled), if you will change antd
default variables e.g. @primary-color
, it can only be declared here.
setlessVarsFilePath
JUST will automatically convert all variables to modifyVars
.
BTW javascriptEnabled
.
http://lesscss.org/usage/#less-options
Enable Inline JavaScript (Deprecated)
lessc --js { javascriptEnabled: true }
False by default starting in v3.0.0. Enables evaluation of JavaScript inline in .less files. This created a security problem for some developers who didn't expect user input for style sheets to have executable code.
Replaced with the @plugin option.
So I can either do modifyVars
or lessVarsFilePath
to override the default Ant Design less variables?
you can.
Can you provide a quick explanation of the
lessVarsFilePath
setting?I get that
modifyVars
is for swapping in different values for Ant Design default less variables, but I'm a little confused by the additionallessVarsFilePath
setting.What variables should we be putting in
variables.less
?How is this different than importing global styles into _app using
require('./styles.less');
?