[313] | 1 | //some extra form variables |
---|
| 2 | //more important ones are inside "variables.less" |
---|
| 3 | @input-readonly-color:#939192; |
---|
| 4 | @input-readonly-bg:#F5F5F5; |
---|
| 5 | @input-readonly-focus-border:#AAA; |
---|
| 6 | @input-readonly-focus-bg:#F9F9F9; |
---|
| 7 | @input-readonly-focus-shadow:~"0px 0px 0px 2px rgba(150, 150, 150, 0.3)"; |
---|
| 8 | |
---|
| 9 | @input-disabled-color:#848484; |
---|
| 10 | @input-disabled-bg:#EEE; |
---|
| 11 | |
---|
| 12 | @input-hover-border:lighten(greyscale(@input-focus-border),10%); |
---|
| 13 | |
---|
| 14 | @option-hover-bg:#E5E9EE; |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | //form error states |
---|
| 18 | @success-state-border:#92BF65; |
---|
| 19 | @success-state-color:#8BAD4C; |
---|
| 20 | @success-state-focus-border:#81A85A; |
---|
| 21 | @success-state-focus-color:#786; |
---|
| 22 | @success-state-focus-shadow:~"0px 0px 0px 2px rgba(130, 188, 58, 0.3)"; |
---|
| 23 | @success-state-text-color:#7BA065;//the color of the help text, etc inside that control label |
---|
| 24 | |
---|
| 25 | @error-state-border:#F09784; |
---|
| 26 | @error-state-color:#D68273; |
---|
| 27 | @error-state-focus-border:#DB8978; |
---|
| 28 | @error-state-focus-color:#866; |
---|
| 29 | @error-state-focus-shadow:~"0px 0px 0px 2px rgba(219, 137, 120, 0.3)"; |
---|
| 30 | @error-state-text-color:#D16E6C; |
---|
| 31 | |
---|
| 32 | @warning-state-border:#E0C43A; |
---|
| 33 | @warning-state-color:#D3BD50; |
---|
| 34 | @warning-state-focus-border:#D8BC41; |
---|
| 35 | @warning-state-focus-color:#875; |
---|
| 36 | @warning-state-focus-shadow:~"0px 0px 0px 2px rgba(216, 188, 65, 0.3)"; |
---|
| 37 | @warning-state-text-color:#D19D59; |
---|
| 38 | |
---|
| 39 | @info-state-border:#64A6BC; |
---|
| 40 | @info-state-color:#4B89AA; |
---|
| 41 | @info-state-focus-border:#5A81A8; |
---|
| 42 | @info-state-focus-color:#678; |
---|
| 43 | @info-state-focus-shadow:~"0px 0px 0px 2px rgba(58, 120, 188, 0.3)"; |
---|
| 44 | @info-state-text-color:#657BA0; |
---|
| 45 | |
---|
| 46 | @disabled-state-color:#848484; |
---|
| 47 | @disabled-state-bg:#EEE; |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | |
---|
| 52 | |
---|
| 53 | /** form elements */ |
---|
| 54 | .form-line { |
---|
| 55 | margin-bottom:24px; padding-bottom:12px; |
---|
| 56 | border-bottom:1px solid #EEE; |
---|
| 57 | } |
---|
| 58 | .form-actions { |
---|
| 59 | display:block; |
---|
| 60 | |
---|
| 61 | background-color: #F5F5F5; |
---|
| 62 | border-top: 1px solid #E5E5E5; |
---|
| 63 | margin-bottom: 20px; |
---|
| 64 | margin-top: 20px; |
---|
| 65 | padding: 19px 20px 20px; |
---|
| 66 | } |
---|
| 67 | |
---|
| 68 | .help-button { |
---|
| 69 | display:inline-block; |
---|
| 70 | height:22px; width:22px; line-height:22px; text-align:center; |
---|
| 71 | padding:0; |
---|
| 72 | background-color:@help-button-bg; |
---|
| 73 | color:#FFF; |
---|
| 74 | font-size:12px; font-weight:bold; |
---|
| 75 | cursor:default; |
---|
| 76 | |
---|
| 77 | margin-left:4px; |
---|
| 78 | .border-radius(100%); |
---|
| 79 | border-color:#FFF; |
---|
| 80 | border:2px solid #FFF; |
---|
| 81 | |
---|
| 82 | .box-shadow(~"0px 1px 0px 1px rgba(0, 0, 0, 0.2)"); |
---|
| 83 | |
---|
| 84 | &:hover { |
---|
| 85 | background-color:@help-button-bg; |
---|
| 86 | text-shadow:none; |
---|
| 87 | } |
---|
| 88 | } |
---|
| 89 | |
---|
| 90 | |
---|
| 91 | |
---|
| 92 | label { |
---|
| 93 | font-weight:normal; |
---|
| 94 | font-size:14px; |
---|
| 95 | } |
---|
| 96 | .form-group > label[class*="col-"] { |
---|
| 97 | padding-top:4px; |
---|
| 98 | margin-bottom:4px; |
---|
| 99 | } |
---|
| 100 | |
---|
| 101 | |
---|
| 102 | label , .lbl { |
---|
| 103 | vertical-align:middle; |
---|
| 104 | } |
---|
| 105 | td > label , th > label , label.inline{ |
---|
| 106 | margin-bottom:0; |
---|
| 107 | line-height:inherit; |
---|
| 108 | } |
---|
| 109 | |
---|
| 110 | |
---|
| 111 | textarea, |
---|
| 112 | input[type="text"], |
---|
| 113 | input[type="password"], |
---|
| 114 | input[type="datetime"], |
---|
| 115 | input[type="datetime-local"], |
---|
| 116 | input[type="date"], |
---|
| 117 | input[type="month"], |
---|
| 118 | input[type="time"], |
---|
| 119 | input[type="week"], |
---|
| 120 | input[type="number"], |
---|
| 121 | input[type="email"], |
---|
| 122 | input[type="url"], |
---|
| 123 | input[type="search"], |
---|
| 124 | input[type="tel"], |
---|
| 125 | input[type="color"] { |
---|
| 126 | .border-radius(0) !important; |
---|
| 127 | color:@input-color; |
---|
| 128 | background-color:@input-bg; |
---|
| 129 | border:1px solid @input-border; |
---|
| 130 | |
---|
| 131 | padding:5px 4px; |
---|
| 132 | line-height:1.2; |
---|
| 133 | font-size:@font-size-base; |
---|
| 134 | font-family:inherit; |
---|
| 135 | |
---|
| 136 | .box-shadow(none) !important; |
---|
| 137 | |
---|
| 138 | .transition-duration(0.1s); |
---|
| 139 | |
---|
| 140 | &:hover { |
---|
| 141 | border-color:@input-hover-border; |
---|
| 142 | } |
---|
| 143 | &:focus { |
---|
| 144 | //.box-shadow(@input-focus-shadow); |
---|
| 145 | .box-shadow(none); |
---|
| 146 | |
---|
| 147 | color:@input-focus-color; |
---|
| 148 | border-color:@input-focus-border; |
---|
| 149 | background-color:@input-focus-bg; |
---|
| 150 | outline:none; |
---|
| 151 | } |
---|
| 152 | } |
---|
| 153 | |
---|
| 154 | .form-control , select { |
---|
| 155 | border-radius : 0; |
---|
| 156 | .box-shadow(none) !important; |
---|
| 157 | |
---|
| 158 | color:@input-color; |
---|
| 159 | background-color:@input-bg; |
---|
| 160 | border:1px solid @input-border; |
---|
| 161 | &:focus { |
---|
| 162 | |
---|
| 163 | color:@input-focus-color; |
---|
| 164 | border-color:@input-focus-border; |
---|
| 165 | background-color:@input-focus-bg; |
---|
| 166 | outline:none; |
---|
| 167 | } |
---|
| 168 | } |
---|
| 169 | textarea.form-control { |
---|
| 170 | padding:5px 9px |
---|
| 171 | } |
---|
| 172 | select { |
---|
| 173 | padding:3px 4px; |
---|
| 174 | height: 30px; |
---|
| 175 | } |
---|
| 176 | select.form-control { |
---|
| 177 | padding:4px 6px; |
---|
| 178 | height: 32px; |
---|
| 179 | } |
---|
| 180 | select[multiple] , select.form-control[multiple] { |
---|
| 181 | height: auto; |
---|
| 182 | } |
---|
| 183 | |
---|
| 184 | |
---|
| 185 | input.block { |
---|
| 186 | display:block; |
---|
| 187 | margin-bottom:9px; |
---|
| 188 | } |
---|
| 189 | |
---|
| 190 | |
---|
| 191 | textarea.autosize-transition { |
---|
| 192 | .transition-duration("height 0.2s"); |
---|
| 193 | } |
---|
| 194 | .limiterBox { |
---|
| 195 | border: 1px solid #222; |
---|
| 196 | border-top: none; |
---|
| 197 | background-color: #333; |
---|
| 198 | padding: 3px 6px; |
---|
| 199 | font-size: 12px; |
---|
| 200 | color:#FFF; |
---|
| 201 | margin-top:6px; |
---|
| 202 | &:after { |
---|
| 203 | display:none; |
---|
| 204 | } |
---|
| 205 | &:before { |
---|
| 206 | display:block; |
---|
| 207 | content:""; |
---|
| 208 | |
---|
| 209 | position: absolute; |
---|
| 210 | width: 0; height: 0; |
---|
| 211 | top: -8px; |
---|
| 212 | left: 50%; |
---|
| 213 | margin-left: -5px; |
---|
| 214 | |
---|
| 215 | border-color: transparent; |
---|
| 216 | border-style: solid; |
---|
| 217 | border-bottom-color: #333; |
---|
| 218 | border-width: 0 8px 8px; |
---|
| 219 | } |
---|
| 220 | } |
---|
| 221 | |
---|
| 222 | |
---|
| 223 | |
---|
| 224 | select { |
---|
| 225 | & , &.form-control { |
---|
| 226 | option { |
---|
| 227 | padding:3px 4px; |
---|
| 228 | &:active , &:hover, &:focus { |
---|
| 229 | background-color:@option-hover-bg; |
---|
| 230 | color:#111; |
---|
| 231 | } |
---|
| 232 | &[value=""] { |
---|
| 233 | padding:0; |
---|
| 234 | } |
---|
| 235 | } |
---|
| 236 | } |
---|
| 237 | } |
---|
| 238 | |
---|
| 239 | |
---|
| 240 | |
---|
| 241 | input[disabled] { |
---|
| 242 | color:@input-disabled-color !important; |
---|
| 243 | background-color:@input-disabled-bg !important; |
---|
| 244 | &:hover { |
---|
| 245 | border-color:@input-border !important; |
---|
| 246 | } |
---|
| 247 | } |
---|
| 248 | input[readonly] { |
---|
| 249 | color:@input-readonly-color; |
---|
| 250 | background:@input-readonly-bg !important; |
---|
| 251 | cursor:default; |
---|
| 252 | |
---|
| 253 | &:hover { |
---|
| 254 | border-color:lighten(@input-readonly-focus-border , 10%); |
---|
| 255 | } |
---|
| 256 | &:focus { |
---|
| 257 | //.box-shadow(@input-readonly-focus-shadow); |
---|
| 258 | .box-shadow(none); |
---|
| 259 | border-color:@input-readonly-focus-border; |
---|
| 260 | background-color:@input-readonly-focus-bg; |
---|
| 261 | } |
---|
| 262 | } |
---|
| 263 | |
---|
| 264 | .help-inline { |
---|
| 265 | font-size:13px !important; |
---|
| 266 | } |
---|
| 267 | |
---|
| 268 | |
---|
| 269 | |
---|
| 270 | .input-icon { |
---|
| 271 | position:relative; |
---|
| 272 | span& { |
---|
| 273 | display:inline-block; |
---|
| 274 | } |
---|
| 275 | |
---|
| 276 | > input { |
---|
| 277 | padding-left:24px; |
---|
| 278 | padding-right:6px; |
---|
| 279 | } |
---|
| 280 | &.input-icon-right > input { |
---|
| 281 | padding-left:6px; |
---|
| 282 | padding-right:24px; |
---|
| 283 | } |
---|
| 284 | |
---|
| 285 | > [class*="icon-"] { |
---|
| 286 | padding:0 3px; |
---|
| 287 | z-index:2; |
---|
| 288 | position:absolute; top:1px; bottom:1px; |
---|
| 289 | left:3px; |
---|
| 290 | line-height:28px; |
---|
| 291 | |
---|
| 292 | display:inline-block; |
---|
| 293 | color:#909090; |
---|
| 294 | font-size:16px; |
---|
| 295 | } |
---|
| 296 | |
---|
| 297 | &.input-icon-right > [class*="icon-"] { |
---|
| 298 | left:auto; |
---|
| 299 | right:3px; |
---|
| 300 | } |
---|
| 301 | |
---|
| 302 | > input:focus + [class*="icon-"] { |
---|
| 303 | color:#579; |
---|
| 304 | } |
---|
| 305 | |
---|
| 306 | ~ .help-inline { |
---|
| 307 | padding-left:8px; |
---|
| 308 | } |
---|
| 309 | |
---|
| 310 | |
---|
| 311 | |
---|
| 312 | //.form-group.has-warning & > [class*="icon-"] { color:@warning-state-color; } |
---|
| 313 | //.form-group.has-success & > [class*="icon-"] { color:@success-state-color; } |
---|
| 314 | //.form-group.has-error & > [class*="icon-"] { color:@error-state-color; } |
---|
| 315 | //.form-group.has-info & > [class*="icon-"] { color:@info-state-color; } |
---|
| 316 | } |
---|
| 317 | |
---|
| 318 | |
---|
| 319 | |
---|
| 320 | |
---|
| 321 | /* checkboxes , radio and switches */ |
---|
| 322 | .form-search , .form-inline { |
---|
| 323 | .radio [type=radio] + label, .checkbox [type=checkbox] + label { |
---|
| 324 | float: left; |
---|
| 325 | margin-left: -20px; |
---|
| 326 | |
---|
| 327 | .form-search & , .form-inline & { |
---|
| 328 | margin-left:0; |
---|
| 329 | margin-right:3px; |
---|
| 330 | } |
---|
| 331 | } |
---|
| 332 | } |
---|
| 333 | |
---|
| 334 | .input-append , .input-prepend { |
---|
| 335 | .form-search & .search-query:focus { |
---|
| 336 | .box-shadow(none); |
---|
| 337 | } |
---|
| 338 | input, select, .uneditable-input { |
---|
| 339 | .border-radius(0); |
---|
| 340 | } |
---|
| 341 | } |
---|
| 342 | |
---|
| 343 | |
---|
| 344 | |
---|
| 345 | .input-mini { |
---|
| 346 | width: 60px; |
---|
| 347 | max-width: 100%; |
---|
| 348 | } |
---|
| 349 | |
---|
| 350 | .input-small { |
---|
| 351 | width: 90px; |
---|
| 352 | max-width: 100%; |
---|
| 353 | } |
---|
| 354 | |
---|
| 355 | .input-medium { |
---|
| 356 | width: 150px; |
---|
| 357 | max-width: 100%; |
---|
| 358 | } |
---|
| 359 | |
---|
| 360 | .input-large { |
---|
| 361 | width: 210px; |
---|
| 362 | max-width: 100%; |
---|
| 363 | } |
---|
| 364 | |
---|
| 365 | .input-xlarge { |
---|
| 366 | width: 270px; |
---|
| 367 | max-width: 100%; |
---|
| 368 | } |
---|
| 369 | |
---|
| 370 | .input-xxlarge { |
---|
| 371 | width: 530px; |
---|
| 372 | max-width: 100%; |
---|
| 373 | } |
---|
| 374 | input.input-lg { |
---|
| 375 | font-size: @font-size-large; |
---|
| 376 | } |
---|
| 377 | input.input-sm { |
---|
| 378 | font-size: @font-size-small; |
---|
| 379 | } |
---|
| 380 | |
---|
| 381 | |
---|
| 382 | |
---|
| 383 | |
---|
| 384 | |
---|
| 385 | |
---|
| 386 | @import "form-checkbox.less"; |
---|
| 387 | |
---|
| 388 | |
---|
| 389 | |
---|
| 390 | |
---|
| 391 | /* addon */ |
---|
| 392 | .input-group { |
---|
| 393 | .input-group-addon { |
---|
| 394 | .border-radius(0) !important; |
---|
| 395 | |
---|
| 396 | .form-group.has-success & { |
---|
| 397 | border-color:@success-state-border; |
---|
| 398 | } |
---|
| 399 | .form-group.has-error & { |
---|
| 400 | border-color:@error-state-border; |
---|
| 401 | } |
---|
| 402 | .form-group.has-warning & { |
---|
| 403 | border-color:@warning-state-border; |
---|
| 404 | } |
---|
| 405 | .form-group.has-info & { |
---|
| 406 | border-color:@info-state-border; |
---|
| 407 | } |
---|
| 408 | } |
---|
| 409 | |
---|
| 410 | |
---|
| 411 | > .btn { |
---|
| 412 | line-height:20px; |
---|
| 413 | padding:0 6px; |
---|
| 414 | .border-radius(0) !important; |
---|
| 415 | |
---|
| 416 | &.btn-sm { |
---|
| 417 | line-height:22px; |
---|
| 418 | } |
---|
| 419 | |
---|
| 420 | + .btn{ |
---|
| 421 | margin-left:1px; |
---|
| 422 | } |
---|
| 423 | } |
---|
| 424 | |
---|
| 425 | > .btn-group > .btn { |
---|
| 426 | line-height:23px; |
---|
| 427 | |
---|
| 428 | &.btn-sm { |
---|
| 429 | line-height:26px; |
---|
| 430 | } |
---|
| 431 | } |
---|
| 432 | |
---|
| 433 | > .btn , > .btn-group > .btn { |
---|
| 434 | & , &.btn-sm { |
---|
| 435 | > .caret { |
---|
| 436 | margin-top:10px; |
---|
| 437 | } |
---|
| 438 | } |
---|
| 439 | } |
---|
| 440 | } |
---|
| 441 | |
---|
| 442 | |
---|
| 443 | |
---|
| 444 | |
---|
| 445 | //file input control |
---|
| 446 | @import "form-file.less"; |
---|
| 447 | |
---|
| 448 | |
---|
| 449 | |
---|
| 450 | |
---|
| 451 | |
---|
| 452 | |
---|
| 453 | |
---|
| 454 | |
---|
| 455 | |
---|
| 456 | /** input error states */ |
---|
| 457 | .form-group select, |
---|
| 458 | .form-group textarea, |
---|
| 459 | .form-group input[type="text"], |
---|
| 460 | .form-group input[type="password"], |
---|
| 461 | .form-group input[type="datetime"], |
---|
| 462 | .form-group input[type="datetime-local"], |
---|
| 463 | .form-group input[type="date"], |
---|
| 464 | .form-group input[type="month"], |
---|
| 465 | .form-group input[type="time"], |
---|
| 466 | .form-group input[type="week"], |
---|
| 467 | .form-group input[type="number"], |
---|
| 468 | .form-group input[type="email"], |
---|
| 469 | .form-group input[type="url"], |
---|
| 470 | .form-group input[type="search"], |
---|
| 471 | .form-group input[type="tel"], |
---|
| 472 | .form-group input[type="color"] { |
---|
| 473 | background:#FFF; |
---|
| 474 | } |
---|
| 475 | .form-group.has-success { |
---|
| 476 | input, select, textarea { |
---|
| 477 | border-color:@success-state-border; |
---|
| 478 | color:@success-state-color; |
---|
| 479 | .box-shadow(none); |
---|
| 480 | |
---|
| 481 | &:focus { |
---|
| 482 | .box-shadow(@success-state-focus-shadow); |
---|
| 483 | color:@success-state-focus-color; |
---|
| 484 | border-color:@success-state-focus-border; |
---|
| 485 | |
---|
| 486 | + [class*="icon-"] { |
---|
| 487 | color:@success-state-color; |
---|
| 488 | } |
---|
| 489 | } |
---|
| 490 | } |
---|
| 491 | [class*="icon-"] { |
---|
| 492 | color:@success-state-color; |
---|
| 493 | } |
---|
| 494 | .btn [class*="icon-"] { |
---|
| 495 | color:inherit; |
---|
| 496 | } |
---|
| 497 | |
---|
| 498 | .control-label , .help-block , .help-inline { |
---|
| 499 | color:@success-state-text-color; |
---|
| 500 | } |
---|
| 501 | } |
---|
| 502 | |
---|
| 503 | .form-group.has-info { |
---|
| 504 | input , select, textarea { |
---|
| 505 | border-color:@info-state-border; |
---|
| 506 | color:@info-state-color; |
---|
| 507 | .box-shadow(none); |
---|
| 508 | |
---|
| 509 | &:focus { |
---|
| 510 | .box-shadow(@info-state-focus-shadow); |
---|
| 511 | color:@info-state-focus-color; |
---|
| 512 | border-color:@info-state-focus-border; |
---|
| 513 | |
---|
| 514 | + [class*="icon-"] { |
---|
| 515 | color:@info-state-color; |
---|
| 516 | } |
---|
| 517 | } |
---|
| 518 | } |
---|
| 519 | [class*="icon-"] { |
---|
| 520 | color:@info-state-color; |
---|
| 521 | } |
---|
| 522 | .btn [class*="icon-"] { |
---|
| 523 | color:inherit; |
---|
| 524 | } |
---|
| 525 | |
---|
| 526 | .control-label , .help-block , .help-inline { |
---|
| 527 | color:@info-state-text-color; |
---|
| 528 | } |
---|
| 529 | } |
---|
| 530 | |
---|
| 531 | |
---|
| 532 | .form-group.has-error { |
---|
| 533 | input , select, textarea { |
---|
| 534 | border-color:@error-state-border; |
---|
| 535 | color:@error-state-color; |
---|
| 536 | .box-shadow(none); |
---|
| 537 | |
---|
| 538 | &:focus { |
---|
| 539 | .box-shadow(@error-state-focus-shadow); |
---|
| 540 | color:@error-state-focus-color; |
---|
| 541 | border-color:@error-state-focus-border; |
---|
| 542 | |
---|
| 543 | + [class*="icon-"] { |
---|
| 544 | color:@error-state-color; |
---|
| 545 | } |
---|
| 546 | } |
---|
| 547 | } |
---|
| 548 | [class*="icon-"] { |
---|
| 549 | color:@error-state-color; |
---|
| 550 | } |
---|
| 551 | .btn [class*="icon-"] { |
---|
| 552 | color:inherit; |
---|
| 553 | } |
---|
| 554 | |
---|
| 555 | .control-label , .help-block , .help-inline { |
---|
| 556 | color:@error-state-text-color; |
---|
| 557 | } |
---|
| 558 | } |
---|
| 559 | |
---|
| 560 | |
---|
| 561 | |
---|
| 562 | .form-group.has-warning { |
---|
| 563 | input , select, textarea { |
---|
| 564 | border-color:@warning-state-border; |
---|
| 565 | color:@warning-state-color; |
---|
| 566 | .box-shadow(none); |
---|
| 567 | |
---|
| 568 | &:focus { |
---|
| 569 | .box-shadow(@warning-state-focus-shadow); |
---|
| 570 | color:@warning-state-focus-color; |
---|
| 571 | border-color:@warning-state-focus-border; |
---|
| 572 | |
---|
| 573 | + [class*="icon-"] { |
---|
| 574 | color:@warning-state-color; |
---|
| 575 | } |
---|
| 576 | } |
---|
| 577 | } |
---|
| 578 | [class*="icon-"] { |
---|
| 579 | color:@warning-state-color; |
---|
| 580 | } |
---|
| 581 | .btn [class*="icon-"] { |
---|
| 582 | color:inherit; |
---|
| 583 | } |
---|
| 584 | |
---|
| 585 | .control-label , .help-block , .help-inline { |
---|
| 586 | color:@warning-state-text-color; |
---|
| 587 | } |
---|
| 588 | } |
---|
| 589 | |
---|
| 590 | .form-group input{ |
---|
| 591 | &[disabled] , &:disabled{ |
---|
| 592 | color:@disabled-state-color !important; |
---|
| 593 | background-color:@disabled-state-bg !important; |
---|
| 594 | } |
---|
| 595 | } |
---|
| 596 | |
---|
| 597 | |
---|
| 598 | |
---|
| 599 | @media only screen and (max-width: @screen-xs-max) { |
---|
| 600 | .help-inline , .input-icon + .help-inline { |
---|
| 601 | padding-left:0; |
---|
| 602 | display:block !important; |
---|
| 603 | } |
---|
| 604 | } |
---|
| 605 | |
---|