_inputformgroup.scss 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. .input-group {
  2. width: 100%;
  3. margin-bottom: 20px;
  4. .form-line {
  5. display: inline-block;
  6. width: 100%;
  7. border-bottom: 1px solid #ddd;
  8. position: relative;
  9. &:after {
  10. content: '';
  11. position: absolute;
  12. left: 0;
  13. width: 100%;
  14. bottom: -2px;
  15. @include transform(scaleX(0));
  16. @include transition(0.25s ease-in);
  17. border-bottom: 2px solid #1f91f3;
  18. }
  19. + .input-group-addon {
  20. padding-right: 0;
  21. padding-left: 10px;
  22. }
  23. }
  24. .help-info {
  25. float: right;
  26. font-size: 12px;
  27. margin-top: 5px;
  28. color: #999;
  29. }
  30. label.error {
  31. font-size: 12px;
  32. display: block;
  33. margin-top: 5px;
  34. font-weight: normal;
  35. color: #F44336;
  36. }
  37. .form-line.error {
  38. &:after {
  39. border-bottom: 2px solid #F44336;
  40. }
  41. }
  42. .form-line.success {
  43. &:after {
  44. border-bottom: 2px solid #4CAF50;
  45. }
  46. }
  47. .form-line.warning {
  48. &:after {
  49. border-bottom: 2px solid #FFC107;
  50. }
  51. }
  52. .form-line.focused {
  53. &:after {
  54. @include transform(scaleX(1));
  55. }
  56. .form-label {
  57. bottom: 25px;
  58. left: 0;
  59. font-size: 12px;
  60. }
  61. }
  62. .input-group-addon {
  63. border: none;
  64. background-color: transparent;
  65. padding-left: 0;
  66. font-weight: bold;
  67. .material-icons {
  68. font-size: 18px;
  69. color: #555;
  70. }
  71. }
  72. input[type="text"],
  73. .form-control {
  74. border: none;
  75. box-shadow: none;
  76. padding-left: 0;
  77. }
  78. .form-control {
  79. &:focus {
  80. @include box-shadow(none !important);
  81. }
  82. }
  83. }
  84. .input-group.input-group-sm {
  85. .input-group-addon {
  86. i {
  87. font-size: 14px;
  88. }
  89. }
  90. .form-control {
  91. font-size: 12px;
  92. }
  93. }
  94. .input-group.input-group-lg {
  95. .input-group-addon {
  96. i {
  97. font-size: 26px;
  98. }
  99. }
  100. .form-control {
  101. font-size: 18px;
  102. }
  103. }
  104. .form-control-label {
  105. text-align: right;
  106. label {
  107. margin-top: 8px;
  108. }
  109. }
  110. .form-horizontal {
  111. .form-group {
  112. margin-bottom: 0;
  113. }
  114. }
  115. .form-group {
  116. width: 100%;
  117. margin-bottom: 25px;
  118. .form-control {
  119. width: 100%;
  120. border: none;
  121. box-shadow: none;
  122. // border-bottom: 1px solid #ddd;
  123. @include border-radius(0);
  124. padding-left: 0;
  125. }
  126. .help-info {
  127. float: right;
  128. font-size: 12px;
  129. margin-top: 5px;
  130. color: #999;
  131. }
  132. label.error {
  133. font-size: 12px;
  134. display: block;
  135. margin-top: 5px;
  136. font-weight: normal;
  137. color: #F44336;
  138. }
  139. .form-line {
  140. width: 100%;
  141. position: relative;
  142. border-bottom: 1px solid #ddd;
  143. &:after {
  144. content: '';
  145. position: absolute;
  146. left: 0;
  147. width: 100%;
  148. height: 0;
  149. bottom: -1px;
  150. @include transform(scaleX(0));
  151. @include transition(0.25s ease-in);
  152. border-bottom: 2px solid #1f91f3;
  153. }
  154. .form-label {
  155. font-weight: normal;
  156. color: #aaa;
  157. position: absolute;
  158. top: 10px;
  159. left: 0;
  160. cursor: text;
  161. @include transition(0.2s);
  162. }
  163. }
  164. .form-line.error {
  165. &:after {
  166. border-bottom: 2px solid #F44336;
  167. }
  168. }
  169. .form-line.success {
  170. &:after {
  171. border-bottom: 2px solid #4CAF50;
  172. }
  173. }
  174. .form-line.warning {
  175. &:after {
  176. border-bottom: 2px solid #FFC107;
  177. }
  178. }
  179. .form-line.focused {
  180. &:after {
  181. @include transform(scaleX(1));
  182. }
  183. .form-label {
  184. top: -10px;
  185. left: 0;
  186. font-size: 12px;
  187. }
  188. }
  189. }
  190. .form-group-sm {
  191. .form-label {
  192. font-size: 12px;
  193. }
  194. .form-line.focused {
  195. .form-label {
  196. bottom: 20px;
  197. font-size: 10px;
  198. }
  199. }
  200. }
  201. .form-group-lg {
  202. .form-label {
  203. font-size: 18px;
  204. }
  205. .form-line.focused {
  206. .form-label {
  207. bottom: 35px;
  208. font-size: 12px;
  209. }
  210. }
  211. }
  212. .form-control[disabled],
  213. .form-control[readonly],
  214. fieldset[disabled] .form-control {
  215. background-color: transparent;
  216. }