-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Unicode codepoints change between recompiles #304
Comments
Is there any solution to the above issue? When more than 1 developer are inserting or deleting icons fontcustom compiles all icons and delivers a huge diff instead of just the newly add/removed icons. |
You must not use codes directly. Try to use custom sass/less template to generate named mixins. Something like this //
// Icon Font: <%= font_name %>
//
<%= font_face(url: "font-url", path: @font_path_alt ) %>
.<%= font_name %>-ic {
<%= glyph_properties %>
}
<%= glyph_selectors.gsub(':before', '') %> {
&:before {
@extend .<%= font_name %>-ic;
}
}
// var
<%=
@glyphs.inject([]) do |ret, p|
name, value = p
selector = @options[:css_selector].sub('{{glyph}}', name.to_s)
content = "\"\\#{value[:codepoint].to_s(16)}\""
ret << "#{selector}-mixin { content: #{content} } ; "
ret
end.map(&:strip).join("\n").strip
%>
// style
<%=
@glyphs.inject([]) do |ret, p|
name, value = p
selector = @options[:css_selector].sub('{{glyph}}', name.to_s)
content = "\"\\#{value[:codepoint].to_s(16)}\""
ret << "#{selector} { &:before{ content: #{content} } }"
ret
end.map(&:strip).join("\n").strip
%> |
According to #56 it is possible to keep the unicode for icons. But I wonder where i can define these mappings of icons to unicode. Didn't find any example how to do it. Can anyone help? |
Whenever we add a new icon, the code points for other icons change, which breaks our CSS whenever we try to reference icons directly from the stylesheet (e.g. in a
:before { content: "\f137"; }
rule).This is kind of annoying, as each new icon means we need to go over a lot of CSS rules to fix the references.
The text was updated successfully, but these errors were encountered: