form.css 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. /**
  2. * Form elements.
  3. */
  4. form {
  5. margin: 0;
  6. padding: 0;
  7. }
  8. fieldset:not(.fieldgroup) {
  9. background-color: #fcfcfa;
  10. border-radius: 2px;
  11. margin: 1em 0;
  12. padding: 30px 18px 18px;
  13. min-width: 0;
  14. position: relative;
  15. }
  16. /**
  17. * We've temporarily added this Firefox specific rule here to fix fieldset
  18. * widths.
  19. * @todo remove once this Mozilla bug is fixed.
  20. * See https://bugzilla.mozilla.org/show_bug.cgi?id=504622
  21. */
  22. @media (min--moz-device-pixel-ratio: 0) {
  23. fieldset:not(.fieldgroup) {
  24. display: table-cell;
  25. }
  26. }
  27. fieldset:not(.fieldgroup) > legend {
  28. font-size: 1em;
  29. font-weight: bold;
  30. letter-spacing: 0.08em;
  31. position: absolute;
  32. text-transform: uppercase;
  33. top: 10px;
  34. }
  35. .fieldgroup {
  36. min-width: 0;
  37. }
  38. /**
  39. * We've temporarily added this Firefox specific rule here to fix fieldset
  40. * widths.
  41. * @todo remove once this Mozilla bug is fixed.
  42. * See https://bugzilla.mozilla.org/show_bug.cgi?id=504622
  43. */
  44. @media (min--moz-device-pixel-ratio: 0) {
  45. .fieldgroup {
  46. display: table-cell;
  47. }
  48. }
  49. .form-item {
  50. margin: 0.75em 0;
  51. }
  52. /**
  53. * When a table row has a single form item, prevent it from adding unnecessary
  54. * extra spacing. If it has multiple form items, allow spacing between them,
  55. * overriding Classy.
  56. */
  57. tr.odd .form-item,
  58. tr.even .form-item {
  59. margin-top: 0.75em;
  60. margin-bottom: 0.75em;
  61. }
  62. td > .form-item:only-child {
  63. margin-top: 0;
  64. margin-bottom: 0;
  65. }
  66. .form-type-checkbox {
  67. padding: 0;
  68. }
  69. label {
  70. display: table;
  71. margin: 0 0 0.1em;
  72. padding: 0;
  73. font-weight: bold;
  74. }
  75. label.error {
  76. color: #a51b00;
  77. }
  78. label[for] {
  79. cursor: pointer;
  80. }
  81. .form-item label.option {
  82. text-transform: none;
  83. }
  84. .form-item label.option input {
  85. vertical-align: middle;
  86. }
  87. .form-disabled label {
  88. color: #686868;
  89. }
  90. .form-disabled input.form-text,
  91. .form-disabled input.form-tel,
  92. .form-disabled input.form-email,
  93. .form-disabled input.form-url,
  94. .form-disabled input.form-search,
  95. .form-disabled input.form-number,
  96. .form-disabled input.form-color,
  97. .form-disabled input.form-file,
  98. .form-disabled textarea.form-textarea,
  99. .form-disabled select.form-select {
  100. border-color: #d4d4d4;
  101. background-color: hsla(0, 0%, 0%, 0.08);
  102. box-shadow: none;
  103. }
  104. .form-item input.error,
  105. .form-item textarea.error,
  106. .form-item select.error {
  107. border-width: 1px;
  108. border-color: #e62600;
  109. background-color: hsla(15, 75%, 97%, 1);
  110. box-shadow: inset 0 5px 5px -5px #b8b8b8;
  111. color: #a51b00;
  112. }
  113. .form-item textarea.error + .cke {
  114. border-width: 1px;
  115. border-color: #e62600;
  116. }
  117. .form-item input.error:focus,
  118. .form-item textarea.error:focus,
  119. .form-item select.error:focus {
  120. border-color: #e62600;
  121. outline: 0;
  122. box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 0 8px 1px #e62600;
  123. background-color: #fcf4f2;
  124. }
  125. .form-required:after {
  126. background-size: 7px 7px;
  127. width: 7px;
  128. height: 7px;
  129. }
  130. .form-item--error-message {
  131. margin-top: 0.15em;
  132. color: #e32700;
  133. }
  134. .fieldset-wrapper > .form-item--error-message {
  135. margin-top: 0;
  136. }
  137. .text-format-wrapper .form-item--error-message {
  138. border: solid #ccc;
  139. border-width: 0 1px;
  140. margin: 0;
  141. padding: 0.25em 0.666em 0;
  142. }
  143. /* Filter */
  144. ul.tips,
  145. div.description,
  146. .form-item .description {
  147. margin: 0.2em 0 0 0;
  148. color: #595959;
  149. font-size: 0.95em;
  150. }
  151. .form-item .description.error {
  152. margin-top: 0;
  153. color: #a51b00;
  154. }
  155. ul.tips li {
  156. margin: 0.25em 0 0.25em 1.5em; /* LTR */
  157. }
  158. [dir="rtl"] ul.tips li {
  159. margin: 0.25em 1.5em 0.25em 0;
  160. }
  161. .form-type-radio .description,
  162. .form-type-checkbox .description {
  163. margin-left: 1.5em; /* LTR */
  164. }
  165. [dir="rtl"] .form-type-radio .description,
  166. [dir="rtl"] .form-type-checkbox .description {
  167. margin-left: 0;
  168. margin-right: 1.5em;
  169. }
  170. .form-text,
  171. .form-textarea {
  172. border-radius: 2px;
  173. font-size: 1em;
  174. line-height: normal;
  175. }
  176. input.form-autocomplete,
  177. input.form-text,
  178. input.form-tel,
  179. input.form-email,
  180. input.form-url,
  181. input.form-search,
  182. input.form-number,
  183. input.form-color,
  184. input.form-file,
  185. input.form-date,
  186. input.form-time,
  187. textarea.form-textarea {
  188. box-sizing: border-box;
  189. padding: 0.3em 0.4em 0.3em 0.5em; /* LTR */
  190. max-width: 100%;
  191. border: 1px solid #b8b8b8;
  192. border-top-color: #999;
  193. border-radius: 2px;
  194. background: #fcfcfa;
  195. box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.125);
  196. font-size: 1em;
  197. color: #595959;
  198. -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
  199. transition: border linear 0.2s, box-shadow linear 0.2s;
  200. }
  201. [dir="rtl"] textarea.form-textarea {
  202. padding: 0.3em 0.5em 0.3em 0.4em;
  203. }
  204. .form-text:focus,
  205. .form-tel:focus,
  206. .form-email:focus,
  207. .form-url:focus,
  208. .form-search:focus,
  209. .form-number:focus,
  210. .form-color:focus,
  211. .form-file:focus,
  212. .form-textarea:focus,
  213. .form-date:focus,
  214. .form-time:focus {
  215. border-color: #40b6ff;
  216. outline: 0;
  217. box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 0 8px #40b6ff;
  218. background-color: #fff;
  219. }
  220. .confirm-parent,
  221. .password-parent {
  222. overflow: visible;
  223. width: auto;
  224. }
  225. .form-item-options-group-info-identifier,
  226. .form-item-pass .description {
  227. clear: both;
  228. }
  229. /**
  230. * Limits extra long instances of select elements to the max width allowed
  231. * to avoid breaking layouts.
  232. */
  233. select {
  234. max-width: 100%;
  235. }
  236. /**
  237. * Select elements - Webkit only
  238. */
  239. @media screen and (-webkit-min-device-pixel-ratio: 0) {
  240. select {
  241. cursor: pointer;
  242. -webkit-appearance: none;
  243. padding: 1px 1.571em 1px 0.5em; /* LTR */
  244. border: 1px solid #a6a6a6;
  245. border-radius: 0.143em;
  246. background:
  247. url(../../../../misc/icons/333333/caret-down.svg) no-repeat 99% 63%,
  248. -webkit-linear-gradient(top, #f6f6f3, #e7e7df); /* LTR */
  249. text-shadow: 0 1px hsla(0, 0%, 100%, 0.6);
  250. font-size: 0.875rem;
  251. -webkit-transition: all 0.1s;
  252. transition: all 0.1s;
  253. -webkit-font-smoothing: antialiased;
  254. }
  255. [dir="rtl"] select {
  256. padding: 1px 0.714em 1px 1.571em;
  257. background-position: 1% 63%, 0 0;
  258. }
  259. select:focus,
  260. select:hover {
  261. background-image:
  262. url(../../../../misc/icons/333333/caret-down.svg),
  263. -webkit-linear-gradient(top, #fcfcfa, #e9e9dd);
  264. color: #1a1a1a;
  265. }
  266. select:hover {
  267. box-shadow: 0 1px 2px hsla(0, 0%, 0%, 0.125);
  268. }
  269. }
  270. /**
  271. * Improve spacing of cancel link.
  272. */
  273. #edit-cancel {
  274. margin-left: 10px; /* LTR */
  275. }
  276. [dir="rtl"] #edit-cancel {
  277. margin-left: 0;
  278. margin-right: 10px;
  279. }
  280. /**
  281. * Improve form element usability on narrow devices.
  282. */
  283. @media screen and (max-width: 600px) {
  284. input.form-autocomplete,
  285. input.form-text,
  286. input.form-tel,
  287. input.form-email,
  288. input.form-url,
  289. input.form-search,
  290. input.form-number,
  291. input.form-color,
  292. input.form-file,
  293. textarea.form-textarea {
  294. width: 100%;
  295. font-size: 1.2em;
  296. line-height: 1.2em;
  297. }
  298. input.form-number {
  299. width: auto;
  300. }
  301. .form-actions input,
  302. .form-wrapper input[type="submit"] {
  303. float: none;
  304. margin-left: 0;
  305. margin-right: 0;
  306. margin-top: 10px;
  307. padding-bottom: 6px;
  308. width: 100%;
  309. }
  310. .form-actions input:first-child,
  311. .form-wrapper input[type="submit"]:first-child {
  312. margin-top: 0;
  313. }
  314. details summary {
  315. overflow: hidden;
  316. text-overflow: ellipsis;
  317. white-space: nowrap;
  318. box-sizing: border-box;
  319. }
  320. .password-strength {
  321. width: 100%;
  322. }
  323. div.form-item div.password-suggestions {
  324. float: none;
  325. }
  326. #dblog-filter-form .form-actions {
  327. float: none;
  328. padding: 0;
  329. }
  330. #edit-cancel {
  331. display: block;
  332. margin: 10px 0 0 0;
  333. }
  334. select {
  335. width: 100%;
  336. }
  337. }
  338. /* Exceptions */
  339. #diff-inline-form select,
  340. div.filter-options select {
  341. padding: 0;
  342. }