Inherit from Boost Theme 3.2 RC2

Inherit from Boost Theme 3.2 RC2

by Jeff Bullock -
Number of replies: 2

Hi,

Just testing out v3.2 RC2 using a new theme which inherits from Boost. I would like my scss to inherit from the default preset and then apply my own changes on top. If I set the scss config to my scss file name, then try to import the default preset, it doesn't compile locally, as it cannot find the 'moodle' import in that file.

I can't seem to find any documentation on this yet, so just wanted to find out what was the correct steps to achieve this?

Thanks.

Average of ratings: -
In reply to Jeff Bullock

Re: Inherit from Boost Theme 3.2 RC2

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers

I've been doing the same and following the work of Richard over here with Stagetwo:

https://github.com/roelmann/moodle-theme_stagetwo

This is a child theme of Boost.  There was also discussion of Boost not working well with scss as there was an issue discovered.  

https://tracker.moodle.org/browse/MDL-56959  and this  https://moodle.org/mod/forum/discuss.php?d=342859#p1382427

As for me, I am holding off until we get the official release in December.  A lot can change between now and then.  Lots of good work happening around this Boost theme right up to the last minute.

In reply to Chris Kenniburg

Re: Inherit from Boost Theme 3.2 RC2

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

In my theme_stagetwo, if I change

https://github.com/roelmann/moodle-theme_stagetwo/blob/master/config.php#L33

from

    return theme_stagetwo_get_main_scss_content($theme);

to

    return theme_boost_get_main_scss_content($theme);

then it will fetch the boost preset, but keep the settings which are now in a different function in lib.

However, I'm having a problem with the default.scss - If I have a different preset (one of the ones from bootswatch) selected then my 'test' alerts (in a label) are styled by the settings, but with the boost default.scss preset they are not restyled - presumably because they are being pulled from the bootstrap partials and the variables only seem to be overriding the variables in the preset.

Need to investigate further...


Richard