SASS @-Rules and Directives
SASS @-Rules and Directives
The @-Rules and directives in Sass are backbone features of sass. List of all the rules and directives are given below which you can use in SASS.
- @import
- @media
- @extend
- @at-root
- @debug
- @warm
- @error
@import
It is used to import the sass or scss files. It directly takes the filename to import.
@media
It is used to set style rule to different media types.
@extend
It specifies and shares the rules and relationships between selectors.
@at-root
It is specified as a collection of nested rules which is able to make style block at root of the document.
@debug
This directive is used to detect the errors and display the SassScript expression values to the standard error output stream.
@warn
This directive is used to get cautionary advice about the problem. It displays the SassScript expression values to the standard error output stream.
@error
It is used to displays the SassScript expression value as fatal error.