form.css 6.9 KB

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