Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.5, 2.6
-
MOODLE_25_STABLE, MOODLE_26_STABLE
-
MOODLE_25_STABLE, MOODLE_26_STABLE
-
MDL-41767-master -
-
FRONTEND Sprint 10
Description
Given the mod_grrr contrib plugin (or subplugin) as example, right now it's possible to specify a custom css sheet:
mod/grr/styles.css
And also it's possible to specify custom css by current theme (assume standard):
mod/grrr/styles_standard.css
The 1st is used everywhere (both in core and contrib plugins). And the 2nd is way less common, but still has a point in some rare situations.
But it's impossible to point to the parent themes so this does not work:
mod/grrr/styles_base.css
With the arrival of the "base" and "bootstrapbase" duality in 2.5, and more if the later is going to become the "default" one… we need to be able to specify any of these, per plugin:
- mod/grrr/styles.css (to be applies to all themes)
- mod/grrr/styles_base.css (to be applied to all "base" themes)
- mod/grrr/styles_bootstrapbase.css (to be applied to all "bootstrapbase" themes)
- mod/grrr/styles_standard.css (to be applies to "standard", and any "child" of it.
- mod/grrr/styles_clean.css (to be applied to "clean", and any "child" of it).
I other words, we need to add support to parent themes in css_files() also for plugins, if I'm not wrong. Right now only the "current" theme is supported. We should be looking for the existence of any parent there.
That's the only way I can imagine to keep things organized. Right now we are using a modules.less (and .css) in bootstrapbase but it has 2 limitations:
1) It only works for core plugins.
2) It is against the whole organization of plugins (self-contained).
So this is about to implement and document the support of parent themes css for plugins.
Ciao
Attachments
Issue Links
- has been marked as being related by
-
MDL-42961 Children themes should fully inherit from their parents
-
- Closed
-