form-styles.scss 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. $form-border-color: #eee;
  2. $form-active-color: #000;
  3. .form-group.has-errors {
  4. background: rgba(255,0,0,0.05);
  5. border: 1px solid rgba(255,0,0,0.2);
  6. border-radius: 3px;
  7. margin: 0 -5px;
  8. padding: 0 5px;
  9. }
  10. .form-errors {
  11. color: #b52b27;
  12. }
  13. .form-honeybear {
  14. visibility: hidden;
  15. position: absolute !important;
  16. height: 1px;
  17. width: 1px;
  18. overflow: hidden;
  19. clip: rect(1px, 1px, 1px, 1px);
  20. }
  21. .form-errors p {
  22. margin: 0;
  23. }
  24. .form-input-file {
  25. input {
  26. display: none;
  27. }
  28. .dz-default.dz-message {
  29. position: absolute;
  30. text-align: center;
  31. left: 0;
  32. right: 0;
  33. top: 50%;
  34. transform: translateY(-50%);
  35. margin: 0;
  36. }
  37. &.dropzone {
  38. position: relative;
  39. min-height: 70px;
  40. border-radius: 3px;
  41. margin-bottom: .85rem;
  42. border: 2px dashed #ccc;
  43. color: #aaa;
  44. padding: 0.5rem;
  45. .dz-preview {
  46. margin: 0.5rem;
  47. &:hover {
  48. z-index: 2;
  49. }
  50. .dz-error-message {
  51. min-width: 140px;
  52. width: auto;
  53. }
  54. .dz-image,
  55. &.dz-file-preview .dz-image {
  56. border-radius: 3px;
  57. z-index: 1;
  58. }
  59. }
  60. }
  61. }
  62. // New JS powered tabs
  63. .form-tabs {
  64. .tabs-nav {
  65. display: flex;
  66. padding-top: 1px;
  67. margin-bottom: -1px;
  68. a {
  69. flex: 1;
  70. transition: color 0.5s ease, background 0.5s ease;
  71. cursor: pointer;
  72. text-align:center;
  73. padding: 10px;
  74. display: flex;
  75. align-items: center;
  76. justify-content: center;
  77. border-bottom: 1px solid $form-border-color;
  78. border-radius: 5px 5px 0 0;
  79. &.active {
  80. border: 1px solid $form-border-color;
  81. border-bottom: 1px solid transparent;
  82. margin: 0 -1px;
  83. span {
  84. color: $form-active-color;
  85. }
  86. }
  87. }
  88. span {
  89. display: inline-block;
  90. line-height: 1.1;
  91. }
  92. }
  93. &.subtle .tabs-nav {
  94. margin-right: 0 !important;
  95. }
  96. .tabs-content {
  97. .tab__content {
  98. display: none;
  99. padding-top: 2rem;
  100. &.active {
  101. display: block;
  102. }
  103. }
  104. }
  105. }
  106. // Checkboxes
  107. .checkboxes {
  108. display: inline-block;
  109. label {
  110. display: inline;
  111. cursor: pointer;
  112. position: relative;
  113. padding: 0 0 0 20px;
  114. margin-right: 15px;
  115. }
  116. label:before {
  117. content:"";
  118. display: inline-block;
  119. width: 20px;
  120. height: 20px;
  121. left: 0;
  122. margin-top: 0;
  123. margin-right: 10px;
  124. position: absolute;
  125. border-radius: 3px;
  126. border: 1px solid #e6e6e6;
  127. }
  128. input[type=checkbox] {
  129. display: none;
  130. }
  131. input[type=checkbox]:checked + label:before {
  132. content:"\2713";
  133. font-size: 20px;
  134. line-height: 1;
  135. text-align: center;
  136. }
  137. &.toggleable label{
  138. margin-right: 0;
  139. }
  140. }
  141. // Toggleable
  142. .form-field-toggleable {
  143. .checkboxes.toggleable {
  144. margin-right: 5px;
  145. vertical-align: middle;
  146. }
  147. .checkboxes + label {
  148. display: inline-block;
  149. }
  150. }
  151. // Toggles
  152. .switch-toggle {
  153. display: inline-flex;
  154. overflow: hidden;
  155. border-radius: 3px;
  156. line-height: 35px;
  157. border: 1px solid $form-border-color;
  158. input[type=radio] {
  159. position: absolute;
  160. visibility: hidden;
  161. display: none;
  162. }
  163. label {
  164. display: inline-block;
  165. cursor: pointer;
  166. padding: 0 15px;
  167. margin: 0;
  168. white-space: nowrap;
  169. color: inherit;
  170. transition: background-color 0.5s ease;
  171. }
  172. input.highlight:checked + label {
  173. background: #333;
  174. color: #fff;
  175. }
  176. input:checked + label {
  177. color: #fff;
  178. background: #999;
  179. }
  180. }
  181. /* Signature Pad */
  182. .signature-pad {
  183. position: relative;
  184. display: -webkit-box;
  185. display: -ms-flexbox;
  186. display: flex;
  187. -webkit-box-orient: vertical;
  188. -webkit-box-direction: normal;
  189. -ms-flex-direction: column;
  190. flex-direction: column;
  191. font-size: 10px;
  192. width: 100%;
  193. height: 100%;
  194. max-width: 700px;
  195. max-height: 460px;
  196. border: 1px solid #f0f0f0;
  197. background-color: #fff;
  198. padding: 16px;
  199. }
  200. .signature-pad--body {
  201. position: relative;
  202. -webkit-box-flex: 1;
  203. -ms-flex: 1;
  204. flex: 1;
  205. border: 1px solid #f6f6f6;
  206. min-height: 100px;
  207. }
  208. .signature-pad--body canvas {
  209. position: absolute;
  210. left: 0;
  211. top: 0;
  212. width: 100%;
  213. height: 100%;
  214. border-radius: 4px;
  215. box-shadow: 0 0 5px rgba(0, 0, 0, 0.02) inset;
  216. }
  217. .signature-pad--footer {
  218. color: #C3C3C3;
  219. text-align: center;
  220. font-size: 1.2em;
  221. }
  222. .signature-pad--actions {
  223. display: -webkit-box;
  224. display: -ms-flexbox;
  225. display: flex;
  226. -webkit-box-pack: justify;
  227. -ms-flex-pack: justify;
  228. justify-content: space-between;
  229. margin-top: 8px;
  230. }
  231. [data-grav-field="array"] .form-row {
  232. display: flex;
  233. align-items: center;
  234. margin-bottom: 0.5rem;
  235. }
  236. [data-grav-field="array"] .form-row > input,
  237. [data-grav-field="array"] .form-row > textarea
  238. {
  239. margin: 0 0.5rem;
  240. display: inline-block;
  241. }