SASS Flashcards
Sass stands for
Syntactically Awesome Stylesheets
Sass to CSS is
preprocessor, it takes code written in Sass syntax and converts to basic CSS
What are some features of Sass?
create variables, nest CSS rules into others, import other Sass files
creates more compact, easier to read code
in Sass, variables start with
$ followed by the variable name
a mixin in Sass is
a group of CSS declarations that can be reused throughout the stylesheet
- Example, display flex, justify content
- Or box shadow
How do you call a mixin?
@include directive
To bring the code in the partial into another Sass file,
use the @import directive.
if all your mixins are saved in a partial named “_mixins.scss”, and they are needed in the “main.scss” file, this is how to use them in the main file:
// In the main.scss file
@import ‘mixins’
How to borrow CSS rules from one element into another
.new-class { @extend .class; // note! no colon // new rules }