Created
July 24, 2015 19:43
-
-
Save cimmanon/f4f56b15f56ba9d6ff45 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
<div class="007">Bond</div> |
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.14) | |
// 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; | |
} | |
.\007 { | |
border: 1px solid; | |
} |
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; | |
} | |
.\007 { | |
border: 1px solid; | |
} |
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
<div class="007">Bond</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment