forms.less 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /*
  2. * Component: Form
  3. * ---------------
  4. */
  5. .form-control {
  6. .border-radius(@input-radius);
  7. box-shadow: none;
  8. border-color: @gray-lte;
  9. &:focus {
  10. border-color: @light-blue;
  11. box-shadow: none;
  12. }
  13. &::-moz-placeholder,
  14. &:-ms-input-placeholder,
  15. &::-webkit-input-placeholder {
  16. color: #bbb;
  17. opacity: 1;
  18. }
  19. &:not(select) {
  20. -webkit-appearance: none;
  21. -moz-appearance: none;
  22. appearance: none;
  23. }
  24. }
  25. .form-group {
  26. &.has-success {
  27. label {
  28. color: @green;
  29. }
  30. .form-control,
  31. .input-group-addon {
  32. border-color: @green;
  33. box-shadow: none;
  34. }
  35. .help-block {
  36. color: @green;
  37. }
  38. }
  39. &.has-warning {
  40. label {
  41. color: @yellow;
  42. }
  43. .form-control,
  44. .input-group-addon {
  45. border-color: @yellow;
  46. box-shadow: none;
  47. }
  48. .help-block {
  49. color: @yellow;
  50. }
  51. }
  52. &.has-error {
  53. label {
  54. color: @red;
  55. }
  56. .form-control,
  57. .input-group-addon {
  58. border-color: @red;
  59. box-shadow: none;
  60. }
  61. .help-block {
  62. color: @red;
  63. }
  64. }
  65. }
  66. /* Input group */
  67. .input-group {
  68. .input-group-addon {
  69. .border-radius(@input-radius);
  70. border-color: @gray-lte;
  71. background-color: #fff;
  72. }
  73. }
  74. /* button groups */
  75. .btn-group-vertical {
  76. .btn {
  77. &.btn-flat:first-of-type, &.btn-flat:last-of-type {
  78. .border-radius(0);
  79. }
  80. }
  81. }
  82. .icheck > label {
  83. padding-left: 0;
  84. }
  85. /* support Font Awesome icons in form-control */
  86. .form-control-feedback.fa {
  87. line-height: @input-height-base;
  88. }
  89. .input-lg + .form-control-feedback.fa,
  90. .input-group-lg + .form-control-feedback.fa,
  91. .form-group-lg .form-control + .form-control-feedback.fa {
  92. line-height: @input-height-large;
  93. }
  94. .input-sm + .form-control-feedback.fa,
  95. .input-group-sm + .form-control-feedback.fa,
  96. .form-group-sm .form-control + .form-control-feedback.fa {
  97. line-height: @input-height-small;
  98. }