From 86604248c11b6f85df78e815daddcb064c2b5b0a Mon Sep 17 00:00:00 2001 From: Brian McAllister Date: Sun, 17 Feb 2013 18:04:17 -0500 Subject: [PATCH] Use browser support variables from Compass. These variables exist in Compass to control the level of browser support you're looking to hit. These will default to true (the same as Compass), which will output the same CSS as the regular Font Awesome CSS. See: http://compass-style.org/reference/compass/support/ It's likely that large websites are using these variables already, so this will help cut down on CSS that's already not required by a Compass project using these variables. --- sass/font-awesome.scss | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/sass/font-awesome.scss b/sass/font-awesome.scss index 096e75ae7..a89e045c3 100644 --- a/sass/font-awesome.scss +++ b/sass/font-awesome.scss @@ -51,15 +51,28 @@ $font-awesome-icon-sizes: 2 3 4 !default; $font-awesome-border-color: #eee !default; $font-awesome-icon-muted: $font-awesome-border-color !default; +/* + Compass browser support configuration variables. + See: http://compass-style.org/reference/compass/support/ +*/ +$experimental-support-for-mozilla: true !default; +$experimental-support-for-webkit: true !default; + /** ---------------------------------- Mixins. ---------------------------------- */ -@mixin border-radius($radius) { - -webkit-border-radius: $radius; - -moz-border-radius: $radius; +@mixin font-awesome-border-radius($radius) { + @if $experimental-support-for-mozilla { + -moz-border-radius: $radius; + } + + @if $experimental-support-for-webkit { + -webkit-border-radius: $radius; + } + border-radius: $radius; } @@ -207,7 +220,7 @@ ul.icons { ---------------------------------- */ @if $font-awesome-using-bordered { .icon-border { - @include border-radius(3px); + @include font-awesome-border-radius(3px); padding: .2em .25em .15em; border: solid 1px $font-awesome-border-color; @@ -231,7 +244,7 @@ ul.icons { @if $font-awesome-using-bordered { &.icon-border { - @include border-radius($px + 2); + @include font-awesome-border-radius($px + 2); border-width: $px; }