mapbox / carto

fast CSS-like map stylesheets
https://cartocss.readthedocs.io/
Apache License 2.0
652 stars 129 forks source link

allow auto and none keywords for symbolizers #477

Closed nebulon42 closed 7 years ago

nebulon42 commented 7 years ago

This allows rules that work on the whole symbolizer. You can either suppress it (none) or output the symbolizer with default values (auto). Auto does not work for shield and text symbolizer because they don't support default values for all their attributes. Symbolizer rules are never inherited. This could be changed maybe for auto, but cannot be changed for none. The reason is that if symbolizer rules with none would be inherited they would suppress all similar symbolizers down the inheritance chain. How would you stop them?

depends on https://github.com/mapnik/mapnik-reference/pull/139 fixes #462, #18

needs more tests

nebulon42 commented 7 years ago

Has now more tests, but I overlooked that also polygon-pattern and line-pattern have required properties. There needs to be a new PR and release of mapnik-reference.

nebulon42 commented 7 years ago

mapnik-reference has been updated

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.2%) to 89.448% when pulling ca981e383d7f1a9fafa2c76d2729f7acb192f83f on nebulon42:auto-none into 81c56a733b4d600daaa6dfd00007ebbf107c2017 on mapbox:master.