Skip to content

Instantly share code, notes, and snippets.

@DeeSouza
Created January 2, 2019 11:02
Show Gist options
  • Save DeeSouza/c95afc5c9e5fdf1452440055182cc915 to your computer and use it in GitHub Desktop.
Save DeeSouza/c95afc5c9e5fdf1452440055182cc915 to your computer and use it in GitHub Desktop.
For em SCSS ou SASS
// SCSS = Usando Chaves
// SASS = Sem Usar Chaves
// Declaração de Variável
$className: 'coluna';
// O FOR
@for $i from 1 through 4 {
.#{$className}-#{$i} {
width: 60px + $i;
}
}
// Resultado do CSS Compilado usando o Gulp, WebPack
.coluna-1{ width: 61px; }
.coluna-2{ width: 62px; }
.coluna-3{ width: 63px; }
.coluna-4{ width: 64px; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment