Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-822

Tapestry should correctly handle url's to private assets in private-asset stylesheets

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.1
    • 4.1
    • Framework
    • None

    Description

      CSS allows a designer to place url information into a stylesheet to, for example, specify a background image, as follows:

      background: url('someimage.gif');

      However, tapestry's asset service breaks this ability since it requires a hashed key corresponding to the asset.
      Furthermore, it does not provide any mechanism to "feed" an appropriate url into a stylesheet.

      This is particularly troubling in the case of private-assets. 3rd-party libraries may supply one or more (private-asset) stylesheets and corresponding images.
      The inability to property reference asset urls from the stylesheet results in these libraries having to inline style elements in a fashion similar to:

      <style>
      <span jwcid="@Insert" value="<" raw="yes"/>--
      .someclass

      { background: url("<span jwcid="@Insert" value="ognl:assets.someasset.buildURL(page.requestCycle)"/>"); }

      -->
      </style>

      This is clumsy, ugly, and invalid markup. Furthermore, inlining of the style element precludes the possibility of overriding values
      through an external stylesheet..

      Attachments

        Activity

          People

            Unassigned Unassigned
            rzeigler Robert Zeigler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: