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.
This commit is contained in:
Brian McAllister 2013-02-17 18:04:17 -05:00
parent 8b601f5253
commit 86604248c1

View File

@ -51,15 +51,28 @@ $font-awesome-icon-sizes: 2 3 4 !default;
$font-awesome-border-color: #eee !default; $font-awesome-border-color: #eee !default;
$font-awesome-icon-muted: $font-awesome-border-color !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. Mixins.
---------------------------------- */ ---------------------------------- */
@mixin border-radius($radius) { @mixin font-awesome-border-radius($radius) {
-webkit-border-radius: $radius; @if $experimental-support-for-mozilla {
-moz-border-radius: $radius; -moz-border-radius: $radius;
}
@if $experimental-support-for-webkit {
-webkit-border-radius: $radius;
}
border-radius: $radius; border-radius: $radius;
} }
@ -207,7 +220,7 @@ ul.icons {
---------------------------------- */ ---------------------------------- */
@if $font-awesome-using-bordered { @if $font-awesome-using-bordered {
.icon-border { .icon-border {
@include border-radius(3px); @include font-awesome-border-radius(3px);
padding: .2em .25em .15em; padding: .2em .25em .15em;
border: solid 1px $font-awesome-border-color; border: solid 1px $font-awesome-border-color;
@ -231,7 +244,7 @@ ul.icons {
@if $font-awesome-using-bordered { @if $font-awesome-using-bordered {
&.icon-border { &.icon-border {
@include border-radius($px + 2); @include font-awesome-border-radius($px + 2);
border-width: $px; border-width: $px;
} }