1
0

_theme.scss 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. //
  2. // Load core variables and mixins
  3. // --------------------------------------------------
  4. @import "variables";
  5. @import "mixins";
  6. //
  7. // Buttons
  8. // --------------------------------------------------
  9. // Common styles
  10. .btn-default,
  11. .btn-primary,
  12. .btn-success,
  13. .btn-info,
  14. .btn-warning,
  15. .btn-danger {
  16. text-shadow: 0 -1px 0 rgba(0,0,0,.2);
  17. $shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);
  18. @include box-shadow($shadow);
  19. // Reset the shadow
  20. &:active,
  21. &.active {
  22. @include box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
  23. }
  24. }
  25. // Mixin for generating new styles
  26. @mixin btn-styles($btn-color: #555) {
  27. @include gradient-vertical($start-color: $btn-color, $end-color: darken($btn-color, 12%));
  28. @include reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners
  29. background-repeat: repeat-x;
  30. border-color: darken($btn-color, 14%);
  31. &:hover,
  32. &:focus {
  33. background-color: darken($btn-color, 12%);
  34. background-position: 0 -15px;
  35. }
  36. &:active,
  37. &.active {
  38. background-color: darken($btn-color, 12%);
  39. border-color: darken($btn-color, 14%);
  40. }
  41. }
  42. // Common styles
  43. .btn {
  44. // Remove the gradient for the pressed/active state
  45. &:active,
  46. &.active {
  47. background-image: none;
  48. }
  49. }
  50. // Apply the mixin to the buttons
  51. .btn-default { @include btn-styles($btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }
  52. .btn-primary { @include btn-styles($btn-primary-bg); }
  53. .btn-success { @include btn-styles($btn-success-bg); }
  54. .btn-info { @include btn-styles($btn-info-bg); }
  55. .btn-warning { @include btn-styles($btn-warning-bg); }
  56. .btn-danger { @include btn-styles($btn-danger-bg); }
  57. //
  58. // Images
  59. // --------------------------------------------------
  60. .thumbnail,
  61. .img-thumbnail {
  62. @include box-shadow(0 1px 2px rgba(0,0,0,.075));
  63. }
  64. //
  65. // Dropdowns
  66. // --------------------------------------------------
  67. .dropdown-menu > li > a:hover,
  68. .dropdown-menu > li > a:focus {
  69. @include gradient-vertical($start-color: $dropdown-link-hover-bg, $end-color: darken($dropdown-link-hover-bg, 5%));
  70. background-color: darken($dropdown-link-hover-bg, 5%);
  71. }
  72. .dropdown-menu > .active > a,
  73. .dropdown-menu > .active > a:hover,
  74. .dropdown-menu > .active > a:focus {
  75. @include gradient-vertical($start-color: $dropdown-link-active-bg, $end-color: darken($dropdown-link-active-bg, 5%));
  76. background-color: darken($dropdown-link-active-bg, 5%);
  77. }
  78. //
  79. // Navbar
  80. // --------------------------------------------------
  81. // Default navbar
  82. .navbar-default {
  83. @include gradient-vertical($start-color: lighten($navbar-default-bg, 10%), $end-color: $navbar-default-bg);
  84. @include reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered
  85. border-radius: $navbar-border-radius;
  86. $shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);
  87. @include box-shadow($shadow);
  88. .navbar-nav > .active > a {
  89. @include gradient-vertical($start-color: darken($navbar-default-bg, 5%), $end-color: darken($navbar-default-bg, 2%));
  90. @include box-shadow(inset 0 3px 9px rgba(0,0,0,.075));
  91. }
  92. }
  93. .navbar-brand,
  94. .navbar-nav > li > a {
  95. text-shadow: 0 1px 0 rgba(255,255,255,.25);
  96. }
  97. // Inverted navbar
  98. .navbar-inverse {
  99. @include gradient-vertical($start-color: lighten($navbar-inverse-bg, 10%), $end-color: $navbar-inverse-bg);
  100. @include reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered
  101. .navbar-nav > .active > a {
  102. @include gradient-vertical($start-color: $navbar-inverse-bg, $end-color: lighten($navbar-inverse-bg, 2.5%));
  103. @include box-shadow(inset 0 3px 9px rgba(0,0,0,.25));
  104. }
  105. .navbar-brand,
  106. .navbar-nav > li > a {
  107. text-shadow: 0 -1px 0 rgba(0,0,0,.25);
  108. }
  109. }
  110. // Undo rounded corners in static and fixed navbars
  111. .navbar-static-top,
  112. .navbar-fixed-top,
  113. .navbar-fixed-bottom {
  114. border-radius: 0;
  115. }
  116. //
  117. // Alerts
  118. // --------------------------------------------------
  119. // Common styles
  120. .alert {
  121. text-shadow: 0 1px 0 rgba(255,255,255,.2);
  122. $shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);
  123. @include box-shadow($shadow);
  124. }
  125. // Mixin for generating new styles
  126. @mixin alert-styles($color) {
  127. @include gradient-vertical($start-color: $color, $end-color: darken($color, 7.5%));
  128. border-color: darken($color, 15%);
  129. }
  130. // Apply the mixin to the alerts
  131. .alert-success { @include alert-styles($alert-success-bg); }
  132. .alert-info { @include alert-styles($alert-info-bg); }
  133. .alert-warning { @include alert-styles($alert-warning-bg); }
  134. .alert-danger { @include alert-styles($alert-danger-bg); }
  135. //
  136. // Progress bars
  137. // --------------------------------------------------
  138. // Give the progress background some depth
  139. .progress {
  140. @include gradient-vertical($start-color: darken($progress-bg, 4%), $end-color: $progress-bg)
  141. }
  142. // Mixin for generating new styles
  143. @mixin progress-bar-styles($color) {
  144. @include gradient-vertical($start-color: $color, $end-color: darken($color, 10%));
  145. }
  146. // Apply the mixin to the progress bars
  147. .progress-bar { @include progress-bar-styles($progress-bar-bg); }
  148. .progress-bar-success { @include progress-bar-styles($progress-bar-success-bg); }
  149. .progress-bar-info { @include progress-bar-styles($progress-bar-info-bg); }
  150. .progress-bar-warning { @include progress-bar-styles($progress-bar-warning-bg); }
  151. .progress-bar-danger { @include progress-bar-styles($progress-bar-danger-bg); }
  152. //
  153. // List groups
  154. // --------------------------------------------------
  155. .list-group {
  156. border-radius: $border-radius-base;
  157. @include box-shadow(0 1px 2px rgba(0,0,0,.075));
  158. }
  159. .list-group-item.active,
  160. .list-group-item.active:hover,
  161. .list-group-item.active:focus {
  162. text-shadow: 0 -1px 0 darken($list-group-active-bg, 10%);
  163. @include gradient-vertical($start-color: $list-group-active-bg, $end-color: darken($list-group-active-bg, 7.5%));
  164. border-color: darken($list-group-active-border, 7.5%);
  165. }
  166. //
  167. // Panels
  168. // --------------------------------------------------
  169. // Common styles
  170. .panel {
  171. @include box-shadow(0 1px 2px rgba(0,0,0,.05));
  172. }
  173. // Mixin for generating new styles
  174. @mixin panel-heading-styles($color) {
  175. @include gradient-vertical($start-color: $color, $end-color: darken($color, 5%));
  176. }
  177. // Apply the mixin to the panel headings only
  178. .panel-default > .panel-heading { @include panel-heading-styles($panel-default-heading-bg); }
  179. .panel-primary > .panel-heading { @include panel-heading-styles($panel-primary-heading-bg); }
  180. .panel-success > .panel-heading { @include panel-heading-styles($panel-success-heading-bg); }
  181. .panel-info > .panel-heading { @include panel-heading-styles($panel-info-heading-bg); }
  182. .panel-warning > .panel-heading { @include panel-heading-styles($panel-warning-heading-bg); }
  183. .panel-danger > .panel-heading { @include panel-heading-styles($panel-danger-heading-bg); }
  184. //
  185. // Wells
  186. // --------------------------------------------------
  187. .well {
  188. @include gradient-vertical($start-color: darken($well-bg, 5%), $end-color: $well-bg);
  189. border-color: darken($well-bg, 10%);
  190. $shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);
  191. @include box-shadow($shadow);
  192. }