generator-robonkey
Version:
A Yeoman generator for Gulp, Templating, CSS Preprocessors, Coffeescript, PostCSS, Modernizr, svg icons/icon font generator, BrowserSync, and some libraries to choose from. Express, Wordpress, Drupal, CodeIgniter, Laravel subgenerators are available.
70 lines (52 loc) • 1.66 kB
text/less
// ==========================================================================
// Variables
// ==========================================================================
<%_.each(glyphs, function(glyph) { %>
@<%= cssClass%>-<%= glyph.fileName %>: "\<%= glyph.codePoint %>";<% }); %>
// ==========================================================================
// Map
// ==========================================================================
.<%= cssClass%>-char() {
<% _.each(glyphs, function(glyph) { %>@<%= glyph.fileName %>: "\<%= glyph.codePoint %>";
<% }); %>
content: ;
}
// ==========================================================================
// Extends
// ==========================================================================
.<%= cssClass%>-base {
font-family: -font-family;
font-size: -font-size;
line-height: -line-height;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
speak: none;
display: inline-block;
text-rendering: auto;
// Better Font Rendering
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.<%= cssClass%>-content(, : before) {
-selector: ~":@{insert}";
&@{pseudo-selector} {
&:extend(.<%= cssClass%>-base);
.<%= cssClass%>-char();
}
}
.<%= cssClass%> {
display: inline-block;
&:before {
&:extend(.<%= cssClass%>-base);
}
}
.<%= cssClass%>--fw {
width: 1em;
text-align: center;
}
<% _.each(glyphs, function(glyph) { %>.<%= cssClass%>--<%= glyph.fileName %> {
.<%= cssClass%>-content(<%= glyph.fileName %>);
}
<% }); %>