Skip to content

Commit

Permalink
Adding support for using HTML entities with data-icon HTML attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler Wanlass committed Sep 16, 2013
1 parent e326c58 commit ae4fad6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/fontcustom/templates/fontcustom.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@
font-style: normal;
}

[data-icon]:before {
font-family: "<%= @opts[:font_name] %>";
content: attr(data-icon);
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
display: inline-block;
text-decoration: inherit;
}

<%= @glyphs.map {|name| ".#{@opts.css_prefix + name}:before"}.join(",\n") %> {
font-family: "<%= @opts.font_name %>";
font-style: normal;
Expand Down

0 comments on commit ae4fad6

Please sign in to comment.