Font-Awesome/scss/_mixins.scss

51 lines
1.1 KiB
SCSS
Raw Normal View History

// Mixins
// --------------------------
2013-06-12 14:33:11 +00:00
@mixin icon($icon) {
@include icon-FontAwesome();
content: $icon;
}
@mixin icon-FontAwesome() {
*margin-right: .3em; // fixes ie7 issues
2013-06-12 14:33:11 +00:00
font-family: FontAwesome;
-webkit-font-smoothing: antialiased;
2013-06-12 14:33:11 +00:00
font-style: normal;
font-weight: normal;
2013-06-12 14:33:11 +00:00
text-decoration: inherit;
2013-08-22 15:53:55 +00:00
text-rendering: auto;
-moz-osx-font-smoothing: grayscale;
2013-06-12 14:33:11 +00:00
}
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
border-radius: $radius;
}
@mixin icon-stack($width: 2em, $height: 2em, $top-font-size: 1em, $base-font-size: 2em) {
.icon-stack {
position: relative;
display: inline-block;
width: $width;
height: $height;
line-height: $width;
vertical-align: -35%;
[class^="icon-"],
[class*=" icon-"] {
position: absolute;
display: block;
width: 100%;
height: 100%;
font-size: $top-font-size;
line-height: inherit;
*line-height: $height;
text-align: center;
}
.icon-stack-base {
font-size: $base-font-size;
2013-06-12 16:42:37 +00:00
*line-height: #{$height / $base-font-size}em;
}
}
}