3 // Load core variables and mixins
4 // --------------------------------------------------
6 @import "variables.less";
12 // --------------------------------------------------
21 text-shadow: 0 -1px 0 rgba(0,0,0,.2);
22 @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);
28 .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
36 // Mixin for generating new styles
37 .btn-styles(@btn-color: #555) {
38 #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));
39 .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620
40 background-repeat: repeat-x;
41 border-color: darken(@btn-color, 14%);
45 background-color: darken(@btn-color, 12%);
46 background-position: 0 -15px;
51 background-color: darken(@btn-color, 12%);
52 border-color: darken(@btn-color, 14%);
58 background-color: darken(@btn-color, 12%);
59 background-image: none;
65 // Remove the gradient for the pressed/active state
68 background-image: none;
72 // Apply the mixin to the buttons
73 .btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }
74 .btn-primary { .btn-styles(@btn-primary-bg); }
75 .btn-success { .btn-styles(@btn-success-bg); }
76 .btn-info { .btn-styles(@btn-info-bg); }
77 .btn-warning { .btn-styles(@btn-warning-bg); }
78 .btn-danger { .btn-styles(@btn-danger-bg); }
83 // --------------------------------------------------
87 .box-shadow(0 1px 2px rgba(0,0,0,.075));
93 // --------------------------------------------------
95 .dropdown-menu > li > a:hover,
96 .dropdown-menu > li > a:focus {
97 #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));
98 background-color: darken(@dropdown-link-hover-bg, 5%);
100 .dropdown-menu > .active > a,
101 .dropdown-menu > .active > a:hover,
102 .dropdown-menu > .active > a:focus {
103 #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));
104 background-color: darken(@dropdown-link-active-bg, 5%);
110 // --------------------------------------------------
114 #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);
115 .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered
116 border-radius: @navbar-border-radius;
117 @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);
118 .box-shadow(@shadow);
120 .navbar-nav > .open > a,
121 .navbar-nav > .active > a {
122 #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));
123 .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));
127 .navbar-nav > li > a {
128 text-shadow: 0 1px 0 rgba(255,255,255,.25);
133 #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);
134 .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257
136 .navbar-nav > .open > a,
137 .navbar-nav > .active > a {
138 #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));
139 .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));
143 .navbar-nav > li > a {
144 text-shadow: 0 -1px 0 rgba(0,0,0,.25);
148 // Undo rounded corners in static and fixed navbars
151 .navbar-fixed-bottom {
155 // Fix active state of dropdown items in collapsed mode
156 @media (max-width: @grid-float-breakpoint-max) {
157 .navbar .navbar-nav .open .dropdown-menu > .active > a {
162 #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));
170 // --------------------------------------------------
174 text-shadow: 0 1px 0 rgba(255,255,255,.2);
175 @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);
176 .box-shadow(@shadow);
179 // Mixin for generating new styles
180 .alert-styles(@color) {
181 #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));
182 border-color: darken(@color, 15%);
185 // Apply the mixin to the alerts
186 .alert-success { .alert-styles(@alert-success-bg); }
187 .alert-info { .alert-styles(@alert-info-bg); }
188 .alert-warning { .alert-styles(@alert-warning-bg); }
189 .alert-danger { .alert-styles(@alert-danger-bg); }
194 // --------------------------------------------------
196 // Give the progress background some depth
198 #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)
201 // Mixin for generating new styles
202 .progress-bar-styles(@color) {
203 #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));
206 // Apply the mixin to the progress bars
207 .progress-bar { .progress-bar-styles(@progress-bar-bg); }
208 .progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }
209 .progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }
210 .progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }
211 .progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }
213 // Reset the striped class because our mixins don't do multiple gradients and
214 // the above custom styles override the new `.progress-bar-striped` in v3.2.0.
215 .progress-bar-striped {
216 #gradient > .striped();
222 // --------------------------------------------------
225 border-radius: @border-radius-base;
226 .box-shadow(0 1px 2px rgba(0,0,0,.075));
228 .list-group-item.active,
229 .list-group-item.active:hover,
230 .list-group-item.active:focus {
231 text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);
232 #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));
233 border-color: darken(@list-group-active-border, 7.5%);
243 // --------------------------------------------------
247 .box-shadow(0 1px 2px rgba(0,0,0,.05));
250 // Mixin for generating new styles
251 .panel-heading-styles(@color) {
252 #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));
255 // Apply the mixin to the panel headings only
256 .panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }
257 .panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }
258 .panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }
259 .panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }
260 .panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }
261 .panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }
266 // --------------------------------------------------
269 #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);
270 border-color: darken(@well-bg, 10%);
271 @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);
272 .box-shadow(@shadow);