form.less 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. @import "var";
  2. // Button.
  3. .btn {
  4. white-space: nowrap;
  5. }
  6. .btn-small {
  7. font-size: 0.9*@baseFontSize;
  8. padding: .4em .9em;
  9. }
  10. .btn-medium {
  11. font-size: @baseFontSize;
  12. padding: .4em .9em;
  13. }
  14. .btn-large {
  15. font-size: 1.2*@baseFontSize;
  16. padding: .4em .9em;
  17. }
  18. .btn-green {
  19. background-color: @btnGreenColor;
  20. border: 1px solid @btnGreenColor;
  21. &:hover {
  22. background-color: @btnHoverGreenColor;
  23. color: #FFF;
  24. }
  25. }
  26. .btn-blue {
  27. background-color: @btnBlueColor;
  28. border: 1px solid @btnBlueColor;
  29. &:hover {
  30. background-color: @btnHoverBlueColor;
  31. color: #FFF;
  32. }
  33. }
  34. .btn-red {
  35. color: #FFF;
  36. background-color: @btnRedColor;
  37. border: 1px solid @btnRedColor;
  38. &:hover {
  39. background-color: @btnHoverRedColor;
  40. color: #FFF;
  41. }
  42. }
  43. .btn-orange {
  44. background-color: @btnOrangeColor;
  45. border: 1px solid @btnOrangeColor;
  46. &:hover {
  47. background-color: @btnHoverOrangeColor;
  48. color: #FFF;
  49. }
  50. }
  51. .btn-black {
  52. background-color: @btnBlackColor;
  53. border: 1px solid @btnBlackColor;
  54. &:hover {
  55. background-color: @btnHoverBlackColor;
  56. color: #FFF;
  57. }
  58. }
  59. .btn-gray {
  60. background-color: @btnGrayColor;
  61. color: @baseFontColor;
  62. border: 1px solid @btnGrayBorderColor;
  63. &:hover {
  64. background-color: @btnGrayHoverColor;
  65. color: @baseFontColor;
  66. }
  67. }
  68. // status buttons
  69. .btn-active {
  70. box-shadow: 0 0 0 1px rgba(0, 0, 0, .1) inset, 0 0 4px rgba(0, 0, 0, .15) inset
  71. }
  72. .btn-header {
  73. margin-top: -1px;
  74. color: white;
  75. padding: 0 10px;
  76. }
  77. .btn-link {
  78. overflow: visible;
  79. color: white;
  80. padding: .6em 1.2em;
  81. }
  82. .btn-radius {
  83. border-radius: .25em;
  84. }
  85. .btn-left-radius {
  86. border-top-left-radius: .25em;
  87. border-bottom-left-radius: .25em;
  88. }
  89. .btn-right-radius {
  90. border-top-right-radius: .25em;
  91. border-bottom-right-radius: .25em;
  92. }
  93. .btn-block {
  94. display: block;
  95. width: 100%;
  96. box-sizing: content-box;
  97. text-align: center;
  98. }
  99. .btn-comb {
  100. margin-left: -1px;
  101. }
  102. .btn-disabled {
  103. opacity: .6;
  104. cursor: not-allowed;
  105. box-shadow: none;
  106. background-image: none !important;
  107. border: none;
  108. &:hover {
  109. background-image: none !important;
  110. color: @btnHoverFontColor;
  111. }
  112. }
  113. // input form elements
  114. .ipt {
  115. &:focus {
  116. border-color: @iptFocusBorderColor;
  117. }
  118. }
  119. .ipt-radius {
  120. border-radius: .25em;
  121. }
  122. .ipt-small {
  123. font-size: .8*@baseFontSize;
  124. }
  125. .ipt-large {
  126. font-size: 1.2*@baseFontSize;
  127. }
  128. .ipt-textarea {
  129. height: auto !important;
  130. width: auto;
  131. }
  132. .ipt-disabled,
  133. input[disabled] {
  134. background-color: @iptDisabledColor !important;
  135. &:focus {
  136. background-color: @iptDisabledColor !important;
  137. }
  138. color: #888;
  139. cursor: not-allowed;
  140. }
  141. .ipt-readonly,
  142. input[readonly] {
  143. &:focus {
  144. background-color: @iptDisabledColor !important;
  145. }
  146. }
  147. .ipt-error {
  148. border-color: @iptErrorBorderColor !important;
  149. background-color: @iptErrorFocusColor !important;
  150. }
  151. .form {
  152. label {
  153. margin-right: 1em;
  154. }
  155. .help {
  156. color: @formHelpFontColor;
  157. padding-top: .6em;
  158. display: inline-block;
  159. }
  160. }
  161. .form-stack {
  162. label {
  163. display: block;
  164. }
  165. .field {
  166. margin-bottom: 1em;
  167. }
  168. }
  169. .form-align {
  170. label,
  171. .form-label {
  172. display: inline-block;
  173. width: 120px;
  174. text-align: right;
  175. margin-right: 1em;
  176. }
  177. .field {
  178. margin-bottom: 1em;
  179. }
  180. }
  181. label {
  182. &.text-left {
  183. text-align: left;
  184. }
  185. &.req {
  186. &:after {
  187. content: "*";
  188. color: @labelRedColor;
  189. }
  190. }
  191. }