Adding multiple SCSS/CSS files to a Boost child theme

Re: Adding multiple SCSS/CSS files to a Boost child theme

by Mark Sharp -
Number of replies: 3
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
You shouldn't need to include files individually like that really. The bit in the example is about loading some "preset" files. These files contain variables used by the rest of the theme - changes the colours, but not the selectors.

In your child theme, it should be enough to have a moodle.scss file in your scss (I think that's autoloaded with no extra coding required). From that file you can use @import tags to import all the extra files you need.
e.g. My moodle.scss is:

My styles.scss file has some selector stuff in it, but it also has a link to a moodle/moodle.scss

Which has a whole bunch of includes for the various components

Organise it as you like.
Have a look at other boost child themes to get an idea of what others are doing.
In reply to Mark Sharp

Re: Adding multiple SCSS/CSS files to a Boost child theme

by Alexander Lebeth -
Thank you, I am a newbie regarding SCSS. Great feature of SCSS!
In reply to Mark Sharp

Re: Adding multiple SCSS/CSS files to a Boost child theme

by Alexander Lebeth -

One more question: why isn't additional SCSS added in MOOVE theme by using the SCSS @import function?

See a screenshot of lib.php:

Screenshot of lib.php

Is it because the author wanted to add SCSS dynamically?


In reply to Alexander Lebeth

Re: Adding multiple SCSS/CSS files to a Boost child theme

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
No because I suspect that Willian is generating dynamic CSS / SCCS based on values that change in the theme_config object.