Compiling Sass Flashcards
How do you compile scss code into css so that the computer can understand it and the code can be excuted?
In the terminal, you type sass filename scss filename css.
For example: sass main.scss main.css
scss
How would you nest a class inside of another class in a scss file, in order to save time typing the same property attributes for another class?
.parent { color: #FFF; .child { font-size: 12px; } }
How would you nest a property inside of another property in scss, to save time lets say writing out the border top and bottom?
.container { border : { top: 4px solid orange; bottom: 4px solid orange; } }
How do you create a variable in a scss file? Explain why they are useful.
$translucent-white:
rgba(255,255,255,0.3);
.slogan {
background-color: $translucent-white;
}
Variables can be very useful, because say you have multiple classes where the font color all has to be the same, and you want to change it. Assigning those cl