Last active
August 29, 2015 14:20
-
-
Save cimmanon/e07d3fd4f67452412ad0 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or 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
<p class="007">bond</p> |
This file contains hidden or 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
// ---- | |
// Sass (v3.4.13) | |
// Compass (v1.0.3) | |
// ---- | |
@function escape_leading_numbers($s) { | |
$first-char: str_slice(#{$s}, 0, 1); | |
$found: index('1' '2' '3' '4' '5' '6' '7' '8' '9' '0', $first-char); | |
@return if($found, unquote(str-insert(str-slice(#{$s}, 2), "\\3#{$first-char} ", 1)), $s); | |
} | |
$name: '007'; | |
.#{escape_leading_numbers($name)} { | |
color: red; | |
} | |
@each $car in | |
bmwwhite | |
hondared | |
22ltr-porche | |
30ltr-cossworth | |
{ | |
.#{escape_leading_numbers($car)} { | |
background:url(/img/cars/#{$car}.jpg) no-repeat | |
} | |
} |
This file contains hidden or 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
.\30 07 { | |
color: red; | |
} | |
.bmwwhite { | |
background: url(/img/cars/bmwwhite.jpg) no-repeat; | |
} | |
.hondared { | |
background: url(/img/cars/hondared.jpg) no-repeat; | |
} | |
.\32 2ltr-porche { | |
background: url(/img/cars/22ltr-porche.jpg) no-repeat; | |
} | |
.\33 0ltr-cossworth { | |
background: url(/img/cars/30ltr-cossworth.jpg) no-repeat; | |
} |
This file contains hidden or 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
<p class="007">bond</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment