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

SCSS variables setting does not allow raw SCSS

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.2
    • Component/s: Themes
    • Labels:
    • Testing Instructions:
      Hide
      1. Switch to theme_boost
      2. Change the "theme_boost | brandcolor" colour, and verify the colors of the theme links change (and other things)
      3. Define a different colour in the "theme_boost | scsspre" setting like this:

        $brand-primary: red;
        

      4. Verify that the theme links are now always "red" regardless of theme_boost | brandcolor" colour setting.
      5. Define a different colour in the "theme_boost | scsspre" setting like this:

        $brand-primary: yellow !default;
        

      6. Verify that the theme links are now "yellow" if theme_boost | brandcolor" colour setting is empty, but otherwise reflect the colour of that setting.
      7. Define another variable in the "theme_boost | scsspre" setting and see it take effect ($border-radius: 50%).
      8. Put a SCSS comment in the "theme_boost | scsspre" setting and verify the other variables still have an effect.
      9. Declare an unused variable in the
      10. Define a style rule in the "theme_boost | scsspre" setting

        $snot-colour: green;
        

      11. Add a SCSS rule to the "theme_boost | scsspost" setting that uses the variable

        body {
            background-color: $snot-colour ! important;
        }
        

      12. Marvel at your creation.
      Show
      Switch to theme_boost Change the "theme_boost | brandcolor" colour, and verify the colors of the theme links change (and other things) Define a different colour in the "theme_boost | scsspre" setting like this: $brand-primary: red; Verify that the theme links are now always "red" regardless of theme_boost | brandcolor" colour setting. Define a different colour in the "theme_boost | scsspre" setting like this: $brand-primary: yellow !default; Verify that the theme links are now "yellow" if theme_boost | brandcolor" colour setting is empty, but otherwise reflect the colour of that setting. Define another variable in the "theme_boost | scsspre" setting and see it take effect ($border-radius: 50%). Put a SCSS comment in the "theme_boost | scsspre" setting and verify the other variables still have an effect. Declare an unused variable in the Define a style rule in the "theme_boost | scsspre" setting $snot-colour: green; Add a SCSS rule to the "theme_boost | scsspost" setting that uses the variable body { background-color: $snot-colour ! important; } Marvel at your creation.
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-56005-master

      Description

      The idea is to allow not just variables, but raw SCSS to be prefixed.

      This would allow completely specify an imported bootswatch via these 2 settings (a bootswatch consists of a pre and post chunk of SCSS to be merged with the bootstrap SCSS).

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/Dec/16