Project: moodle
Issue MDL-53152: lessc Less compilation computes variable mathematics at a different time
I use a moodle theme which is based on bootstrapbase. After upgraded the moodle from 2.9 to 3.0-latest, the dropdown menu cannot be shown correctly. Compared with 2.9, I found the 3.0 missed one css style which is defined in theme/bootstrapbase/style/moodle.css: @media (min-width:{color:red}980px{color}){.nav-collapse.collapse{height:auto !important;overflow:visible !important}} In 3.0 it changed to : @media (min-width:{color:red}979px + 1{color}){.nav-collapse.collapse{height:auto !important;overflow:visible !important}} It is generated from theme/bootstrapbase/less/bootstrap/responsive-navbar.less, in which the variable @navbarCollapseDesktopWidth is refered. And the @navbarCollapseDesktopWidth is defined in theme/bootstrapbase/less/bootstrap/variables.less, like: @navbarCollapseWidth: 979px; @navbarCollapseDesktopWidth: @navbarCollapseWidth + 1; The solution is adding parentheses for @navbarCollapseDesktopWidth in theme/bootstrapbase/less/bootstrap/responsive-navbar.less, like: @media (min-width: (@navbarCollapseDesktopWidth)) { then generating the moodle.css file again by using: grunt css.
Story points: 1