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

scss values not validated

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.2.1
    • Component/s: Themes
    • Labels:
    • Testing Instructions:
      Hide
      1. Go to boost advance settings
      2. In each of the two setting boxes, you should try to enter unparsable scss and ensure that the setting is not saved and an error is reported. e.g.

        $border-radius: 50%
        background-color: #fff;
        

        (Missing semicolon)

      3. VERIFY: that when you correct the scss the setting is saved and the change is applied.

      NOTE 1: I haven't fixed the tab focus issue (when the error happens, the focus is not moved to the advanced tab - thats existing - MDL-56191)

      NOTE 2: I haven't fixed when you used an undefined variable - thats MDL-57387

      Show
      Go to boost advance settings In each of the two setting boxes, you should try to enter unparsable scss and ensure that the setting is not saved and an error is reported. e.g. $border-radius: 50% background-color: #fff; (Missing semicolon) VERIFY: that when you correct the scss the setting is saved and the change is applied. NOTE 1: I haven't fixed the tab focus issue (when the error happens, the focus is not moved to the advanced tab - thats existing - MDL-56191 ) NOTE 2: I haven't fixed when you used an undefined variable - thats MDL-57387
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-56488-master

      Description

      I've discovered it's really easy to break the boost theme by entering invalid scss. For example, I just entered the following:

      $border-radius: 50%
      

      This caused compilation to fail entirely.

      These kinds of mistake are really easy to make - in this case I just missed the trailing semi-colon.

      We should attempt to validate the scsspre and scss when saving and warn if it's invalid. Ideally we should not use it if invalid and continue to generate the theme.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Jan/17