[ 
https://issues.apache.org/jira/browse/TAP5-1330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12925685#action_12925685
 ] 

Howard M. Lewis Ship commented on TAP5-1330:
--------------------------------------------

This does seem like a regression, not sure why there was a change.

A workaround: on your Layout component, implement an empty afterRender() render 
phase method, and place an @Import on that method (yes, you can do that!).  
Doesn't work as well for your inline <style>, but couldn't that also go at the 
bottom of the page?

> Position of Injected Stylesheets changed from 5.1 to 5.2
> --------------------------------------------------------
>
>                 Key: TAP5-1330
>                 URL: https://issues.apache.org/jira/browse/TAP5-1330
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.2.0, 5.2.1, 5.2.2
>            Reporter: Mark Shead
>
> 5.1 items placed into the <head> element of the template were rendered after 
> stylesheets that were added via the @Import. This meant you could add code or 
> style sheets that would override the stylesheets added by @Import.   As of 
> 5.2 it appears that this has changed and now the @Import style sheets show up 
> AFTER items that are added in the <head>.  This means there isn't a way to 
> override the stylesheets by adding <style> to the <head> element.
> Here is an example of what is occurring in 5.2.2
> Layout.tml:
>     <head>
>         <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
>         <title>${title}</title>
>          <style type="text/css">
>                       <t:outputraw value="cssFromDatabase"/>
>               </style>
>     </head>
> Is rendered as:
> <head>
>   <meta content="text/html; charset=utf-8" http-equiv="content-type"></meta>
>     <title>My App</title>
>     <style type="text/css"> 
>        /*My CSS*/
>     </style>
>   <link type="text/css" rel="stylesheet" 
> href="/register/assets/1.0-SNAPSHOT/tapestry/default.css"></link>
>   <link type="text/css" rel="stylesheet" 
> href="/register/assets/1.0-SNAPSHOT/ctx/layout/layout.css"></link>
>   <meta content="Apache Tapestry Framework (version 5.2.2-SNAPSHOT)" 
> name="generator"></meta>
> </head>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to