[Geoserver-devel] Can CSS generate styles with multiple feature type styles?

Hi,
I was trying to generate the usual “highway” style with css, with proper line joins, but I don’t see how one can generate a SLD with multiple feature type styles.
CSS has a z-index property, so I’ve tried with the following, but it does not work:

  • {
    stroke: black, white;
    stroke-width: 8, 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    }

:nth-stroke(1) {
z-index: 1;
}

the result is still:

Inline image 1

I see the code has support for a stroke-z-index and a z-index property (btw, both undocumented), but they seem to have no effect, the generated SLD still has a single feature type style.

What am I missing?

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


The :stroke and :nth-stroke(n) selectors are specifically for properties applied to well-known marks. Your :nth-stroke rule doesn’t apply because (a) z-index does not apply for a well-known mark and (b) you don’t use any well-known marks anyway.

Instead, you should use the z-index property the same way you’ve used the others:

  • {

stroke: black, white;
stroke-width: 8, 4;
stroke-linecap: round;
stroke-linejoin: round;
z-index: 0, 1;
}

(attachments)

result.png

···

On Tue, Jul 23, 2013 at 9:07 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Hi,
I was trying to generate the usual “highway” style with css, with proper line joins, but I don’t see how one can generate a SLD with multiple feature type styles.
CSS has a z-index property, so I’ve tried with the following, but it does not work:

  • {
    stroke: black, white;
    stroke-width: 8, 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    }

:nth-stroke(1) {
z-index: 1;
}

the result is still:

Inline image 1

I see the code has support for a stroke-z-index and a z-index property (btw, both undocumented), but they seem to have no effect, the generated SLD still has a single feature type style.

What am I missing?

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it



See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

On Tue, Jul 23, 2013 at 3:14 PM, David Winslow <dwinslow@anonymised.com> wrote:

The :stroke and :nth-stroke(n) selectors are specifically for properties
applied to well-known marks. Your :nth-stroke rule doesn't apply because
(a) z-index does not apply for a well-known mark and (b) you don't use any
well-known marks anyway.

Instead, you should use the z-index property the same way you've used the
others:

* {
stroke: black, white;
stroke-width: 8, 4;
stroke-linecap: round;
stroke-linejoin: round;
z-index: 0, 1;
}

Ah nice, will make sure to document this. Thanks!

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------