How to use the Advanced Customization CSS / SCSS
The version without these customizations:
What is CSS?
CSS is a programming language (simple one) to format and shape a page. It stands for Cascading Style Sheet and define how the HTML5 elements are displayed. More information here.
What is SCSS?
SCSS is a superset of CSS3. It adds more options to classic CSS by using, especially, nesting and variables.
As an example, here are two style sheets written in CSS and SCSS:
CSS code:
The same written in SCSS code:
What’s the difference between the two?
1. If you look at the code above you can see there is a variable
, and this variable is called in the CSS itself as a value of the property “color”, see:
The power of this is you can call a variable in your CSS, and then you would have to work only on the value of this variable to change the value of all the selectors that uses this variable. The difference with classic CSS is that you would have to change the value of the property for every selectors rather than changing it once for all selectors.
2. If you compare the two codes above, both have 3 selectors, two of them are children of a main selector. In SCSS the children can be nested in the parent. It makes the code easier to read, write and maintain. So instead of writing in CSS:
in SCSS you would write:
3. You can see there is the same for some properties which can be split in parent and child properties. For example, in SCSS
becomes a child property of the parent property “font”
in CSS:
in SCSS: