lib/fontcustom/templates/_fontcustom.scss in fontcustom-1.0.0.pre vs lib/fontcustom/templates/_fontcustom.scss in fontcustom-1.0.0.pre2

- old
+ new

@@ -1,72 +1,34 @@ -/* - Font Custom -*/ +<% +file_name = if @opts[:font_face_path] + File.join @opts[:font_face_path], @data[:file_name] +else + @data[:file_name] +end +%>/* + * Font Custom: bare CSS + */ @font-face { font-family: "<%= @opts[:font_name] %>"; - src: url("<%= @data[:file_name] %>.eot?#iefix") format("embedded-opentype"), - url("<%= @data[:file_name] %>.woff") format("woff"), - url("<%= @data[:file_name] %>.ttf") format("truetype"), - url("<%= @data[:file_name] %>.svg#<%= @opts[:font_name] %>") format("svg"); + src: url("<%= file_name %>.eot"); + src: url("<%= file_name %>.eot?#iefix") format("embedded-opentype"), + url("<%= file_name %>.woff") format("woff"), + url("<%= file_name %>.ttf") format("truetype"), + url("<%= file_name %>.svg#<%= @opts[:font_name] %>") format("svg"); font-weight: normal; font-style: normal; } -/* - Bootstrap Overrides -*/ - -[class^="<%= @opts[:css_prefix] %>"]:before, [class*=" <%= @opts[:css_prefix] %>"]:before { +<%= @data[:glyphs].map {|name| ".#{@opts[:css_prefix] + name}:before"}.join(",\n") %> { font-family: "<%= @opts[:font_name] %>"; - font-weight: normal; 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; } - -a [class^="<%= @opts[:css_prefix] %>"], a [class*=" <%= @opts[:css_prefix] %>"] { - display: inline-block; - text-decoration: inherit; -} - -/* makes the font 33% larger relative to the icon container */ -.<%= @opts[:css_prefix] %>large:before { - vertical-align: top; - font-size: 1.333em; -} - -/* keeps button heights with and without icons the same */ -.btn [class^="<%= @opts[:css_prefix] %>"], .btn [class*=" <%= @opts[:css_prefix] %>"] { - line-height: 0.9em; -} - -li [class^="<%= @opts[:css_prefix] %>"], li [class*=" <%= @opts[:css_prefix] %>"] { - display: inline-block; - width: 1.25em; - text-align: center; -} - -/* 1.5 increased font size for <%= @opts[:css_prefix] %>large * 1.25 width */ -li .<%= @opts[:css_prefix] %>large[class^="<%= @opts[:css_prefix] %>"], li .<%= @opts[:css_prefix] %>large[class*=" <%= @opts[:css_prefix] %>"] { - width: 1.875em; -} - -li[class^="<%= @opts[:css_prefix] %>"], li[class*=" <%= @opts[:css_prefix] %>"] { - margin-left: 0; - list-style-type: none; -} - -li[class^="<%= @opts[:css_prefix] %>"]:before, li[class*=" <%= @opts[:css_prefix] %>"]:before { - text-indent: -2em; - text-align: center; -} - -li[class^="<%= @opts[:css_prefix] %>"].<%= @opts[:css_prefix] %>large:before, li[class*=" <%= @opts[:css_prefix] %>"].<%= @opts[:css_prefix] %>large:before { - text-indent: -1.333em; -} - -/* - Icon Classes -*/ <% @data[:glyphs].each_with_index do |name, index| %> .<%= @opts[:css_prefix] + name %>:before { content: "\<%= (61696+index).to_s(16) %>"; }<% end %>