Created
January 22, 2014 03:29
-
-
Save e-river/8553054 to your computer and use it in GitHub Desktop.
[Sass]Adding a 0 if only one digit serial number of the class name
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
$num: ""; | |
@for $i from 1 through 10 { | |
@if $i < 10 { | |
$num: "0#{$i}"; | |
} @else { | |
$num: "#{$i}"; | |
} | |
.classname#{$num} { | |
// CSS code here | |
} | |
} | |
//.classname01{} | |
//.classname02{} | |
//.classname03{} | |
//.classname04{} | |
//.classname05{} | |
//.classname06{} | |
//.classname07{} | |
//.classname08{} | |
//.classname09{} | |
//.classname10{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment