Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-18492

Add support for compiling LESS files from WebJar at runtime in the context of the skin

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 12.10.5, 13.2-rc-1
    • Fix Version/s: 13.3-rc-1
    • Component/s: Webjar
    • Labels:
      None
    • Tests:
      Unit
    • Difficulty:
      Medium
    • Pull Request Status:
      Pull Request accepted
    • Similar issues:

      Description

      We need to be able to write UI components (JavaScript) that use the active Color Theme (Skin). We can do this in two ways:

      • use CSS and Velocity (color theme variables); the CSS can be packaged along with the JavaScript code in the WebJar and can be served with ?evaluate=true to execute the Velocity code. The is the old way, and it's limited: you don't have access to all color theme variables
      • use LESS and package it along with the JavaScript code in the WebJar. For this we need to extend the WebJar handler to support compiling LESS files on the fly, when requested with ?evaluate=true. This is very similar to SxDocumentSource#getContent().

      Would be nice to support the second option also.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mleduc Manuel Leduc
              Reporter:
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response: