I figured out that the test would still fail if I call the import in the
urls.less file. That way I don't need to figure out all the setup
required to test this bug.
- #2360
Both lessc and less.js can now be provided with global variables that
all .less files will have immediate access to. This can be used to
provide, for example, a base path for an @import, signed URLs offering
temporary access to an image on S3, or anything else.
lessc has two new parameters, --global-var and --modify-var. Both take
a value of the form "varname=value". --global-var declares variables
immediately before the content of the .less files, and --modify-var
declares them after.
--global-var is used when rules, imports, or other variables will depend
on the provided variable.
--modify-var is used to override a variable declared within the .less
file.
less.js's equivalent for global variables is less.globalVars. This can
be set before loading less.js. There is no new requivalent to
--modify-var, as less.modifyVars can be used for that purpose.
Although IE8 does support data-uris, it only does so with a limit of 32KB. It's a silly limitation, but a source of potential bugs. When the limit is exceeded, the data-uri() function will simply return a normal url() value with a relative path to the asset.
One may pass --no-ie-compat to lessc to avoid this safeguard.