Sass At-Rules and Directives
Sass At-Rules and Directives
Much of Sass’s extra functionality comes in the form of new at-rules it adds on top of CSS:
-
@useloads mixins, functions, and variables from other Sass stylesheets, and combines CSS from multiple stylesheets together. -
@forwardloads a Sass stylesheet and makes its mixins, functions, and variables available when your stylesheet is loaded with the@userule. -
@importextends the CSS at-rule to load styles, mixins, functions, and variables from other stylesheets. -
@mixinand@includemakes it easy to re-use chunks of styles. -
@functiondefines custom functions that can be used in SassScript expressions. -
@extendallows selectors to inherit styles from one another. -
@at-rootputs styles within it at the root of the CSS document. -
@errorcauses compilation to fail with an error message. -
@warnprints a warning without stopping compilation entirely. -
@debugprints a message for debugging purposes.