Created
June 12, 2014 21:27
-
-
Save maxbrockman453/1f4d1b4b5ec41d9fdc99 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// libsass (v0.8.6) | |
// ---- | |
// Exmple While Loop | |
@mixin spans($args) { | |
$columns: $args; | |
$col-val: length($columns); | |
@for $i from 1 through $col-val { | |
.span-#{nth($columns, $i)} { | |
width: ((100 / $col-val) * $i) * 1%; | |
} | |
} | |
} | |
@include spans(one two three four five six seven eight nine ten); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.span-one { | |
width: 10%; } | |
.span-two { | |
width: 20%; } | |
.span-three { | |
width: 30%; } | |
.span-four { | |
width: 40%; } | |
.span-five { | |
width: 50%; } | |
.span-six { | |
width: 60%; } | |
.span-seven { | |
width: 70%; } | |
.span-eight { | |
width: 80%; } | |
.span-nine { | |
width: 90%; } | |
.span-ten { | |
width: 100%; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment