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

    • New Feature
    • Resolution: Done
    • Major
    • 13.3-rc-1
    • 12.10.5, 13.2-rc-1
    • Webjar
    • None
    • Unit
    • Medium
    • Pull Request accepted

    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

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

              Dates

                Created:
                Updated:
                Resolved: