Hi George @Inject @Path("ie6.css") private Asset ie6Stylesheet;
@SetupRender void addIEScripts() { javaScriptSupport.importStylesheet(new StylesheetLink( ie6Stylesheet, new StylesheetOptions().withCondition("IE 6") )); } regards Taha On Jun 14, 2012, at 9:11 PM, George Christman wrote: > Hello, I'm not finding a clear example how to use StylesheetOptions with a > condition. I seen an example here, > > http://tapestry.apache.org/css.html > > But this has been deprecated in 5.3 > > Could someone please help me figure out how to use the condition. I only > want to display a style sheet if it's either ie7/ie8 > > Current code > > @Inject @Path("context:layout/ie-only.css") > private Asset ieOnlyStylesheet; > > @Environmental > private JavaScriptSupport js; > > // add an IE-only style sheet if browser is IE > void afterRender() { > js.importStylesheet(new StylesheetLink(ieOnlyStylesheet, new > StylesheetOptions(null)) ); > } > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/How-to-use-StyleSheetOptions-with-condition-tp5713879.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org