- Sass Tutorial
- Sass - Home
- Sass - Overview
- Sass - Installation
- Sass - Syntax
- Using Sass
- Sass - CSS Extensions
- Sass - Comments
- Sass - Script
- Sass - @-Rules and Directives
- Control Directives & Expressions
- Sass - Mixin Directives
- Sass - Function Directives
- Sass - Output Style
- Extending Sass
- Sass Useful Resources
- Sass - Interview Questions
- Sass - Quick Guide
- Sass - Useful Resources
- Sass - Discussion
Sass - @for Directive
Description
The @for directive allows you to generate styles in a loop. The counter variable is used to set the output for each iteration.
The @for directive are of two types as shown in the table given below −
S. No. | Keywords & Description |
---|---|
1 | through
The @for uses the keyword through specifies the range including both the values of <start> and <end>. |
2 | to
The @for uses to keyword specifies the range from <start> value to the value before <end> value. |
sass_control_directives_expressions.htm
Advertisements