Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1330

Position of Injected Stylesheets changed from 5.1 to 5.2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.2.0, 5.2.1, 5.2.2
    • 5.2.3
    • tapestry-core
    • None

    Description

      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>

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            mwshead Mark Shead
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: