_mixins.scss 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. text-rendering: auto;
  15. -moz-osx-font-smoothing: grayscale;
  16. }
  17. @mixin border-radius($radius) {
  18. -webkit-border-radius: $radius;
  19. -moz-border-radius: $radius;
  20. border-radius: $radius;
  21. }
  22. @mixin icon-stack($width: 2em, $height: 2em, $top-font-size: 1em, $base-font-size: 2em) {
  23. .icon-stack {
  24. position: relative;
  25. display: inline-block;
  26. width: $width;
  27. height: $height;
  28. line-height: $width;
  29. vertical-align: -35%;
  30. [class^="icon-"],
  31. [class*=" icon-"] {
  32. position: absolute;
  33. display: block;
  34. width: 100%;
  35. height: 100%;
  36. font-size: $top-font-size;
  37. line-height: inherit;
  38. *line-height: $height;
  39. text-align: center;
  40. }
  41. .icon-stack-base {
  42. font-size: $base-font-size;
  43. *line-height: #{$height / $base-font-size}em;
  44. }
  45. }
  46. }