You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

209 lines
4.2 KiB

  1. /* Form */
  2. form > div:not(.clear) {
  3. min-height: 9rem;
  4. position: relative;
  5. box-sizing: border-box;
  6. }
  7. li > form > div:not(.control) { /* If we put the form in a list */
  8. min-height: 0;
  9. line-height: 3rem;
  10. padding-top: 0rem;
  11. top: -1.5rem;
  12. }
  13. form > div > label {
  14. display: block;
  15. position: absolute;
  16. top: 2rem;
  17. }
  18. form > div > textarea {
  19. border: none;
  20. resize: none;
  21. font-size: 2rem;
  22. font-family: sans-serif;
  23. box-sizing: border-box;
  24. }
  25. form > div > input,
  26. form > div > textarea {
  27. display: block;
  28. padding: 1rem 0;
  29. padding-top: 5rem;
  30. width: 100%;
  31. background-color: transparent;
  32. border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  33. margin-bottom: 1px;
  34. overflow: hidden; /* Fixme */
  35. }
  36. form > div > input:focus,
  37. form > div > textarea:focus {
  38. margin-bottom: 0;
  39. }
  40. form > div > input:required {
  41. box-shadow: none;
  42. }
  43. /* Placing the checkbox and radio */
  44. form > div:not(.control) .checkbox {
  45. margin-top: 5.5rem;
  46. }
  47. form > div .radio {
  48. padding-top: 5.5rem;
  49. }
  50. /* Checkbox element */
  51. form > div .checkbox > input[type="checkbox"],
  52. form > div .radio > input[type="radio"] {
  53. display: none;
  54. }
  55. form > div .checkbox {
  56. position: relative;
  57. height: 2.25rem;
  58. border-radius: 2rem;
  59. margin-left: 1rem;
  60. width: 5rem;
  61. background-color: #939393;
  62. }
  63. form > div .checkbox:before {
  64. content: '';
  65. display: block;
  66. position: absolute;
  67. height: 2.25rem;
  68. border-radius: 2rem 0 0 2rem;
  69. width: 2.7rem;
  70. background-color: #77C1BA;
  71. }
  72. form > div .checkbox > input[type="checkbox"] + label {
  73. display: block;
  74. background-color: #FAFAFA;
  75. box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.5);
  76. width: 3rem;
  77. height: 3rem;
  78. border-radius: 2rem;
  79. top: -0.35rem;
  80. left: 0;
  81. position: relative;
  82. transition: left 0.3s ease, box-shadow 0.1s ease;
  83. }
  84. form > div .checkbox > input[type="checkbox"] + label:hover {
  85. cursor: pointer;
  86. box-shadow: 0 0 0 1.5rem rgba(0, 0, 0, 0.1), 0 0.2rem 0.5rem rgba(0, 0, 0, 0.5);
  87. }
  88. form > div .checkbox > input[type="checkbox"]:checked + label {
  89. background-color: #009587;
  90. left: 1.3em;
  91. }
  92. form > div .checkbox > input[type="checkbox"]:checked + label:hover {
  93. box-shadow: 0 0 0 1.5rem rgba(0, 0, 0, 0.1), 0 0.2rem 0.5rem rgba(0, 0, 0, 0.5);
  94. }
  95. /* Radio */
  96. form > div .radio > input[type="radio"] + label {
  97. display: inline-block;
  98. width: 2rem;
  99. height: 2rem;
  100. border-radius: 2rem;
  101. border-width: 2px;
  102. border-style: solid;
  103. border-color: gray;
  104. transition: box-shadow 0.1s ease;
  105. }
  106. form > div .radio > input[type="radio"] + label:hover {
  107. cursor: pointer;
  108. background-color: rgba(0, 0, 0, 0.1);
  109. box-shadow: 0 0 0 1.5rem rgba(0, 0, 0, 0.1);
  110. }
  111. form > div .radio > input[type="radio"]:checked + label {
  112. background-color: blue;
  113. background-color: #009688;
  114. border-color: #009688;
  115. box-shadow: inset 0 0 0 0.4rem white;
  116. }
  117. form > div .radio > input[type="radio"]:checked + label:hover {
  118. box-shadow: inset 0 0 0rem 0.4rem white, 0 0 0 1.5rem rgba(0, 0, 0, 0.1);
  119. }
  120. /* Button */
  121. .button,
  122. input[type=button] {
  123. min-width: 8rem;
  124. text-align: center;
  125. display: inline-block;
  126. box-sizing: border-box;
  127. text-transform: uppercase;
  128. font-size: 2rem;
  129. font-weight: 700;
  130. line-height: 4.5rem;
  131. height: 4.5rem;
  132. margin: 0.75rem 0.5rem;
  133. border-radius: 0.25rem;
  134. background-color: white;
  135. color: black;
  136. padding: 0 1rem;
  137. transition: background 0.3s ease;
  138. box-shadow: 0 0.1rem 0.3rem rgba(0, 0, 0, 0.5);
  139. }
  140. .button.flat,
  141. input[type=button].flat {
  142. box-shadow: none;
  143. background-color: transparent;
  144. }
  145. .button:hover,
  146. input[type=button]:hover {
  147. cursor: pointer;
  148. }
  149. .button.flat:hover,
  150. input[type=button].flat:hover {
  151. background-color: rgba(153, 153, 153, 0.2);
  152. }
  153. .button:focus,
  154. input[type=button]:focus {
  155. border: 0;
  156. }
  157. .button.flat:focus,
  158. input[type=button].flat:focus {
  159. background-color: rgba(153, 153, 153, 0.4);
  160. }
  161. .button.action {
  162. position: fixed;
  163. bottom: 2rem;
  164. right: 2rem;
  165. border-radius: 10rem;
  166. width: 3rem;
  167. min-height: 0rem;
  168. line-height: 6rem;
  169. padding: 1rem;
  170. height: 8rem;
  171. z-index: 1;
  172. font-size: 3rem;
  173. }