You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
2.6 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. // Clear FIX
  2. @mixin clear-fix() {
  3. display:block;
  4. clear:both;
  5. content:"";
  6. }
  7. @mixin clear-fix-after() {
  8. &:after {
  9. display:block;
  10. clear:both;
  11. content:"";
  12. }
  13. }
  14. @mixin button-default() {
  15. display: inline-block;
  16. margin:0;
  17. font-weight: normal;
  18. text-align: center;
  19. white-space: nowrap;
  20. user-select: none;
  21. text-decoration: none;
  22. outline:0;
  23. vertical-align:middle;
  24. &:disabled,
  25. &.disabled {
  26. opacity:0.65;
  27. }
  28. &:not([disabled]):not(.disabled) {
  29. cursor: pointer;
  30. }
  31. }
  32. // background Image
  33. @mixin background-image( $image_url, $bg_color:transparent, $background-repeat:no-repeat, $background-position-x:center, $background-position-y:center )
  34. {
  35. background-color:$bg_color;
  36. background-image:url($image_url);
  37. background-repeat: $background-repeat;
  38. background-position-x:$background-position-x;
  39. background-position-y:$background-position-y;
  40. }
  41. // Global Transition
  42. @mixin transition($second:.3s, $target:all, $animation: ease)
  43. {
  44. -webkit-transition: $target $second $animation;
  45. -moz-transition: $target $second $animation;
  46. -ms-transition: $target $second $animation;
  47. -o-transition: $target $second $animation;
  48. transition: $target $second $animation;
  49. }
  50. // Display flex & Prefix
  51. @mixin display-flex()
  52. {
  53. -webkit-display:flex;
  54. display:-ms-flex;
  55. display:flex;
  56. }
  57. @mixin background-gradient($start, $end )
  58. {
  59. background-color: $start;
  60. background-image: -webkit-linear-gradient(top, $start, $end);
  61. background-image: linear-gradient(to bottom,$start, $end);
  62. }
  63. @mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
  64. padding: $padding-y $padding-x;
  65. font-size: $font-size;
  66. line-height: $line-height;
  67. border-radius: $border-radius;
  68. }
  69. @mixin button-variant($background, $border, $hover-background: darken($background, 7.5%), $hover-border: darken($border, 10%), $active-background: darken($background, 10%), $active-border: darken($border, 12.5%)) {
  70. color: color-yiq($background);
  71. background-color:$background;
  72. border-color: $border;
  73. &:hover {
  74. color: color-yiq($hover-background);
  75. background-color :$hover-background;
  76. border-color: $hover-border;
  77. }
  78. &:focus,
  79. &.focus {
  80. }
  81. // Disabled comes first so active can properly restyle
  82. &.disabled,
  83. &:disabled {
  84. color: color-yiq($background);
  85. background-color: $background;
  86. border-color: $border;
  87. }
  88. &:not(:disabled):not(.disabled):active,
  89. &:not(:disabled):not(.disabled).active,
  90. .show > &.dropdown-toggle {
  91. color: color-yiq($active-background);
  92. background-color: $active-background;
  93. border-color: $active-border;
  94. &:focus {
  95. }
  96. }
  97. }