Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-55286

Allow themes to compile SCSS to CSS on demand

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 3.2
    • Fix Version/s: None
    • Component/s: Themes
    • Labels:
    • Testing Instructions:
      Hide
      1. Edit theme_clean config to contain this:

        $THEME->scssfile = 'moodle';
        $THEME->parents = array();
        $THEME->sheets = array();
        

      2. Add the following to a file located at /theme/clean/scss/moodle.scss

        .a {
            .b {
                .c {
                    color: red;
                }
                color: blue;
            }
            color: green;
        }
        

      3. Access these URLs and confirm that the SCSS content was compiled and visible in them.
      • DEBUG: /theme/styles_debug.php?theme=clean&type=scss
      • IE DEBUG: /theme/styles_debug.php?theme=clean&type=scss&chunk=0
      • NODEBUG: /theme/theme/styles.php/clean/100/all
      • IE NODEBUG: /theme/styles.php/clean/100/all/chunk0

      Note, in debug mode there is a 20 seconds cache
      Also note that in non-debug mode you MUST change the value '100' should you need to retry/invalidate the cache

      Show
      Edit theme_clean config to contain this: $THEME ->scssfile = 'moodle' ; $THEME ->parents = array (); $THEME ->sheets = array (); Add the following to a file located at /theme/clean/scss/moodle.scss .a { .b { .c { color : red ; } color : blue ; } color : green ; } Access these URLs and confirm that the SCSS content was compiled and visible in them. DEBUG: /theme/styles_debug.php?theme=clean&type=scss IE DEBUG: /theme/styles_debug.php?theme=clean&type=scss&chunk=0 NODEBUG: /theme/theme/styles.php/clean/100/all IE NODEBUG: /theme/styles.php/clean/100/all/chunk0 Note, in debug mode there is a 20 seconds cache Also note that in non-debug mode you MUST change the value '100' should you need to retry/invalidate the cache
    • Affected Branches:
      MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-55286-master

      Description

      Just like we did for LESS, themes should be able to compile SCSS on demand.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              fred Frédéric Massart
              Reporter:
              fred Frédéric Massart
              Participants:
              Component watchers:
              Bas Brands
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: