_mixins.scss 1.1 KB

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