Add a way to order/priorize stylesheets
---------------------------------------
Key: TAP5-1883
URL: https://issues.apache.org/jira/browse/TAP5-1883
Project: Tapestry 5
Issue Type: Improvement
Components: tapestry-core
Affects Versions: 5.3.2
Reporter: Beat Durrer
Priority: Minor
Issue:
The order of CSS in a HTML page is important for overriding styles.
Its a common practice to define a overall style and have some different layouts
which override some specific parts of it.
When using multiple nested Layout components or Components which extend each
other, the @Import annotation does not help here, because it does not let you
order the styles. The default order seems to be from most-specific to outermost
component. So the most generic component's CSS is "stronger" than the most
specific one.
Currenlty you can only solve the issue by:
- Place the @Import on different render methods. But that's limited by the
amount of render methods (and some of those might be called very often).
- manually place the stylesheets in the template (not recommended because of
iterations).
- Create a MarkupWriterFilter
- Create a mixin or uppermost Layout component which handles the CSS.
Suggestion:
- Add some way to priorize/order the stylesheets. Maybe similar to the
OrderedConfiguration?
- Add a hook to let us reorder the stylesheets before they are rendered (ex. in
JavaScriptSupport)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira