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

SCSS variables setting does not allow raw SCSS

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 3.2
    • 3.2
    • Themes
    • MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • MDL-56005-master
    • 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.

    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

              fred Frédéric Massart
              damyon Damyon Wiese
              Damyon Wiese Damyon Wiese
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Andrew Lyons Andrew Lyons
              Huong Nguyen, Bas Brands, Mathew May, Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                5/Dec/16