form.css 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. /**
  2. * @file
  3. * Visual styles for Bartik's forms.
  4. */
  5. /* Password field. */
  6. .password-field {
  7. margin: 0;
  8. }
  9. /* Form elements. */
  10. form {
  11. margin: 0;
  12. padding: 0;
  13. }
  14. fieldset {
  15. margin: 1em 0;
  16. min-width: 0;
  17. }
  18. /**
  19. * We've temporarily added this Firefox specific rule here to fix fieldset
  20. * widths.
  21. * @todo remove once this Mozilla bug is fixed.
  22. * See https://bugzilla.mozilla.org/show_bug.cgi?id=504622
  23. */
  24. @media (min--moz-device-pixel-ratio: 0) {
  25. fieldset {
  26. display: table-cell;
  27. }
  28. }
  29. details,
  30. fieldset,
  31. .filter-wrapper {
  32. border-radius: 4px;
  33. }
  34. .filter-wrapper {
  35. border-top-left-radius: 0;
  36. border-top-right-radius: 0;
  37. }
  38. .filter-help a {
  39. font-size: 0.857em;
  40. }
  41. .filter-wrapper .form-item label {
  42. margin-right: 10px; /* LTR */
  43. }
  44. [dir="rtl"] .filter-wrapper .form-item label {
  45. margin-left: 10px;
  46. margin-right: 0;
  47. }
  48. summary {
  49. background: #dbdbdb;
  50. color: #3b3b3b;
  51. text-shadow: 0 1px 0 #fff;
  52. }
  53. details summary a {
  54. color: #3b3b3b;
  55. }
  56. details summary a:hover,
  57. details summary a:active,
  58. details summary a:focus {
  59. color: #000;
  60. }
  61. details .details-description {
  62. font-style: italic;
  63. }
  64. label {
  65. display: table;
  66. font-weight: bold;
  67. }
  68. label[for] {
  69. cursor: pointer;
  70. }
  71. input,
  72. textarea,
  73. select {
  74. font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, sans-serif;
  75. }
  76. input {
  77. margin: 2px 0;
  78. padding: 4px;
  79. /* Keep form elements from overflowing their containers. */
  80. max-width: 100%;
  81. box-sizing: border-box;
  82. }
  83. input,
  84. textarea {
  85. font-size: 0.929em;
  86. }
  87. /**
  88. * Make the font slightly bigger in mobile
  89. * @todo: check the correct font-size
  90. */
  91. @media screen and (max-width: 60em) { /* 920px */
  92. input,
  93. textarea {
  94. font-size: 16px;
  95. }
  96. }
  97. textarea {
  98. line-height: 1.5;
  99. }
  100. textarea.form-textarea {
  101. padding: 4px;
  102. }
  103. input.form-text,
  104. input.form-tel,
  105. input.form-email,
  106. input.form-url,
  107. input.form-search,
  108. input.form-file,
  109. input.form-number,
  110. input.form-color,
  111. textarea.form-textarea {
  112. border: 1px solid #ccc;
  113. color: #3b3b3b;
  114. }
  115. input.form-submit:hover,
  116. input.form-submit:focus {
  117. background: #dedede;
  118. }
  119. .password-suggestions ul li {
  120. margin-left: 1.2em; /* LTR */
  121. }
  122. [dir="rtl"] .password-suggestions ul li {
  123. margin-right: 1.2em;
  124. margin-left: 0;
  125. }
  126. .form-item label,
  127. .form-wrapper .label {
  128. font-size: 0.929em;
  129. }
  130. .form-wrapper .field-multiple-table .label {
  131. font-size: inherit;
  132. }
  133. .form-type-radio label,
  134. .form-type-checkbox label {
  135. margin-left: 4px; /* LTR */
  136. }
  137. [dir="rtl"] .form-type-radio label,
  138. [dir="rtl"] .form-type-checkbox label {
  139. margin-right: 4px;
  140. margin-left: 0;
  141. }
  142. .form-type-radio .description,
  143. .form-type-checkbox .description {
  144. margin-left: 2px; /* LTR */
  145. }
  146. [dir="rtl"] .form-type-radio .description,
  147. [dir="rtl"] .form-type-checkbox .description {
  148. margin-right: 2px;
  149. margin-left: 0;
  150. }
  151. .form-actions {
  152. padding-top: 10px;
  153. }
  154. /* Node Form */
  155. #edit-body {
  156. margin-bottom: 2em;
  157. }
  158. .node-form label,
  159. .node-form .description,
  160. .node-form .form-wrapper .label {
  161. font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  162. }
  163. .node-form .form-wrapper .field-multiple-table .label {
  164. font-family: inherit;
  165. }
  166. .node-form .form-wrapper {
  167. margin-bottom: 2em;
  168. }
  169. .node-form .entity-content-form-footer,
  170. .node-form .field--name-status {
  171. margin-bottom: 0;
  172. }
  173. .node-form .form-actions {
  174. padding-top: 0;
  175. margin-top: 0;
  176. }
  177. /* Contact Form */
  178. .contact-form #edit-name {
  179. width: 75%;
  180. border-radius: 4px;
  181. }
  182. .contact-form #edit-mail {
  183. width: 75%;
  184. border-radius: 4px;
  185. }
  186. .contact-form #edit-subject {
  187. width: 75%;
  188. border-radius: 4px;
  189. }
  190. .contact-form #edit-message {
  191. width: 76.3%;
  192. border-top-left-radius: 4px;
  193. border-top-right-radius: 4px;
  194. }
  195. /* Disabled form elements */
  196. .form-disabled input,
  197. .form-disabled select,
  198. .form-disabled textarea {
  199. background: #ededed;
  200. border-color: #bbb;
  201. color: #717171;
  202. }
  203. .form-disabled label {
  204. color: #717171;
  205. }
  206. /* Comment form */
  207. .comment-form label {
  208. float: left; /* LTR */
  209. font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  210. font-size: 0.929em;
  211. width: 120px;
  212. }
  213. [dir="rtl"] .comment-form label {
  214. float: right;
  215. }
  216. .comment-form input,
  217. .comment-form .form-select {
  218. margin: 0;
  219. border-radius: 4px;
  220. }
  221. .comment-form .form-type-textarea label {
  222. float: none;
  223. }
  224. .comment-form .form-item,
  225. .comment-form .form-radios,
  226. .comment-form .form-type-checkbox,
  227. .comment-form .form-select {
  228. margin-bottom: 10px;
  229. overflow: hidden;
  230. }
  231. .comment-form .form-type-checkbox,
  232. .comment-form .form-radios {
  233. margin-left: 120px; /* LTR */
  234. }
  235. [dir="rtl"] .comment-form .form-type-checkbox,
  236. [dir="rtl"] .comment-form .form-radios,
  237. [dir="rtl"] .comment-form .form-item .description {
  238. margin-left: 0;
  239. margin-right: 120px;
  240. }
  241. .comment-form .form-type-checkbox label,
  242. .comment-form .form-radios label {
  243. float: none;
  244. margin-top: 0;
  245. }
  246. .comment-form input.form-file {
  247. width: auto;
  248. }
  249. .layout-no-sidebars .comment-form .form-text {
  250. width: 800px;
  251. }
  252. .layout-one-sidebar .comment-form .form-text {
  253. width: 500px;
  254. }
  255. .layout-two-sidebars .comment-form .form-text {
  256. width: 320px;
  257. }
  258. .comment-form .form-item .description {
  259. font-size: 0.786em;
  260. line-height: 1.2;
  261. margin-left: 120px; /* LTR */
  262. }
  263. .comment-form .form-textarea {
  264. border-top-left-radius: 4px;
  265. border-top-right-radius: 4px;
  266. }
  267. .comment-form details.filter-wrapper .details-wrapper,
  268. .comment-form .text-format-wrapper .form-item {
  269. margin-top: 0;
  270. margin-bottom: 0;
  271. }
  272. .filter-wrapper label {
  273. width: auto;
  274. float: none;
  275. }
  276. .filter-wrapper .form-select {
  277. min-width: 120px;
  278. }
  279. .comment-form details.filter-wrapper .tips {
  280. font-size: 0.786em;
  281. }
  282. #comment-body-add-more-wrapper .form-type-textarea label {
  283. margin-bottom: 0.4em;
  284. }
  285. #edit-actions input {
  286. margin-right: 0.6em; /* LTR */
  287. }
  288. [dir="rtl"] #edit-actions input {
  289. margin-left: 0.6em;
  290. margin-right: 0;
  291. }
  292. /* Form error styles. */
  293. .form-item textarea.error + .cke {
  294. border: 2px solid red;
  295. }
  296. /* Form error message styles. */
  297. .form-item--error-message {
  298. color: #e32700;
  299. }
  300. /**
  301. * Improve form element usability on narrow devices.
  302. */
  303. @media all and (max-width: 600px) {
  304. .form-actions .button {
  305. float: none;
  306. margin: 10px 0 0;
  307. padding-bottom: 6px;
  308. width: 100%;
  309. display: block;
  310. box-sizing: border-box;
  311. -webkit-box-sizing: border-box;
  312. -moz-box-sizing: border-box;
  313. }
  314. .js .dropbutton .dropbutton-action > input,
  315. .js .dropbutton .dropbutton-action > a,
  316. .js .dropbutton .dropbutton-action > button {
  317. text-align: center;
  318. padding-left: 3em;
  319. }
  320. }