form.less 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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. .btn-white {
  69. background-color: @btnWhiteColor;
  70. color: @baseFontColor;
  71. border: 1px solid @btnWhiteBorderColor;
  72. &:hover {
  73. background-color: @btnWhiteHoverColor;
  74. color: @baseFontColor;
  75. }
  76. &.active {
  77. background-color: @btnWhiteHoverColor;
  78. color: @baseFontColor;
  79. }
  80. }
  81. // status buttons
  82. .btn-active {
  83. box-shadow: 0 0 0 1px rgba(0, 0, 0, .1) inset, 0 0 4px rgba(0, 0, 0, .15) inset
  84. }
  85. .btn-header {
  86. margin-top: -1px;
  87. color: white;
  88. padding: 0 10px;
  89. }
  90. .btn-link {
  91. overflow: visible;
  92. color: white;
  93. padding: .6em 1.2em;
  94. }
  95. .btn-radius {
  96. border-radius: .25em;
  97. }
  98. .btn-left-radius {
  99. border-top-left-radius: .25em;
  100. border-bottom-left-radius: .25em;
  101. }
  102. .btn-right-radius {
  103. border-top-right-radius: .25em;
  104. border-bottom-right-radius: .25em;
  105. }
  106. .btn-block {
  107. display: block;
  108. width: 100%;
  109. box-sizing: content-box;
  110. text-align: center;
  111. }
  112. .btn-comb {
  113. margin-left: -1px;
  114. }
  115. .btn-disabled {
  116. opacity: .6;
  117. cursor: not-allowed;
  118. box-shadow: none;
  119. background-image: none !important;
  120. border: none;
  121. &:hover {
  122. background-image: none !important;
  123. color: @btnHoverFontColor;
  124. }
  125. }
  126. .btn-group {
  127. display: inline-block;
  128. > .btn {
  129. position: relative;
  130. float: left;
  131. margin-right: -1px;
  132. &:first-child{
  133. border-bottom-left-radius: .25em;
  134. border-top-left-radius: .25em;
  135. }
  136. &:last-child{
  137. border-bottom-right-radius: .25em;
  138. border-top-right-radius: .25em;
  139. }
  140. }
  141. }
  142. // input form elements
  143. .ipt {
  144. &:focus {
  145. border-color: @iptFocusBorderColor;
  146. }
  147. }
  148. .ipt-radius {
  149. border-radius: .25em;
  150. }
  151. .ipt-small {
  152. font-size: .8*@baseFontSize;
  153. }
  154. .ipt-large {
  155. font-size: 1.2*@baseFontSize;
  156. }
  157. .ipt-textarea {
  158. height: auto !important;
  159. width: auto;
  160. }
  161. .ipt-disabled,
  162. input[disabled] {
  163. background-color: @iptDisabledColor !important;
  164. &:focus {
  165. background-color: @iptDisabledColor !important;
  166. }
  167. color: #888;
  168. cursor: not-allowed;
  169. }
  170. .ipt-readonly,
  171. input[readonly] {
  172. &:focus {
  173. background-color: @iptDisabledColor !important;
  174. }
  175. }
  176. .ipt-error {
  177. border-color: @iptErrorBorderColor !important;
  178. background-color: @iptErrorFocusColor !important;
  179. }
  180. .form {
  181. label {
  182. margin-right: 1em;
  183. }
  184. .help {
  185. color: @formHelpFontColor;
  186. padding-top: .6em;
  187. display: inline-block;
  188. }
  189. }
  190. .form-stack {
  191. label {
  192. display: block;
  193. }
  194. .field {
  195. margin-bottom: 1em;
  196. }
  197. }
  198. .form-align {
  199. label,
  200. .form-label {
  201. display: inline-block;
  202. width: 120px;
  203. text-align: right;
  204. margin-right: 1em;
  205. }
  206. .field {
  207. margin-bottom: 1em;
  208. }
  209. }
  210. label {
  211. &.text-left {
  212. text-align: left;
  213. }
  214. &.req {
  215. &:after {
  216. content: "*";
  217. color: @labelRedColor;
  218. }
  219. }
  220. }