Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

SCSS: Difference between revisions

From MoodleDocs
(Created page with "== Overview == [https://en.wikipedia.org/wiki/Sass_(stylesheet_language) SCSS] or SASS Sass (Syntactically Awesome Stylesheets) is a style sheet language initially designed b...")
(No difference)

Revision as of 07:18, 1 December 2016

Overview

SCSS or SASS Sass (Syntactically Awesome Stylesheets) is a style sheet language initially designed by Hampton Catlin and developed by Natalie Weizenbaum. It's an advanced way of writing CSS that we use in some themes within Moodle.

Browsers don't interpret it themselves, however, so SCSS files need to be converted into normal CSS before use.

Moodle includes a built in SCSS compiler so to use SCSS in your theme, you only need to set the theme scss variable to point to the main scss file for your theme: $THEME->scss = 'main';

Moodle will look for a file named 'main.scss' in the theme/themename/scss folder and compile it. If you don't see the affect of your changes right away, try purging the caches or enabling theme designer mode.

The boost theme

Moodle's boost theme has rules written using SCSS.

See also