I think this code would work:

@Environmental
private JavaScriptSupport javaScriptSupport;

@Inject
@Path("css/material/bootstrap-material-design.css")
private Asset materialDesignCss;

void setupRender(){

        javaScriptSupport.importStylesheet(new 
StylesheetLink(materialDesignCss, new StylesheetOptions("media and (min-width: 
40.5em)")));

}

@Import is for easy use cases.

Regards

Carlos Montero

> El 11/8/2016, a las 21:46, Qbyte Consulting <qbyteconsult...@gmail.com> 
> escribió:
> 
> I'm moving my prototype pages to T5.4.
> 
> I've put this on my Layout class:
> @Import(stylesheet
>        = {"context:/layout/style.css",
> "context:/layout/jquery.mobile-1.4.5.min.css"}, library
>        = {"context:/js/init.js","jquery.mobile-1.4.5.min.js"})
> 
> How do I handle the media attributes (see below)?
> 
> John
> 
> 
>      <link rel="stylesheet" type="text/css" href="layout/style.css"
> media="screen, handheld" />
>        <link rel="stylesheet" type="text/css" href="layout/enhanced.css"
> media="screen  and (min-width: 40.5em)" />

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to