Created
December 18, 2013 10:28
-
-
Save alexlouden/8020202 to your computer and use it in GitHub Desktop.
Sass mixin for icon font definitions (and search-replace from expanded sass definition)
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: | |
// \.icon\-(.+)\:before[ ]*\n 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