From c39a063a09eaaa4c8fec3fb848c8bea962a7cb49 Mon Sep 17 00:00:00 2001 From: Aaron Reisman Date: Fri, 17 Apr 2015 20:37:34 -0700 Subject: [PATCH] Add feature to customize line-height-base --- less/core.less | 2 +- less/mixins.less | 2 +- less/variables.less | 1 + scss/_core.scss | 2 +- scss/_mixins.scss | 2 +- scss/_variables.scss | 1 + src/_includes/code/core.less | 2 +- src/_includes/code/core.scss | 2 +- src/assets/font-awesome/less/variables.less | 1 + src/assets/font-awesome/scss/_variables.scss | 1 + 10 files changed, 10 insertions(+), 6 deletions(-) diff --git a/less/core.less b/less/core.less index f814f1e17..123ef28f9 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/@fa-line-height-base FontAwesome; // 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/mixins.less b/less/mixins.less index c97f4604c..85ff0bb5f 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -3,7 +3,7 @@ .fa-icon() { display: inline-block; - font: normal normal normal @fa-font-size-base/1 FontAwesome; // shortening font declaration + font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // 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 56a8735cd..e7ef71229 100644 --- a/less/variables.less +++ b/less/variables.less @@ -3,6 +3,7 @@ @fa-font-path: "../fonts"; @fa-font-size-base: 14px; +@fa-line-height-base: 1; //@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.3.1/fonts"; // for referencing Bootstrap CDN font files directly @fa-css-prefix: fa; @fa-version: "4.3.1"; diff --git a/scss/_core.scss b/scss/_core.scss index 5a2db9d56..0a97b46a0 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}/#{$fa-line-height-base} FontAwesome; // 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/_mixins.scss b/scss/_mixins.scss index 6b7f16093..60e1134ab 100644 --- a/scss/_mixins.scss +++ b/scss/_mixins.scss @@ -3,7 +3,7 @@ @mixin fa-icon() { display: inline-block; - font: normal normal normal #{$fa-font-size-base}/1 FontAwesome; // shortening font declaration + font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // 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 b6292a7fe..9efb0f8c0 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-line-height-base: 1 !default; //$fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.3.1/fonts" !default; // for referencing Bootstrap CDN font files directly $fa-css-prefix: fa !default; $fa-version: "4.3.1" !default; diff --git a/src/_includes/code/core.less b/src/_includes/code/core.less index 406162884..45399dea9 100644 --- a/src/_includes/code/core.less +++ b/src/_includes/code/core.less @@ -1,5 +1,5 @@ display: inline-block; - font: normal normal normal @fa-font-size-base/1 FontAwesome; // shortening font declaration + font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // 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/src/_includes/code/core.scss b/src/_includes/code/core.scss index 2b02720f9..b96633e3e 100644 --- a/src/_includes/code/core.scss +++ b/src/_includes/code/core.scss @@ -1,5 +1,5 @@ display: inline-block; - font: normal normal normal #{$fa-font-size-base}/1 FontAwesome; // shortening font declaration + font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // 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/src/assets/font-awesome/less/variables.less b/src/assets/font-awesome/less/variables.less index a5cf5de25..83207e414 100644 --- a/src/assets/font-awesome/less/variables.less +++ b/src/assets/font-awesome/less/variables.less @@ -5,6 +5,7 @@ @fa-font-path: "../fonts"; @fa-font-size-base: 14px; +@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-css-prefix: {{ site.fontawesome.css_prefix }}; @fa-version: "{{ site.fontawesome.version }}"; diff --git a/src/assets/font-awesome/scss/_variables.scss b/src/assets/font-awesome/scss/_variables.scss index 0d483d116..9dfa9018d 100644 --- a/src/assets/font-awesome/scss/_variables.scss +++ b/src/assets/font-awesome/scss/_variables.scss @@ -5,6 +5,7 @@ $fa-font-path: "../fonts" !default; $fa-font-size-base: 14px !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-css-prefix: {{ site.fontawesome.css_prefix }} !default; $fa-version: "{{ site.fontawesome.version }}" !default;