_mixins.scss 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Mixins
  2. // --------------------------
  3. @mixin icon($icon) {
  4. @include icon-FontAwesome();
  5. content: $icon;
  6. }
  7. @mixin icon-FontAwesome() {
  8. *margin-right: .3em; // fixes ie7 issues
  9. font-family: FontAwesome;
  10. -webkit-font-smoothing: antialiased;
  11. font-style: normal;
  12. font-weight: normal;
  13. text-decoration: inherit;
  14. -moz-osx-font-smoothing: grayscale;
  15. }
  16. @mixin border-radius($radius) {
  17. -webkit-border-radius: $radius;
  18. -moz-border-radius: $radius;
  19. border-radius: $radius;
  20. }
  21. @mixin icon-stack($width: 2em, $height: 2em, $top-font-size: 1em, $base-font-size: 2em) {
  22. .icon-stack {
  23. position: relative;
  24. display: inline-block;
  25. width: $width;
  26. height: $height;
  27. line-height: $width;
  28. vertical-align: -35%;
  29. [class^="icon-"],
  30. [class*=" icon-"] {
  31. position: absolute;
  32. display: block;
  33. width: 100%;
  34. height: 100%;
  35. font-size: $top-font-size;
  36. line-height: inherit;
  37. *line-height: $height;
  38. text-align: center;
  39. }
  40. .icon-stack-base {
  41. font-size: $base-font-size;
  42. *line-height: #{$height / $base-font-size}em;
  43. }
  44. }
  45. }