Skip to content

Commit

Permalink
Use fontspring suggested media query targeting for chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin committed Nov 19, 2013
1 parent 1dbeade commit 67a5c34
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/fontcustom/templates/_fontcustom-bootstrap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
font-style: normal;
}

@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: "<%= @opts.font_name %>";
src: url("<%= @font_path_alt %>.svg#<%= @opts.font_name %>") format("svg");
}
}

[class^="<%= @opts.css_prefix %>"]:before, [class*=" <%= @opts.css_prefix %>"]:before {
font-family: "<%= @opts.font_name %>";
font-weight: normal;
Expand Down
7 changes: 7 additions & 0 deletions lib/fontcustom/templates/_fontcustom-rails.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
font-style: normal;
}

@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: "<%= @opts.font_name %>";
src: url("<%= @font_path_alt %>.svg#<%= @opts.font_name %>") format("svg");
}
}

[data-icon]:before { content: attr(data-icon); }

[data-icon]:before,
Expand Down
7 changes: 7 additions & 0 deletions lib/fontcustom/templates/_fontcustom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
font-style: normal;
}

@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: "<%= @opts.font_name %>";
src: url("<%= @font_path_alt %>.svg#<%= @opts.font_name %>") format("svg");
}
}

[data-icon]:before { content: attr(data-icon); }

[data-icon]:before,
Expand Down
7 changes: 7 additions & 0 deletions lib/fontcustom/templates/fontcustom-bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
font-style: normal;
}

@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: "<%= @opts.font_name %>";
src: url("<%= @font_path %>.svg#<%= @opts.font_name %>") format("svg");
}
}

[class^="<%= @opts.css_prefix %>"]:before, [class*=" <%= @opts.css_prefix %>"]:before {
font-family: "<%= @opts.font_name %>";
font-weight: normal;
Expand Down
7 changes: 7 additions & 0 deletions lib/fontcustom/templates/fontcustom-preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@
font-style: normal;
}

@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: "<%= @opts.font_name %>";
src: url("<%= @font_path_preview %>.svg#<%= @opts.font_name %>") format("svg");
}
}

[data-icon]:before { content: attr(data-icon); }

[data-icon]:before,
Expand Down
7 changes: 7 additions & 0 deletions lib/fontcustom/templates/fontcustom.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
font-style: normal;
}

@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: "<%= @opts.font_name %>";
src: url("<%= @font_path %>.svg#<%= @opts.font_name %>") format("svg");
}
}

[data-icon]:before { content: attr(data-icon); }

[data-icon]:before,
Expand Down

0 comments on commit 67a5c34

Please # to comment.