form.scss 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. .control {
  2. & + .control {
  3. margin-top: 15px;
  4. }
  5. // ===============================================================
  6. // TEXTBOX
  7. // ===============================================================
  8. input[type=text], input[type=password] {
  9. background-color: #FFF;
  10. display: flex;
  11. height: 30px;
  12. align-items: center;
  13. padding: 0 12px;
  14. border: 1px solid mc('grey', '400');
  15. border-radius: 3px;
  16. font-family: $core-font-standard;
  17. font-size: 14px;
  18. color: mc('grey', '700');
  19. transition: all .4s ease;
  20. box-shadow: inset 0 0 5px 0 rgba(0,0,0,0.1);
  21. &:focus {
  22. outline: none;
  23. border-color: mc('light-blue', '500');
  24. box-shadow: inset 0 0 5px 0 rgba(mc('light-blue', '500'), 0.3);
  25. }
  26. &:disabled {
  27. background-color: mc('grey', '100');
  28. }
  29. &.is-dirty.is-invalid {
  30. border-color: mc('red', '500');
  31. box-shadow: inset 0 0 5px 0 mc('red', '100');
  32. }
  33. @include placeholder {
  34. color: mc('grey', '400');
  35. }
  36. }
  37. &.is-fullwidth {
  38. input[type=text], input[type=password], select, textarea {
  39. width: 100%;
  40. }
  41. }
  42. textarea {
  43. background-color: #FFF;
  44. display: flex;
  45. padding: 6px 12px;
  46. border: 1px solid mc('grey', '400');
  47. border-radius: 3px;
  48. font-family: $core-font-standard;
  49. font-size: 14px;
  50. color: mc('grey', '700');
  51. transition: all .4s ease;
  52. box-shadow: inset 0 0 5px 0 rgba(0,0,0,0.1);
  53. min-height: 100px;
  54. &:focus {
  55. outline: none;
  56. border-color: mc('light-blue', '500');
  57. box-shadow: inset 0 0 5px 0 rgba(mc('light-blue', '500'), 0.3);
  58. }
  59. &:disabled {
  60. background-color: mc('grey', '100');
  61. }
  62. &.is-dirty.is-invalid {
  63. border-color: mc('red', '500');
  64. box-shadow: inset 0 0 5px 0 mc('red', '100');
  65. }
  66. }
  67. // ===============================================================
  68. // DROPDOWN
  69. // ===============================================================
  70. select {
  71. background-color: #FFF;
  72. display: flex;
  73. height: 30px;
  74. align-items: center;
  75. padding: 0 12px;
  76. border: 1px solid mc('grey', '400');
  77. border-radius: 3px;
  78. font-family: $core-font-standard;
  79. font-size: 14px;
  80. color: mc('grey', '700');
  81. transition: all .4s ease;
  82. box-shadow: inset 0 0 5px 0 rgba(0,0,0,0.1);
  83. cursor: pointer;
  84. &:focus {
  85. outline: none;
  86. border-color: mc('light-blue', '500');
  87. box-shadow: inset 0 0 5px 0 rgba(mc('light-blue', '500'), 0.3);
  88. }
  89. &:disabled {
  90. background-color: mc('grey', '100');
  91. }
  92. }
  93. // ===============================================================
  94. // CHECKBOX / RADIO BUTTONS
  95. // ===============================================================
  96. input[type=radio], input[type=checkbox] {
  97. position: absolute;
  98. left: -9999px;
  99. opacity: 0;
  100. & + label {
  101. position: relative;
  102. padding: 0 15px 0 25px;
  103. cursor: pointer;
  104. display: inline-block;
  105. height: 25px;
  106. line-height: 25px;
  107. font-size: 14px;
  108. transition: .28s ease;
  109. @include prefix('user-select', none);
  110. &:before, &:after {
  111. content: '';
  112. position: absolute;
  113. left: 0;
  114. top: 0;
  115. margin: 4px;
  116. border: 2px solid mc($primary, '600');
  117. margin: 4px;
  118. width: 16px;
  119. height: 16px;
  120. border-radius: 50%;
  121. z-index: 0;
  122. transition: .28s ease;
  123. }
  124. }
  125. &:checked + label {
  126. &:before, &:after {
  127. border-color: mc($primary, '600');
  128. }
  129. &:after {
  130. @include prefix('transform', scale(0.5));
  131. background-color: mc($primary, '600');
  132. }
  133. }
  134. }
  135. input[type=checkbox] + label {
  136. &:before, &:after {
  137. border-radius: 3px;
  138. }
  139. }
  140. .help {
  141. font-size: 12px;
  142. &.is-red {
  143. color: mc('red','600');
  144. }
  145. }
  146. & + label {
  147. margin-top: 20px;
  148. }
  149. > i:first-child {
  150. margin-right: 8px;
  151. }
  152. }
  153. .label {
  154. margin-bottom: 5px;
  155. font-size: 14px;
  156. font-weight: 500;
  157. display: block;
  158. strong {
  159. @each $color, $colorvalue in $material-colors {
  160. &.is-#{$color} {
  161. color: mc($color, '600');
  162. }
  163. }
  164. }
  165. }
  166. .form-sections {
  167. section {
  168. border-top: 1px solid mc('grey', '200');
  169. padding: 20px;
  170. @include prefix(animation-duration, .6s);
  171. &:first-child {
  172. border-top: none;
  173. }
  174. .button + .button {
  175. margin-left: 10px;
  176. }
  177. .desc {
  178. display: inline-block;
  179. padding: 10px 0 0 0px;
  180. font-size: 12px;
  181. color: mc('grey', '500');
  182. }
  183. .section-block {
  184. padding-left: 20px;
  185. font-size: 14px;
  186. color: mc('blue-grey', '800');
  187. h6 {
  188. font-size: 14px;
  189. font-weight: 500;
  190. color: mc('blue-grey', '600');
  191. margin-top: 15px;
  192. border-bottom: 1px dotted mc('blue-grey', '200');
  193. }
  194. p {
  195. padding: 5px 0;
  196. &.is-small {
  197. font-size: 13px;
  198. }
  199. }
  200. }
  201. }
  202. }