Added a variable to customise base font size

Closes #5128
This commit is contained in:
Geremia Taglialatela 2014-12-28 15:27:45 +01:00
parent b590472694
commit c27c1a59b9
14 changed files with 24 additions and 10 deletions

View file

@ -3,9 +3,10 @@
.@{fa-css-prefix} { .@{fa-css-prefix} {
display: inline-block; display: inline-block;
font: normal normal normal 14px/1 FontAwesome; // shortening font declaration font: normal normal normal @fa-font-size-base/1 FontAwesome; // 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;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }

View file

@ -3,11 +3,12 @@
.fa-icon() { .fa-icon() {
display: inline-block; display: inline-block;
font: normal normal normal 14px/1 FontAwesome; // shortening font declaration font: normal normal normal @fa-font-size-base/1 FontAwesome; // 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;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.fa-icon-rotate(@degrees, @rotation) { .fa-icon-rotate(@degrees, @rotation) {

View file

@ -2,6 +2,7 @@
// -------------------------- // --------------------------
@fa-font-path: "../fonts"; @fa-font-path: "../fonts";
@fa-font-size-base: 14px;
//@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.3.0/fonts"; // for referencing Bootstrap CDN font files directly //@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.3.0/fonts"; // for referencing Bootstrap CDN font files directly
@fa-css-prefix: fa; @fa-css-prefix: fa;
@fa-version: "4.3.0"; @fa-version: "4.3.0";

View file

@ -3,9 +3,10 @@
.#{$fa-css-prefix} { .#{$fa-css-prefix} {
display: inline-block; display: inline-block;
font: normal normal normal 14px/1 FontAwesome; // shortening font declaration font: normal normal normal #{$fa-font-size-base}/1 FontAwesome; // 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;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }

View file

@ -3,11 +3,12 @@
@mixin fa-icon() { @mixin fa-icon() {
display: inline-block; display: inline-block;
font: normal normal normal 14px/1 FontAwesome; // shortening font declaration font: normal normal normal #{$fa-font-size-base}/1 FontAwesome; // 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;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
@mixin fa-icon-rotate($degrees, $rotation) { @mixin fa-icon-rotate($degrees, $rotation) {

View file

@ -2,6 +2,7 @@
// -------------------------- // --------------------------
$fa-font-path: "../fonts" !default; $fa-font-path: "../fonts" !default;
$fa-font-size-base: 14px !default;
//$fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.3.0/fonts" !default; // for referencing Bootstrap CDN font files directly //$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-css-prefix: fa !default;
$fa-version: "4.3.0" !default; $fa-version: "4.3.0" !default;

View file

@ -1,6 +1,6 @@
display: inline-block; display: inline-block;
font: normal normal normal 14px/1 FontAwesome; // shortening font declaration font: normal normal normal @fa-font-size-base/1 FontAwesome; // 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;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;

View file

@ -0,0 +1,6 @@
display: inline-block;
font: normal normal normal #{$fa-font-size-base}/1 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;
-moz-osx-font-smoothing: grayscale;

View file

@ -5,5 +5,5 @@
// ------------------------- // -------------------------
.@{fa-css-prefix} { .@{fa-css-prefix} {
{% include code/core.css %} {% include code/core.less %}
} }

View file

@ -4,7 +4,7 @@
// -------------------------- // --------------------------
.fa-icon() { .fa-icon() {
{% include code/core.css %} {% include code/core.less %}
} }
.fa-icon-rotate(@degrees, @rotation) { .fa-icon-rotate(@degrees, @rotation) {

View file

@ -4,6 +4,7 @@
// -------------------------- // --------------------------
@fa-font-path: "../fonts"; @fa-font-path: "../fonts";
@fa-font-size-base: 14px;
//@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-version: "{{ site.fontawesome.version }}"; @fa-version: "{{ site.fontawesome.version }}";

View file

@ -5,5 +5,5 @@
// ------------------------- // -------------------------
.#{$fa-css-prefix} { .#{$fa-css-prefix} {
{% include code/core.css %} {% include code/core.scss %}
} }

View file

@ -4,7 +4,7 @@
// -------------------------- // --------------------------
@mixin fa-icon() { @mixin fa-icon() {
{% include code/core.css %} {% include code/core.scss %}
} }
@mixin fa-icon-rotate($degrees, $rotation) { @mixin fa-icon-rotate($degrees, $rotation) {

View file

@ -4,6 +4,7 @@
// -------------------------- // --------------------------
$fa-font-path: "../fonts" !default; $fa-font-path: "../fonts" !default;
$fa-font-size-base: 14px !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-version: "{{ site.fontawesome.version }}" !default; $fa-version: "{{ site.fontawesome.version }}" !default;