In short, I'd like to do this (the conditional part, i know how to include with <h:outputStyleSheet>
):
<link rel="stylesheet" href="[path-to-dist]/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="[path-to-dist]/leaflet.ie.css" />
<![endif]-->
In JSF 2.
Thanks!
Use <h:outputText escape="false">
<h:outputText value="<!--[if lte IE 8]><link rel="stylesheet" type="text/css" href="[path-to-dist]/leaflet.ie.css"/><![endif]-->" escape="false" />
Yes, it's a line of ugliness, but there's really no other way as Facelets is inherently a XML based view technology.
Update: if you happen to use the JSF utility library OmniFaces, you can just use its <o:conditionalComment>
component.
<o:conditionalComment if="lte IE 8">
<link rel="stylesheet" href="[path-to-dist]/leaflet.ie.css" />
</o:conditionalComment>