Advertisement
Guest User

Untitled

a guest
Apr 25th, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. // ----
  2. // Sass (v3.4.12)
  3. // Compass (v1.0.3)
  4. // ----
  5.  
  6. // .span-1 {
  7. // width: 25%;
  8. // }
  9. // .span-2 {
  10. // width: 50%;
  11. // }
  12. // .span-3 {
  13. // width: 75%;
  14. // }
  15. // .span-4 {
  16. // width: 100%;
  17. // }
  18.  
  19. @mixin spans($cols) {
  20. $col-val: length($cols);
  21.  
  22. @for $i from 1 through $col-val {
  23. .span-#{nth($cols, $i)} {
  24. width: percentage((1 / $col-val) * $i);
  25. }
  26. }
  27. }
  28.  
  29. @include spans(1 2 3 4);
  30.  
  31. @include spans(one two three four);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement