Sass Control Directives & Expressions
Sass provides a number of at-rules that make it possible to control whether styles get emitted, or to emit them multiple times with small variations. They can also be used in mixins and functions to write small algorithms to make writing your Sass easier.
if()function returns only one result from two possible outcomes.@ifdirective accepts SassScript expressions and uses the nested styles whenever the result of the expression is anything other than false or null.@eachevaluates a block for each element in a list or each pair in a map.@forevaluates a block a certain number of times.@whileevaluates a block until a certain condition is met.