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