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

Allow variables to be set within conditional sections #2590

Closed
csytsma opened this issue Jan 14, 2017 · 2 comments
Closed

Allow variables to be set within conditional sections #2590

csytsma opened this issue Jan 14, 2017 · 2 comments
Labels

Comments

@csytsma
Copy link
Member

csytsma commented Jan 14, 2017

It appears that variables can only be set as a stand-alone line. For example:
@color: red;

It would be great if the variable assignment could happen within a conditional, so the value could be set based upon the element being rendered. For example, with [name] being set in the layer data:

[name='trek'] { @color: red; }
[name='bike'] { @color: blue; }
[name='canoe'] { @color: green; }
line-color: @color;

@Komzpa
Copy link
Member

Komzpa commented Jan 14, 2017

@csytsma this should be reported towards https://github.com/mapbox/carto.

@Komzpa Komzpa closed this as completed Jan 14, 2017
@csytsma
Copy link
Member Author

csytsma commented Jan 14, 2017

Created mapbox/carto#461

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

No branches or pull requests

2 participants