[Mapcss] Little syntax easement

Jonathan Bennett openstreetmap at jonno.cix.co.uk
Mon Feb 6 13:55:28 GMT 2012

On 06/02/2012 12:50, Thomas Davie wrote:
> I'd like to lend my support to this, and more so, propose changing the
> behaviour of the "text" property to display the value of the property,
> rather than the value of the tag specified in the property. The reason
> being that the current behaviour makes it very difficult to specify
> things like "toilets should all be labeled 'WC'".

Can I suggest instead we use the more W3-like "content" property instead:


which would be Less Astonishing for non-OSMers when they encounter it.

> With this version of how it should be interpretted:
> way[highway] { text: tag('name'); }
> area[amenity=toilet] { text: "WC"; }

So instead you'd have :

  way[highway] { content: tag('name'); }
  area[amenity=toilet] { content: "WC"; }

This has the advantages:

1) People new to MapCSS will still recognise it when they see it
2) Existing CSS parsers will need less hacking to recognise it
3) It can be used for more types of content than just text



More information about the Mapcss mailing list