30 Ağustos 2015 Pazar

sass otomatik class oluşturma mixin ve for loop

@mixin margin($direction) {
  @if $direction == top{
    .mt-#{$i*10}{ margin-top: $i * 10;}
  } @else if $direction == bottom{
    .mb-#{$i*10}{ margin-bottom: $i * 10;}
  }
}

@for $i from 1 through 10{
   @include margin(top)
}
@for $i from 1 through 10{
   @include margin(bottom)
}

1 Ağustos 2015 Cumartesi

Gruntjs file 2.version

module.exports = function(grunt) {

  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),