Skip to content

Commit

Permalink
Add custom class variable
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoboucas committed Aug 11, 2016
1 parent 585d7f3 commit 95b30aa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions _include-media-columns.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@
/// .col-1-3@phone, .col-1-3@tablet, .col-1-3@deskop
/// .col-2-3@phone (...)
///

$im-columns-class: '.col' !default;

@mixin im-columns($columns...) {
@each $i in $columns {
@for $n from 1 through $i {
.col--#{$n}-#{$i} {
#{$im-columns-class}--#{$n}-#{$i} {
width: ($n / $i) * 100%;
}
}
Expand All @@ -29,7 +32,7 @@
@include media(#{'>=' + $breakpoint-name}) {
@each $i in $columns {
@for $n from 1 through $i {
.col--#{$n}-#{$i}\@#{$breakpoint-name} {
#{$im-columns-class}--#{$n}-#{$i}\@#{$breakpoint-name} {
width: ($n / $i) * 100%;
}
}
Expand Down

0 comments on commit 95b30aa

Please sign in to comment.