form.css

Same filename in this branch
  1. 8.9.x core/profiles/demo_umami/themes/umami/css/classy/components/form.css
  2. 8.9.x core/themes/seven/css/components/form.css
  3. 8.9.x core/themes/seven/css/classy/components/form.css
  4. 8.9.x core/themes/claro/css/components/form.css
  5. 8.9.x core/themes/bartik/css/classy/components/form.css
  6. 8.9.x core/themes/classy/css/components/form.css
Same filename in other branches
  1. 9 core/profiles/demo_umami/themes/umami/css/classy/components/form.css
  2. 9 core/themes/olivero/css/components/form.css
  3. 9 core/themes/seven/css/components/form.css
  4. 9 core/themes/seven/css/classy/components/form.css
  5. 9 core/themes/claro/css/components/form.css
  6. 9 core/themes/bartik/css/components/form.css
  7. 9 core/themes/bartik/css/classy/components/form.css
  8. 9 core/themes/starterkit_theme/css/components/form.css
  9. 9 core/themes/classy/css/components/form.css
  10. 10 core/profiles/demo_umami/themes/umami/css/components/forms/form.css
  11. 10 core/misc/dialog/off-canvas/css/form.css
  12. 10 core/themes/olivero/css/components/form.css
  13. 10 core/themes/claro/css/components/form.css
  14. 10 core/themes/starterkit_theme/css/components/form.css
  15. 11.x core/profiles/demo_umami/themes/umami/css/components/forms/form.css
  16. 11.x core/misc/dialog/off-canvas/css/form.css
  17. 11.x core/themes/olivero/css/components/form.css
  18. 11.x core/themes/claro/css/components/form.css
  19. 11.x core/themes/starterkit_theme/css/components/form.css

Visual styles for Bartik's forms.

File

core/themes/bartik/css/components/form.css

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.