2
0
Эх сурвалжийг харах

Add feature to customize line-height-base

Aaron Reisman 10 жил өмнө
parent
commit
c39a063a09

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 0
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";

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 0
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;

+ 1 - 1
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;

+ 1 - 1
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;

+ 1 - 0
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 }}";

+ 1 - 0
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;