Compiling SCSS
TheMAG is built with SCSS and use the Gulp task runner to do all things you need to compile/recompile the theme styles. With this setup, you can easily override theme colors, components, etc.
Compiling
- Install the required packages for compiling the style, use your terminal and run
npm installoryarn installfrom the sub-theme directory:/themes/themag_st. - Run the
gulpcommand to watch for changes in the_src/scssdirectory and to compile SCSS files. - If you'd like to override TheMAG style or components, please follow the instructions from the
subtheme.scssfile.
Overriding themag/global-styling library
If you override the entire theme style, it is a good idea to override themag/global-styling library to prevent CSS duplication. To do that, in the subtheme *.info.yml file (themag_st.info.yml) uncomment the following lines:
libraries-override:
themag/global-styling:
css:
theme:
assets/css/themag.css: false