From 03f71ba9010994fdf80565f02c3a6438100b5ff7 Mon Sep 17 00:00:00 2001 From: Dave Gandy Date: Sun, 24 Aug 2014 11:42:24 -0500 Subject: [PATCH] adding .fa-icon mixin #2305 #2454 --- less/mixins.less | 9 +++++++++ scss/_mixins.scss | 9 +++++++++ src/assets/font-awesome/less/mixins.less | 4 ++++ src/assets/font-awesome/scss/_mixins.scss | 4 ++++ 4 files changed, 26 insertions(+) diff --git a/less/mixins.less b/less/mixins.less index eac627a29..b7bfadc79 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -1,6 +1,15 @@ // Mixins // -------------------------- +.fa-icon() { + display: inline-block; + font: normal normal normal 14px/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; +} + .fa-icon-rotate(@degrees, @rotation) { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); -webkit-transform: rotate(@degrees); diff --git a/scss/_mixins.scss b/scss/_mixins.scss index 1bdbba958..a139dfb30 100644 --- a/scss/_mixins.scss +++ b/scss/_mixins.scss @@ -1,6 +1,15 @@ // Mixins // -------------------------- +@mixin fa-icon() { + display: inline-block; + font: normal normal normal 14px/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; +} + @mixin fa-icon-rotate($degrees, $rotation) { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); -webkit-transform: rotate($degrees); diff --git a/src/assets/font-awesome/less/mixins.less b/src/assets/font-awesome/less/mixins.less index dd45c0711..c61bb5b44 100644 --- a/src/assets/font-awesome/less/mixins.less +++ b/src/assets/font-awesome/less/mixins.less @@ -3,6 +3,10 @@ // Mixins // -------------------------- +.fa-icon() { +{% include code/core.css %} +} + .fa-icon-rotate(@degrees, @rotation) { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); -webkit-transform: rotate(@degrees); diff --git a/src/assets/font-awesome/scss/_mixins.scss b/src/assets/font-awesome/scss/_mixins.scss index 101d295d3..0f84bb9ee 100644 --- a/src/assets/font-awesome/scss/_mixins.scss +++ b/src/assets/font-awesome/scss/_mixins.scss @@ -3,6 +3,10 @@ // Mixins // -------------------------- +@mixin fa-icon() { +{% include code/core.css %} +} + @mixin fa-icon-rotate($degrees, $rotation) { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); -webkit-transform: rotate($degrees);