SASS | part 2

Dinuka Kasun Medis
2 min readJul 27, 2020

SASS variables have a scope, with following table you can see transpiled code to CSS.

we can use !global switch to change this behavior,

Global variables should be defined outside any rules.

we define all global variables in its own file, named “_globals.scss”, and include the file with the @include keyword.

Sass, the ul, li, and a selectors are nested inside the nav selector. While in CSS, the rules are defined one by one (not nested):

Many CSS properties have the same prefix, like font-family, font-size and font-weight or text-align, text-transform and text-overflow.

With Sass you can write them as nested properties:

--

--

Dinuka Kasun Medis

Hej, jag heter Dinuka Kasun. Välkommen till min profil. Arbeta som mjukvaruingenjör. Och nu för tiden lär jag mig svenska. 🤓🇱🇰 🇸🇪