_buttons.scss 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. body {
  2. // BUTTON
  3. // -----------------------------------------------------------------------------
  4. /* Button Basic */
  5. .btn:focus,
  6. .btn:active:focus,
  7. .btn.active:focus {
  8. outline: none;
  9. }
  10. .btn {
  11. white-space: normal;
  12. }
  13. // SOCIAL BUTTONS
  14. // -----------------------------------------------------------------------------
  15. /* Buttons - Social */
  16. .btn-facebook,
  17. .btn-twitter,
  18. .btn-gplus {
  19. &,
  20. &:active,
  21. &:hover,
  22. &:focus {
  23. color: #FFF;
  24. font-weight: 300;
  25. padding-left: 30px;
  26. padding-right: 30px;
  27. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
  28. }
  29. }
  30. .btn-facebook {
  31. &,
  32. &:focus {
  33. background: #3B5998;
  34. border: 1px solid #37538D;
  35. }
  36. &:hover {
  37. background: lighten( #3B5998, 4% );
  38. border-color: lighten( #37538D, 4% );
  39. }
  40. &:active {
  41. background: darken( #3B5998, 3% );
  42. border-color: darken( #37538D, 3% );
  43. }
  44. }
  45. .btn-twitter {
  46. &,
  47. &:focus {
  48. background: #55ACEE;
  49. border: 1px solid #47A5ED;
  50. }
  51. &:hover {
  52. background: lighten( #55ACEE, 3% );
  53. border-color: lighten( #47A5ED, 3% );
  54. }
  55. &:active {
  56. background: darken( #55ACEE, 3% );
  57. border-color: darken( #47A5ED, 3% );
  58. }
  59. }
  60. .btn-gplus {
  61. &,
  62. &:focus {
  63. background: #D95232;
  64. border: 1px solid #D44927;
  65. }
  66. &:hover {
  67. background: lighten( #D95232, 4% );
  68. border-color: lighten( #D44927, 4% );
  69. }
  70. &:active {
  71. background: darken( #D95232, 4% );
  72. border-color: darken( #D44927, 4% );
  73. }
  74. }
  75. // STATES
  76. // -----------------------------------------------------------------------------
  77. /* Buttons - States */
  78. @each $state in $states {
  79. .btn-#{nth($state,1)} {
  80. border-color: #{nth($state,2)};
  81. background-color: #{nth($state,2)};
  82. border-color: #{nth($state,2)} #{nth($state,2)} darken(nth($state,2), 10%);
  83. color: #{nth($state,3)};
  84. text-shadow: 0 -1px 0 rgba(0,0,0,.25);
  85. &:hover {
  86. border-color: lighten(nth($state,2), 5%);
  87. background-color: lighten(nth($state,2), 5%);
  88. color: #{nth($state,3)};
  89. }
  90. &:active,
  91. &:focus {
  92. border-color: darken(nth($state,2), 5%);
  93. background-color: darken(nth($state,2), 5%);
  94. color: #{nth($state,3)};
  95. }
  96. &.dropdown-toggle {
  97. border-left-color: darken(nth($state,2), 5%);
  98. }
  99. &[disabled] {
  100. border-color: lighten(nth($state,2), 20%);
  101. background-color: lighten(nth($state,2), 20%);
  102. }
  103. }
  104. }
  105. }
  106. // DARK
  107. // -----------------------------------------------------------------------------
  108. html.dark {
  109. .btn-default {
  110. background-color: $dark-color-3;
  111. border-color: $dark-color-3;
  112. color: #EEE;
  113. &:hover {
  114. background-color: lighten($dark-color-3, 1%);
  115. border-color: lighten($dark-color-3, 1%);
  116. }
  117. &:focus,
  118. &:active {
  119. background-color: darken($dark-color-3, 2%);
  120. border-color: darken($dark-color-3, 2%);
  121. }
  122. }
  123. .btn-default:hover,
  124. .btn-default:focus,
  125. .btn-default:active,
  126. .btn-default.active,
  127. .open > .dropdown-toggle.btn-default {
  128. color: #EEE;
  129. background-color: darken($dark-color-3, 2%);
  130. border-color: darken($dark-color-3, 2%);
  131. }
  132. }