[Mapcss] Nesting Selectors

Paul Hartmann phaaurlt at googlemail.com
Sat Apr 28 08:57:38 BST 2012

On 04/28/2012 01:53 AM, Thomas Davie wrote:
> Warning: not very CSS like proposal coming up!
> I've recently been toying with how to optimise OpenStreetPad's
> stylesheet code, and found that a large gain could be found by
> supporting the exit; statement in MapCSS, and allowing lots of
> checking to be omitted by stopping checking rules after a certain one
> had matched.  This has made OSP about 20 times faster at styling
> using its default style sheet.
> However... I want to go further.  A second way to be able to omit
> checks, and to add more expressivity to the language, would be to
> allow nesting of MapCSS selectors like this:[...]

It's an interesting concept. The carto style language implements it in a
similar way, see this style sheet [1] for example, especially the last
rule. It has also been suggested on the wiki talk page [2].


[2] http://wiki.openstreetmap.org/wiki/Talk:MapCSS/0.2#Nested_rules


More information about the Mapcss mailing list