[Potlatch-dev] Stylesheets (Potlatch 2/Halcyon)

Dave Stubbs osm.list at randomjunk.co.uk
Thu Jul 23 08:58:25 BST 2009


On Thu, Jul 23, 2009 at 1:40 AM, Richard Fairhurst <richard at systemed.net>wrote:

> I spent an hour or two looking at the Flash Camouflage CSS parser (
> http://flashartofwar.com/2009/02/05/camo
> ’s-css-parser/). It's pretty good, so the actual logistics of
> converting CSS to Halcyon's internal rendering engine aren't looking
> too hard.[1]
>
> What I'm still unsure about is what the selectors should describe.
>
> Option 1 is basically to write them as tests on OSM tags. So something
> like this:
>
>        highway=primary,oneway=yes { color: red; }
>        highway=motorway[z10-z15] { color: blue; width: 2px; }
>
> Option 2 is to separate the OSM tag parser from the CSS style names.
> So you'd have:
>
>        primary_oneway { color: red; }
>
> and something somewhere else in the file would define that
> highway=primary,oneway=yes would use the primary_oneway style.
>
> Option 2 is more 'pure CSS'-like but is another layer of abstraction
> for people to get their heads around.
>
> I'm torn. Advice from wise folk would be welcome. :)
>


Do the simplest thing possible that works!

I'd go with tests on tags directly, you can always add extra syntax to
abstract them out later if you decide it's needed.

Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/potlatch-dev/attachments/20090723/a251563a/attachment.html>


More information about the Potlatch-dev mailing list