Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.3, 5.4, 5.2
    • Fix Version/s: None
    • Component/s: tapestry-core

      Description

      When in production mode, combine CSS files into a single file as is done with javascript resources.

      • Any relative references to urls in the CSS contents should be absolutized based on the URL of the original CSS path so that things like background images continue to function.
      • @import statements should also be unpacked so that designers have flexibility in how the files are structured.
      • Any CSS files that have a class on the link element of "nocombine" or that have a non default/non-screen media should not be combined.
      • Record a comment before each file saying which CSS file it originally came from

        Issue Links

          Activity

          Hide
          xl0e Mihail Gagauz added a comment -

          There is tapestry css combiner module which can combine multiple css files in stack. https://github.com/gagauz/tapestry-css-combiner

          Show
          xl0e Mihail Gagauz added a comment - There is tapestry css combiner module which can combine multiple css files in stack. https://github.com/gagauz/tapestry-css-combiner
          Hide
          jkemnade Jochen Kemnade added a comment -

          I just had another idea: Stylesheets can be added to JavaScriptStacks. We could just wrap those stylesheets in some code that creates dynamic stylesheets using document.createElement('style'). That way, they could be included in the stack like a regular JS file.

          Show
          jkemnade Jochen Kemnade added a comment - I just had another idea: Stylesheets can be added to JavaScriptStacks. We could just wrap those stylesheets in some code that creates dynamic stylesheets using document.createElement('style') . That way, they could be included in the stack like a regular JS file.
          Hide
          fscheffer Felix Scheffer added a comment -

          Some basic support for combing css files but not 100% of what the OP asked for in the description:

          • No unpacking of @import statements. Requires parsing the css file (=lots of extra work).
          • The file name of the original file is not added to the combined file (We dont do that when combining js files)
          • There is no support for "nocombine"
          • Stacks with conditional style sheets are not combined. (One css file per condition would be required)
          Show
          fscheffer Felix Scheffer added a comment - Some basic support for combing css files but not 100% of what the OP asked for in the description: No unpacking of @import statements. Requires parsing the css file (=lots of extra work). The file name of the original file is not added to the combined file (We dont do that when combining js files) There is no support for "nocombine" Stacks with conditional style sheets are not combined. (One css file per condition would be required)
          Hide
          fscheffer Felix Scheffer added a comment -

          I don't think this is really a bulk-close-candidate...

          Relative urls shouldn't be an issue anymore in 5.4

          Show
          fscheffer Felix Scheffer added a comment - I don't think this is really a bulk-close-candidate... Relative urls shouldn't be an issue anymore in 5.4
          Hide
          jkemnade Jochen Kemnade added a comment -

          This issue has been last updated about 1.5 years ago, has no assignee, affects an old version of Tapestry that is not actively developed anymore, and is therefore prone to be bulk-closed in the near future.

          If the issue still persists with the most recent development preview of Tapestry (5.4-beta-6, which is available from Maven Central), please update it as soon as possible. In the case of a feature request, please discuss it with the Tapestry developer community on the dev@tapestry.apache.org mailing list first.

          Show
          jkemnade Jochen Kemnade added a comment - This issue has been last updated about 1.5 years ago, has no assignee, affects an old version of Tapestry that is not actively developed anymore, and is therefore prone to be bulk-closed in the near future. If the issue still persists with the most recent development preview of Tapestry (5.4-beta-6, which is available from Maven Central), please update it as soon as possible. In the case of a feature request, please discuss it with the Tapestry developer community on the dev@tapestry.apache.org mailing list first.

            People

            • Assignee:
              Unassigned
              Reporter:
              hagios17 Dan Adams
            • Votes:
              9 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:

                Development