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

scss values not validated

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2
    • 3.2.1
    • Themes
    • MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • MDL-56488-master
    • 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

    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

              poltawski Dan Poltawski
              dobedobedoh Andrew Lyons
              David Monllaó David Monllaó
              Ryan Wyllie Ryan Wyllie
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Jan/17