Compiling SCSS

TheMAG is builded with SCSS so you can easily override all the CSS colors and components.
Recompiling the CSS requires npm or Yarn to install the node modules and Gulp to compile the CSS.

  1. Use your terminal and go to /themes/themag_st/build to install the package. Run npm install or yarn install depending of what package manager you use.

  2. Run gulp scss to compile the subtheme.scss or gulp watch to watch for changes in subtheme.scss and automatically compile.

  3. When you override and recompile TheMAG styles, to prevent CSS duplication you should remove themag.css from your site. To do that, in the subtheme edit themag_st.info.yml and uncoment the following lies to override TheMAG global-styling library.
libraries-override:
  themag/global-styling:
    css:
      theme:
        assets/css/themag.css: false

Variables and Components

To override TheMAG SCSS variables and components please see the instructions and examples written in the _variables.scss and subtheme.scss files.