Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ----
- // Sass (v3.4.12)
- // Compass (v1.0.3)
- // ----
- // .span-1 {
- // width: 25%;
- // }
- // .span-2 {
- // width: 50%;
- // }
- // .span-3 {
- // width: 75%;
- // }
- // .span-4 {
- // width: 100%;
- // }
- @mixin spans($cols) {
- $col-val: length($cols);
- @for $i from 1 through $col-val {
- .span-#{nth($cols, $i)} {
- width: percentage((1 / $col-val) * $i);
- }
- }
- }
- @include spans(1 2 3 4);
- @include spans(one two three four);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement