-
-
Save kasteph/11201738 to your computer and use it in GitHub Desktop.
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
@mixin icon($name, $code) | |
.icon-#{$name}:before | |
content: "#{$code}" | |
// Usage: | |
+icon(heart, \e600) | |
// Compiles to: | |
.icon-heart:before { | |
content: "\e600"; | |
} | |
// Regex: (css to sass mixin) | |
// \.icon\-(.+)\:before[ ]* \{\n\s+content: "([\\e0-9a-f]+)";\n\} | |
// +icon(\1, \2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment