Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use cases for having both modify-vars and global-vars #6

Open
bassjobsen opened this issue Jan 26, 2015 · 0 comments
Open

use cases for having both modify-vars and global-vars #6

bassjobsen opened this issue Jan 26, 2015 · 0 comments

Comments

@bassjobsen
Copy link

I understand modify-vars and global-vars are different, but what are use case for using global instead of modify, on first sight having both seems in contrast with http://lesscss.org/features/#variables-feature-default-variables.

Why should you define a global if you overrule it in the file? Possible use cases are compiling more than one file with the same settings?

For in browser usage the above case now can be solve easily by using data attributes:

<link type="text/css" href="t.less" data-global-vars='{ "color": "red"}' rel="stylesheet/less">
<link type="text/css" href="t2.less" data-modify-vars='{ "color": "green"}' rel="stylesheet/less">

Also task runners can compile a list list of files, but also that cases can possible solved by defining more than one or conditional task, instead of defining defaults (globals).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant