-
Improvement
-
Resolution: Fixed
-
Minor
-
2.3
-
MOODLE_23_STABLE
-
MOODLE_23_STABLE
-
wip-
MDL-33596-m23 -
While working on MDL-33468 I came to the realisation that theme's should be given the option to support the CSS optimiser or not.
The reason I came to this conclusion is because the CSS in that theme for JQuery has already been optimised, and because its optimised to minimise selector complexity is not compatible with the CSS optimiser I wrote.
The CSS optimiser I wrote takes rules and compacts them based upon common styles.
For example:
.one {display:none;}
|
.two {display:none;}
|
/** would be optimised to **/
|
.one,
|
.two {display:none;}
|
However as illustrated by a problem in the mymobile theme the following CSS optimisation breaks things:
.one {display:none;}
|
.panel {display:block;}
|
.panel-hidden {display:none}
|
/** Which gets optimised to **/
|
.one,
|
.panel-hidden {display:none}
|
.panel {display:block;}
|
That change in order may seem trivial, however that change in order was how the panels visibly was being controlled, through the most basic level of inheritance.
This sort of thing affects affects all CSS not just theme CSS. However in every case I looked at within Moodle core this wasn't a problem. Our internal CSS is not nearly that well grounded and in effect allows the CSS optimiser to work. However YUI CSS (which we were already purposefully not trying to optimise) and JQuery CSS are the exception.
- has been marked as being related by
-
MDL-38702 CSS Optimizer does not work with mymobile theme.
-
- Closed
-
-
MDL-33468 CSS optimiser breaking theme's when enabled
-
- Closed
-
-
MDL-33521 Correct invalid CSS in core styles.css files
-
- Closed
-
-
MDL-33597 Enable CSS optimiser should be an experimental setting as it needs more testing.
-
- Closed
-