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

scss fixes for math on incompatible units and string concatenation

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      All branches
      1. Purge caches
      2. Refresh the page, ensuring you have the latest version of the CSS
      3. Open the generates Boost CSS
      4. Search for div[data-flexitour="step-background"] and find the z-index setting within it
        1. Confirm that the value is 1041
      5. Search for div[data-flexitour="step-backdrop"] and find the z-index setting within it
        1. Confirm that the value is 1042
      For 34 and master only
      1. Find the rules for .form-autocomplete-selection
        1. Confirm that the margin is 0.25rem
        2. Confirm that the min-height is 2.5rem
      2. Find the rules for .form-autocomplete-original-select
        1. Confirm that the margin-top is 1.75rem
      Show
      All branches Purge caches Refresh the page, ensuring you have the latest version of the CSS Open the generates Boost CSS Search for div [data-flexitour="step-background"] and find the z-index setting within it Confirm that the value is 1041 Search for div [data-flexitour="step-backdrop"] and find the z-index setting within it Confirm that the value is 1042 For 34 and master only Find the rules for .form-autocomplete-selection Confirm that the margin is 0.25rem Confirm that the min-height is 2.5rem Find the rules for .form-autocomplete-original-select Confirm that the margin-top is 1.75rem
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull Master Branch:
      MDL-61341-master

      Description

      When testing our binary sass compiler on 3.4.1 we discovered a couple of issues with scss.

      issue 1: z-index concatination
      The usertour overlay uses z-index of $flexitour-base-zindex + 2, this was producing 1040 + 2 = 10402 instead of the expected 1042.

      issue 2: math on incompatible units: rem and em
      doing on math on 1rem + 2em is not supported, the PHP compiler was ignoring the second unit and doing everything in the unit of the first value.

      I had originally made a function to strip units, but Andrew found a suitable variable so all math is done in rem. ($input-padding-y-sm instead of $tag-padding-y)

      Andrew also suggested raising this as a bug in the upstream PHP sass compiler.

        Attachments

          Activity

            People

            • Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              jtomkinson Jordan Tomkinson
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Marina Glancy
              Participants:
              Component watchers:
              Amy Groshek, David Scotson, Amaia Anabitarte, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, Bas Brands, Amaia Anabitarte, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                19/Mar/18