Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Allow re-setting of default values #214

Closed
gravitystorm opened this issue Dec 14, 2012 · 3 comments
Closed

Allow re-setting of default values #214

gravitystorm opened this issue Dec 14, 2012 · 3 comments
Milestone

Comments

@gravitystorm
Copy link
Contributor

Some symbolizer properties have default values that can't be expressed in carto. For example, line-dasharray defaults to "none", but only numbers are accepted. This makes it impossible to turn off dashes.

#lines {
  line-width: 1;
  line-color: black;
  line-dasharray: 4,4;
  [zoom >= 15] {
    line-dasharray: none;
  }
}

Invalid value for line-dasharray, a valid numbers is expected. none was given.

text-spacing is another example, where it's impossible to re-establish the default value (no repeated labels) after a value is set.

Sometimes it's possible to bodge the results, like setting line-dasharray to be 100,0 or text-spacing to 10000000000. But these are just bodges!

@tmcw
Copy link
Contributor

tmcw commented Dec 14, 2012

This has been on our radar for a while (#18 is related) but haven't had any good ideas here, like some normal or auto or reset property.

@migurski
Copy link

“none” would be the correct way to express this. There’s no way in CSS to express default values either, but there are simple ways to turn things off like in Andy’s line-dasharray example.

@springmeyer
Copy link

happy to provide a fix for this on the mapnik side too, I've just hesitated to do that thinking it would be easier to handle in carto.js

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

No branches or pull requests

5 participants