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.

83 lines
1.9 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. // Global Transition
  15. @mixin transition($second:.3s, $target:all, $animation:$default-animation)
  16. {
  17. -webkit-transition: $target $second $animation;
  18. -moz-transition: $target $second $animation;
  19. -ms-transition: $target $second $animation;
  20. -o-transition: $target $second $animation;
  21. transition: $target $second $animation;
  22. }
  23. // Display flex & Prefix
  24. @mixin display-flex()
  25. {
  26. -webkit-display:flex;
  27. display:-ms-flex;
  28. display:flex;
  29. }
  30. @mixin background-gradient($start, $end )
  31. {
  32. background-color: $start;
  33. background-image: -webkit-linear-gradient(top, $start, $end);
  34. background-image: linear-gradient(to bottom,$start, $end);
  35. }
  36. @mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
  37. padding: $padding-y $padding-x;
  38. font-size: $font-size;
  39. line-height: $line-height;
  40. border-radius: $border-radius;
  41. }
  42. @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%)) {
  43. color: color-yiq($background);
  44. background-color:$background;
  45. border-color: $border;
  46. &:hover {
  47. color: color-yiq($hover-background);
  48. background-color :$hover-background;
  49. border-color: $hover-border;
  50. }
  51. &:focus,
  52. &.focus {
  53. }
  54. // Disabled comes first so active can properly restyle
  55. &.disabled,
  56. &:disabled {
  57. color: color-yiq($background);
  58. background-color: $background;
  59. border-color: $border;
  60. }
  61. &:not(:disabled):not(.disabled):active,
  62. &:not(:disabled):not(.disabled).active,
  63. .show > &.dropdown-toggle {
  64. color: color-yiq($active-background);
  65. background-color: $active-background;
  66. border-color: $active-border;
  67. &:focus {
  68. }
  69. }
  70. }