lib/fontcustom/templates/_fontcustom.scss in fontcustom-1.2.0 vs lib/fontcustom/templates/_fontcustom.scss in fontcustom-1.3.0.beta

- old
+ new

@@ -1,31 +1,23 @@ // -// Icon Font: <%= @opts.font_name %> +// Icon Font: <%= font_name %> // -@font-face { - font-family: "<%= @opts.font_name %>"; - src: url("<%= @font_path_alt %>.eot"); - src: url("<%= @font_path_alt %>.eot?#iefix") format("embedded-opentype"), - url("<%= @font_path_alt %>.woff") format("woff"), - url("<%= @font_path_alt %>.ttf") format("truetype"), - url("<%= @font_path_alt %>.svg#<%= @opts.font_name %>") format("svg"); - font-weight: normal; - font-style: normal; -} +<%= font_face %> [data-icon]:before { content: attr(data-icon); } [data-icon]:before, -<%= @glyphs.map {|name| ".#{@opts.css_prefix + name}:before"}.join(",\n") %> { - font-family: "<%= @opts.font_name %>"; +<%= glyph_selectors %> { + display: inline-block; + font-family: "<%= font_name %>"; 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; + text-transform: none; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; } -<% @glyphs.each_with_index do |name, index| %> -.<%= @opts.css_prefix + name %>:before { content: "\<%= (61696+index).to_s(16) %>"; }<% end %> + +<%= glyphs %>