hung-phan / generator-rails-react-webpack

Integrate Ruby on Rails with React.js and Webpack
56 stars 9 forks source link

Optimize bootstrap column generator #6

Closed chrisvfritz closed 9 years ago

chrisvfritz commented 9 years ago

I see your bootstrap column generator here and do something similar on many of my projects:

@mixin bootstrap-column($name, $percent-width) {
  $grid-width: $grid-columns * $percent-width / 100;

  .col-lg-#{name} { @include make-lg-column($grid-width); }
  .col-md-#{name} { @include make-md-column($grid-width); }
  .col-sm-#{name} { @include make-sm-column($grid-width); }
  .col-xs-#{name} { @include make-xs-column($grid-width); }
}

This has a few advantages:

hung-phan commented 9 years ago

Thanks @chrisvfritz, I will integrate that into my generator.

hung-phan commented 9 years ago

Updated