From 8f9d24d37df794ff14ec8c4334a14b6ad8c046a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D0=B8=D0=BB=20=D0=9F=D1=80=D0=BE?= =?UTF-8?q?=D0=BD=D0=B8=D0=BD?= Date: Tue, 5 May 2015 15:14:12 +1000 Subject: [PATCH] add(core) font name variable ~ move font name into variable to allow of using customized FontAwesome with different font name --- less/core.less | 2 +- less/variables.less | 3 ++- scss/_core.scss | 2 +- scss/_variables.scss | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/less/core.less b/less/core.less index f814f1e17..68b88156b 100644 --- a/less/core.less +++ b/less/core.less @@ -3,7 +3,7 @@ .@{fa-css-prefix} { display: inline-block; - font: normal normal normal @fa-font-size-base/1 FontAwesome; // shortening font declaration + font: normal normal normal @fa-font-size-base/1 @fa-font-name; // shortening font declaration font-size: inherit; // can't have font-size inherit on line above, so need to override text-rendering: auto; // optimizelegibility throws things off #1094 -webkit-font-smoothing: antialiased; diff --git a/less/variables.less b/less/variables.less index d526064c8..d74dff0e0 100644 --- a/less/variables.less +++ b/less/variables.less @@ -2,7 +2,8 @@ // -------------------------- @fa-font-path: "../fonts"; -@fa-font-size-base: 14px; +@fa-font-size-base: 14px +@fa-font-name: 'FontAwesome'; //@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.3.0/fonts"; // for referencing Bootstrap CDN font files directly @fa-css-prefix: fa; @fa-version: "4.3.0"; diff --git a/scss/_core.scss b/scss/_core.scss index 5a2db9d56..dd43959f5 100644 --- a/scss/_core.scss +++ b/scss/_core.scss @@ -3,7 +3,7 @@ .#{$fa-css-prefix} { display: inline-block; - font: normal normal normal #{$fa-font-size-base}/1 FontAwesome; // shortening font declaration + font: normal normal normal #{$fa-font-size-base}/1 #{$fa-font-name}; // shortening font declaration font-size: inherit; // can't have font-size inherit on line above, so need to override text-rendering: auto; // optimizelegibility throws things off #1094 -webkit-font-smoothing: antialiased; diff --git a/scss/_variables.scss b/scss/_variables.scss index 9b7210e23..0518ff498 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -3,6 +3,7 @@ $fa-font-path: "../fonts" !default; $fa-font-size-base: 14px !default; +$fa-font-name: 'FontAwesome' !default; //$fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.3.0/fonts" !default; // for referencing Bootstrap CDN font files directly $fa-css-prefix: fa !default; $fa-version: "4.3.0" !default;