2018-09-01 22:35:20 +02:00
|
|
|
---
|
|
|
|
title: Flow Control Rules
|
2019-03-05 01:24:31 +01:00
|
|
|
introduction: >
|
|
|
|
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](mixin) and [functions](function) to write small
|
2019-04-05 08:55:07 +02:00
|
|
|
algorithms to make writing your Sass easier. Sass supports four flow control
|
|
|
|
rules:
|
|
|
|
overview: true
|
2018-09-01 22:35:20 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
* [`@if`](control/if) controls whether or not a block is evaluated.
|
2019-04-05 08:55:07 +02:00
|
|
|
|
2018-09-01 22:35:20 +02:00
|
|
|
* [`@each`](control/each) evaluates a block for each element in a [list][] or
|
|
|
|
each pair in a [map][].
|
2019-04-05 08:55:07 +02:00
|
|
|
|
2018-09-01 22:35:20 +02:00
|
|
|
* [`@for`](control/for) evaluates a block a certain number of times.
|
2019-04-05 08:55:07 +02:00
|
|
|
|
2018-09-01 22:35:20 +02:00
|
|
|
* [`@while`](control/while) evaluates a block until a certain condition is met.
|
|
|
|
|
|
|
|
[list]: ../values/lists
|
|
|
|
[map]: ../values/maps
|