You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Derick Fernando <de...@thelabllc.com> on 2006/04/03 17:51:30 UTC

CSS in Tapestry 5 and or 4.1

One thing I'd like to see in Tapestry 4.1 or 5 is a simple approach for 
handling CSS and related assets inside component libraries. My approach 
to doing this in 4.0 has been to modify the Shell component to include 
hivemind contributions. So the components hivemodule.xml can specify 
something like this:

<contribution configuration-id="cognition.StyleSheets">
     <stylesheet asset="classpath:/myapp/components/screen.css"
       media="screen" />
</contribution>

This has the added benefit of being able to specify a media attribute 
for the included css. At one point I added code to support an inline 
attribute in the hivemind configuration, which when set to true would 
use an @import statement in a style block instead of a link. 
Contributions get rendered first, so the user can also easily extend any 
css in their own file.

It would be nice to have unprotected assets as someone had suggested, im 
looking into creating this for cognition so a componet library can 
include its own css assets as well.

Are there any other common approaches to this?

.........................................

Derick Fernando
Lead Architect
derickf@thelabllc.com
(323) 314-9593
http://www.thelabllc.com

Content is for intended recipient only.
Copyright 2001-2005, The Lab, LLC

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org