Tapestry
  1. Tapestry
  2. TAPESTRY-822

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

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.1
    • Fix Version/s: 4.1
    • Component/s: Framework
    • Labels:
      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..

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert Zeigler
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development