-
Improvement
-
Resolution: Fixed
-
Minor
-
3.9.3
-
-
MOODLE_39_STABLE
-
MOODLE_39_STABLE
-
Moodle App 3.9.4
When site plugins are loaded, the app adds the CSS files that are defined in their mobile.php.
As multiple plugins are loaded at once, they may complete loading in any order. Currently this results in the CSS files being added in that order. For example, if plugin A's CSS loads before B, then plugin A styles will appear before B in the resulting DOM.
In an ideal world, plugin A would not apply styles to the same selectors as plugin B (and vice versa) but if they do, this causes inconsistent behaviour (whichever one loads last 'wins') which is very difficult to debug and track down.
It would remove the possibility for this inconsistency if styles were inserted into alphabetical order in the DOM based on the plugin/handler name instead of always added at the end.
The example screenshot style-order.png from 2 consecutive runs of moodle desktop demonstrates the random ordering.