Merge pull request #3 from james-johnston-thumbtack/font-face-naming

Allow custom naming of font family
This commit is contained in:
Julien Deswaef 2018-02-04 12:21:27 -08:00 committed by GitHub
commit 860aecf5b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 15 additions and 10 deletions

View File

@ -54,6 +54,7 @@ fontawesome:
twitter: fontawesome twitter: fontawesome
tagline: The iconic font and CSS toolkit tagline: The iconic font and CSS toolkit
css_prefix: fa css_prefix: fa
font_family: FontAwesome
author: author:
name: Dave Gandy name: Dave Gandy
email: dave@fontawesome.io email: dave@fontawesome.io

View File

@ -3,7 +3,7 @@
.@{fa-css-prefix} { .@{fa-css-prefix} {
display: inline-block; display: inline-block;
font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration font: normal normal normal @fa-font-size-base/@fa-line-height-base @fa-font-family; // shortening font declaration
font-size: inherit; // can't have font-size inherit on line above, so need to override font-size: inherit; // can't have font-size inherit on line above, so need to override
text-rendering: auto; // optimizelegibility throws things off #1094 text-rendering: auto; // optimizelegibility throws things off #1094
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;

View File

@ -3,7 +3,7 @@
.fa-icon() { .fa-icon() {
display: inline-block; display: inline-block;
font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration font: normal normal normal @fa-font-size-base/@fa-line-height-base @fa-font-family; // shortening font declaration
font-size: inherit; // can't have font-size inherit on line above, so need to override font-size: inherit; // can't have font-size inherit on line above, so need to override
text-rendering: auto; // optimizelegibility throws things off #1094 text-rendering: auto; // optimizelegibility throws things off #1094
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;

View File

@ -2,7 +2,7 @@
* -------------------------- */ * -------------------------- */
@font-face { @font-face {
font-family: 'FontAwesome'; font-family: '@{fa-font-family}';
src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}');
src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'),
url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'),

View File

@ -6,6 +6,7 @@
@fa-line-height-base: 1; @fa-line-height-base: 1;
//@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.7.0/fonts"; // for referencing Bootstrap CDN font files directly //@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.7.0/fonts"; // for referencing Bootstrap CDN font files directly
@fa-css-prefix: fa; @fa-css-prefix: fa;
@fa-font-family: FontAwesome;
@fa-version: "4.7.0"; @fa-version: "4.7.0";
@fa-border-color: #eee; @fa-border-color: #eee;
@fa-inverse: #fff; @fa-inverse: #fff;

View File

@ -3,7 +3,7 @@
.#{$fa-css-prefix} { .#{$fa-css-prefix} {
display: inline-block; display: inline-block;
font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} #{$fa-font-family}; // shortening font declaration
font-size: inherit; // can't have font-size inherit on line above, so need to override font-size: inherit; // can't have font-size inherit on line above, so need to override
text-rendering: auto; // optimizelegibility throws things off #1094 text-rendering: auto; // optimizelegibility throws things off #1094
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;

View File

@ -3,7 +3,7 @@
@mixin fa-icon() { @mixin fa-icon() {
display: inline-block; display: inline-block;
font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} #{$fa-font-family}; // shortening font declaration
font-size: inherit; // can't have font-size inherit on line above, so need to override font-size: inherit; // can't have font-size inherit on line above, so need to override
text-rendering: auto; // optimizelegibility throws things off #1094 text-rendering: auto; // optimizelegibility throws things off #1094
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;

View File

@ -2,7 +2,7 @@
* -------------------------- */ * -------------------------- */
@font-face { @font-face {
font-family: 'FontAwesome'; font-family: '#{$fa-font-family}';
src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}');
src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'),
url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'),

View File

@ -6,6 +6,7 @@ $fa-font-size-base: 14px !default;
$fa-line-height-base: 1 !default; $fa-line-height-base: 1 !default;
//$fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.7.0/fonts" !default; // for referencing Bootstrap CDN font files directly //$fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.7.0/fonts" !default; // for referencing Bootstrap CDN font files directly
$fa-css-prefix: fa !default; $fa-css-prefix: fa !default;
$fa-font-family: FontAwesome !default;
$fa-version: "4.7.0" !default; $fa-version: "4.7.0" !default;
$fa-border-color: #eee !default; $fa-border-color: #eee !default;
$fa-inverse: #fff !default; $fa-inverse: #fff !default;

View File

@ -1,5 +1,5 @@
display: inline-block; display: inline-block;
font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration font: normal normal normal @fa-font-size-base/@fa-line-height-base @fa-font-family; // shortening font declaration
font-size: inherit; // can't have font-size inherit on line above, so need to override font-size: inherit; // can't have font-size inherit on line above, so need to override
text-rendering: auto; // optimizelegibility throws things off #1094 text-rendering: auto; // optimizelegibility throws things off #1094
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;

View File

@ -1,5 +1,5 @@
display: inline-block; display: inline-block;
font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} #{$fa-font-family}; // shortening font declaration
font-size: inherit; // can't have font-size inherit on line above, so need to override font-size: inherit; // can't have font-size inherit on line above, so need to override
text-rendering: auto; // optimizelegibility throws things off #1094 text-rendering: auto; // optimizelegibility throws things off #1094
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;

View File

@ -2,7 +2,7 @@
* -------------------------- */ * -------------------------- */
@font-face { @font-face {
font-family: 'FontAwesome'; font-family: '@{fa-font-family}';
src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}');
src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'),
url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'),

View File

@ -8,6 +8,7 @@
@fa-line-height-base: 1; @fa-line-height-base: 1;
//@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/{{site.fontawesome.version}}/fonts"; // for referencing Bootstrap CDN font files directly //@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/{{site.fontawesome.version}}/fonts"; // for referencing Bootstrap CDN font files directly
@fa-css-prefix: {{ site.fontawesome.css_prefix }}; @fa-css-prefix: {{ site.fontawesome.css_prefix }};
@fa-font-family: {{ site.fontawesome.font_family }};
@fa-version: "{{ site.fontawesome.version }}"; @fa-version: "{{ site.fontawesome.version }}";
@fa-border-color: #eee; @fa-border-color: #eee;
@fa-inverse: #fff; @fa-inverse: #fff;

View File

@ -2,7 +2,7 @@
* -------------------------- */ * -------------------------- */
@font-face { @font-face {
font-family: 'FontAwesome'; font-family: '#{$fa-font-family}';
src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}');
src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'),
url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'),

View File

@ -8,6 +8,7 @@ $fa-font-size-base: 14px !default;
$fa-line-height-base: 1 !default; $fa-line-height-base: 1 !default;
//$fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/{{site.fontawesome.version}}/fonts" !default; // for referencing Bootstrap CDN font files directly //$fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/{{site.fontawesome.version}}/fonts" !default; // for referencing Bootstrap CDN font files directly
$fa-css-prefix: {{ site.fontawesome.css_prefix }} !default; $fa-css-prefix: {{ site.fontawesome.css_prefix }} !default;
$fa-font-family: {{ site.fontawesome.font_family }} !default;
$fa-version: "{{ site.fontawesome.version }}" !default; $fa-version: "{{ site.fontawesome.version }}" !default;
$fa-border-color: #eee !default; $fa-border-color: #eee !default;
$fa-inverse: #fff !default; $fa-inverse: #fff !default;