You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Andreas Andreou (JIRA)" <ta...@jakarta.apache.org> on 2006/07/31 14:53:18 UTC

[jira] Assigned: (TAPESTRY-199) Addition of a simple way to get component CSS stylesheets into an overall page

     [ http://issues.apache.org/jira/browse/TAPESTRY-199?page=all ]

Andreas Andreou reassigned TAPESTRY-199:
----------------------------------------

    Assignee: Andreas Andreou  (was: Jesse Kuhnert)

> Addition of a simple way to get component CSS stylesheets into an overall page
> ------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-199
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-199
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 3.0, 4.0.2
>         Environment: Operating System: All
> Platform: All
>            Reporter: Scott Ellsworth
>         Assigned To: Andreas Andreou
>             Fix For: 4.1.1
>
>         Attachments: patch.txt
>
>
> As I understand it, if a component requires a CSS stylesheet, you either have to put <style> commands 
> in the generated HTML or you have to change the global page when you add the component.
> The first method means that the user would find it hard to override or change the component, as well 
> as increased overhead and blowing out the browser cache.
> The second method breaks component isolation.  Essentially, the main page for an app suddenly must 
> be concerned about the styles used by various subcomponents.
> I believe we would be well served by enhancing the @Shell component to automatically pick up the 
> stylesheets declared as needed in subcomponents.  The situation is similar to how @Body picks up 
> @Script components and tucks them into just one Javascript block.
> This would require a way for a component to register the stylesheets it uses.  I would expect a tag in 
> the jwc that sets the IAsset stylesheet/stylesheets, as then the top level component could just look for 
> those assets in the contained items.
> I would expect, then, that the top level stylesheet/stylesheets passed into the @Shell component would 
> be augmented silently.  There is an argument for a "useComponentStylesheets" attribute that is by 
> default true to control this behavior.
> The result would be that a user would not need to know that a component has added a stylesheet, 
> because it would just work.  It would be snazzy if the addition was smart enough to only include a 
> stylesheet onec if there were multiple instances of the same component, or if there were two 
> components using the same stylesheet.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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