Skip to content

Commit

Permalink
add SCSS codepoint map in addition to the variables
Browse files Browse the repository at this point in the history
  • Loading branch information
odedniv committed Aug 11, 2016
1 parent 9188eb7 commit 4ad8616
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/fontcustom/templates/_fontcustom-rails.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@
[data-icon]:before { content: attr(data-icon); }

[data-icon]:before,
<%= @options[:css_selector].sub("{{glyph}}", "") %>:before,
<%= glyph_selectors %> {
<%= glyph_properties %>
}

<%= glyphs %>

<% @glyphs.each do |name, value| %>
$font-<%= font_name.gsub(/[^\w\d_]/, '-') %>-<%= name.to_s %>: "\<%= value[:codepoint].to_s(16) %>";<% end %>
$font-<%= font_name.gsub(/[^\w\d_]/, '-') %>: (<% @glyphs.each do |name, value| %>
<%= name.to_s %>: "\<%= value[:codepoint].to_s(16) %>",<% end %>
);
5 changes: 5 additions & 0 deletions lib/fontcustom/templates/_fontcustom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@
[data-icon]:before { content: attr(data-icon); }

[data-icon]:before,
<%= @options[:css_selector].sub("{{glyph}}", "") %>:before,
<%= glyph_selectors %> {
<%= glyph_properties %>
}

<%= glyphs %>

<% @glyphs.each do |name, value| %>
$font-<%= font_name.gsub(/[^\w\d_]/, '-') %>-<%= name.to_s %>: "\<%= value[:codepoint].to_s(16) %>";<% end %>
$font-<%= font_name.gsub(/[^\w\d_]/, '-') %>: (<% @glyphs.each do |name, value| %>
<%= name.to_s %>: "\<%= value[:codepoint].to_s(16) %>",<% end %>
);

0 comments on commit 4ad8616

Please sign in to comment.