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.

555 lines
11 KiB

  1. /*
  2. * # Semantic - Form
  3. * http://github.com/jlukic/semantic-ui/
  4. *
  5. *
  6. * Copyright 2013 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. /*******************************
  12. Standard
  13. *******************************/
  14. /*--------------------
  15. Form
  16. ---------------------*/
  17. .ui.form {
  18. position: relative;
  19. max-width: 100%;
  20. }
  21. .ui.form :first-child {
  22. margin-top: 0em;
  23. }
  24. .ui.form :last-child {
  25. margin-bottom: 0em;
  26. }
  27. /*--------------------
  28. Content
  29. ---------------------*/
  30. .ui.form > p {
  31. margin: 1em 0;
  32. }
  33. /*--------------------
  34. Field
  35. ---------------------*/
  36. .ui.form .field {
  37. clear: both;
  38. margin: 0em 0em 1em;
  39. }
  40. /*--------------------
  41. Labels
  42. ---------------------*/
  43. .ui.form .field > label {
  44. margin: 0em 0em 0.3em;
  45. display: block;
  46. color: #555555;
  47. font-size: 0.875em;
  48. }
  49. /*--------------------
  50. Standard Inputs
  51. ---------------------*/
  52. .ui.form textarea,
  53. .ui.form select,
  54. .ui.form input[type="text"],
  55. .ui.form input[type="email"],
  56. .ui.form input[type="date"],
  57. .ui.form input[type="password"],
  58. .ui.form input[type="number"],
  59. .ui.form input[type="tel"],
  60. .ui.form .ui.input {
  61. width: 100%;
  62. }
  63. .ui.form textarea,
  64. .ui.form select,
  65. .ui.form input[type="text"],
  66. .ui.form input[type="email"],
  67. .ui.form input[type="date"],
  68. .ui.form input[type="password"],
  69. .ui.form input[type="number"],
  70. .ui.form input[type="tel"] {
  71. margin: 0em;
  72. padding: 0.85em 1.2em;
  73. font-size: 0.875em;
  74. background-color: #FFFFFF;
  75. border: 1px solid rgba(0, 0, 0, 0.15);
  76. outline: none;
  77. color: rgba(0, 0, 0, 0.7);
  78. border-radius: 0.3125em;
  79. -webkit-transition: background-color 0.3s ease-out, -webkit-box-shadow 0.2s ease, border-color 0.2s ease;
  80. transition: background-color 0.3s ease-out, box-shadow 0.2s ease, border-color 0.2s ease;
  81. -webkit-box-shadow: 0em 0em 0em 0em rgba(0, 0, 0, 0.3) inset;
  82. box-shadow: 0em 0em 0em 0em rgba(0, 0, 0, 0.3) inset;
  83. -webkit-appearance: none;
  84. -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
  85. -webkit-box-sizing: border-box;
  86. -moz-box-sizing: border-box;
  87. -ms-box-sizing: border-box;
  88. box-sizing: border-box;
  89. }
  90. .ui.textarea,
  91. .ui.form textarea {
  92. line-height: 1.33;
  93. min-height: 8em;
  94. height: 12em;
  95. max-height: 24em;
  96. resize: vertical;
  97. }
  98. .ui.form textarea,
  99. .ui.form input[type="checkbox"] {
  100. vertical-align: top;
  101. }
  102. /*--------------------
  103. Dividers
  104. ---------------------*/
  105. .ui.form .divider {
  106. clear: both;
  107. margin: 1em 0em;
  108. }
  109. /*--------------------
  110. Types of Messages
  111. ---------------------*/
  112. .ui.form .info.message,
  113. .ui.form .warning.message,
  114. .ui.form .error.message {
  115. display: none;
  116. }
  117. /* Assumptions */
  118. .ui.form .message:first-child {
  119. margin-top: 0px;
  120. }
  121. /*--------------------
  122. Validation Prompt
  123. ---------------------*/
  124. .ui.form .field .prompt.label {
  125. white-space: nowrap;
  126. }
  127. .ui.form .inline.field .prompt {
  128. margin-top: 0em;
  129. margin-right: 1em;
  130. }
  131. .ui.form .inline.field .prompt:before {
  132. margin-top: -0.3em;
  133. bottom: auto;
  134. left: auto;
  135. top: 50%;
  136. right: 0em;
  137. }
  138. /*******************************
  139. States
  140. *******************************/
  141. /*--------------------
  142. Focus
  143. ---------------------*/
  144. .ui.form input[type="text"]:focus,
  145. .ui.form input[type="email"]:focus,
  146. .ui.form input[type="date"]:focus,
  147. .ui.form input[type="password"]:focus,
  148. .ui.form input[type="number"]:focus,
  149. .ui.form input[type="tel"]:focus,
  150. .ui.form textarea:focus,
  151. .ui.form select:focus {
  152. color: rgba(0, 0, 0, 0.85);
  153. border-color: rgba(0, 0, 0, 0.2);
  154. border-bottom-right-radius: 0;
  155. border-top-right-radius: 0;
  156. -webkit-appearance: none;
  157. -webkit-box-shadow: 0.3em 0em 0em 0em rgba(0, 0, 0, 0.2) inset;
  158. box-shadow: 0.3em 0em 0em 0em rgba(0, 0, 0, 0.2) inset;
  159. }
  160. /*--------------------
  161. Error
  162. ---------------------*/
  163. /* On Form */
  164. .ui.form.warning .warning.message {
  165. display: block;
  166. }
  167. /*--------------------
  168. Warning
  169. ---------------------*/
  170. /* On Form */
  171. .ui.form.error .error.message {
  172. display: block;
  173. }
  174. /* On Field(s) */
  175. .ui.form .fields.error .field label,
  176. .ui.form .field.error label,
  177. .ui.form .fields.error .field .input,
  178. .ui.form .field.error .input {
  179. color: #D95C5C;
  180. }
  181. .ui.form .fields.error .field .corner.label,
  182. .ui.form .field.error .corner.label {
  183. border-color: #D95C5C;
  184. color: #FFFFFF;
  185. }
  186. .ui.form .fields.error .field textarea,
  187. .ui.form .fields.error .field input[type="text"],
  188. .ui.form .fields.error .field input[type="email"],
  189. .ui.form .fields.error .field input[type="date"],
  190. .ui.form .fields.error .field input[type="password"],
  191. .ui.form .fields.error .field input[type="number"],
  192. .ui.form .fields.error .field input[type="tel"],
  193. .ui.form .field.error textarea,
  194. .ui.form .field.error input[type="text"],
  195. .ui.form .field.error input[type="email"],
  196. .ui.form .field.error input[type="date"],
  197. .ui.form .field.error input[type="password"],
  198. .ui.form .field.error input[type="number"],
  199. .ui.form .field.error input[type="tel"] {
  200. background-color: #FFFAFA;
  201. border-color: #E7BEBE;
  202. border-right: none;
  203. color: #D95C5C;
  204. padding-right: 1.2em;
  205. border-bottom-right-radius: 0;
  206. border-top-right-radius: 0;
  207. -webkit-box-shadow: 0.3em 0em 0em 0em #D95C5C inset;
  208. box-shadow: 0.3em 0em 0em 0em #D95C5C inset;
  209. }
  210. .ui.form .field.error textarea:focus,
  211. .ui.form .field.error input[type="text"]:focus,
  212. .ui.form .field.error input[type="email"]:focus,
  213. .ui.form .field.error input[type="date"]:focus,
  214. .ui.form .field.error input[type="password"]:focus,
  215. .ui.form .field.error input[type="number"]:focus,
  216. .ui.form .field.error input[type="tel"]:focus {
  217. border-color: #ff5050;
  218. color: #ff5050;
  219. -webkit-appearance: none;
  220. -webkit-box-shadow: 0.3em 0em 0em 0em #FF5050 inset;
  221. box-shadow: 0.3em 0em 0em 0em #FF5050 inset;
  222. }
  223. /*--------------------
  224. Empty (Placeholder)
  225. ---------------------*/
  226. /* browsers require these rules separate */
  227. .ui.form ::-webkit-input-placeholder {
  228. color: #E0E0E0;
  229. }
  230. .ui.form ::-moz-placeholder {
  231. color: #E0E0E0;
  232. }
  233. .ui.form :focus::-webkit-input-placeholder {
  234. color: #AAAAAA;
  235. }
  236. .ui.form :focus::-moz-placeholder {
  237. color: #AAAAAA;
  238. }
  239. /* Error Placeholder */
  240. .ui.form .error ::-webkit-input-placeholder {
  241. color: rgba(255, 80, 80, 0.4);
  242. }
  243. .ui.form .error ::-moz-placeholder {
  244. color: rgba(255, 80, 80, 0.4);
  245. }
  246. .ui.form .error :focus::-webkit-input-placeholder {
  247. color: rgba(255, 80, 80, 0.7);
  248. }
  249. .ui.form .error :focus::-moz-placeholder {
  250. color: rgba(255, 80, 80, 0.7);
  251. }
  252. /*--------------------
  253. Disabled
  254. ---------------------*/
  255. .ui.form .field :disabled,
  256. .ui.form .field.disabled {
  257. opacity: 0.5;
  258. }
  259. .ui.form .field.disabled label {
  260. opacity: 0.5;
  261. }
  262. .ui.form .field.disabled :disabled {
  263. opacity: 1;
  264. }
  265. /*--------------------
  266. Loading State
  267. ---------------------*/
  268. /* On Form */
  269. .ui.form.loading {
  270. position: relative;
  271. }
  272. .ui.form.loading:after {
  273. position: absolute;
  274. top: 0%;
  275. right: 0%;
  276. content: '';
  277. width: 100%;
  278. height: 100%;
  279. background: rgba(255, 255, 255, 0.8) url(../images/loader-large.gif) no-repeat 50% 50%;
  280. visibility: visible;
  281. }
  282. /*******************************
  283. Variations
  284. *******************************/
  285. /*--------------------
  286. Fluid Width
  287. ---------------------*/
  288. .ui.form.fluid {
  289. width: 100%;
  290. -webkit-box-sizing: border-box;
  291. -moz-box-sizing: border-box;
  292. -ms-box-sizing: border-box;
  293. box-sizing: border-box;
  294. }
  295. /*--------------------------
  296. Input w/ attached Button
  297. ---------------------------*/
  298. .ui.form input.attached {
  299. width: auto;
  300. }
  301. /*--------------------
  302. Date Input
  303. ---------------------*/
  304. .ui.form .date.field > label {
  305. position: relative;
  306. }
  307. .ui.form .date.field > label:after {
  308. position: absolute;
  309. top: 2em;
  310. left: 0.5em;
  311. font-family: 'Icons';
  312. content: '\f133';
  313. font-size: 1.2em;
  314. font-weight: normal;
  315. color: #CCCCCC;
  316. }
  317. /*--------------------
  318. Inverted Colors
  319. ---------------------*/
  320. .ui.inverted.form label {
  321. color: #FFFFFF;
  322. }
  323. .ui.inverted.form .field.error textarea,
  324. .ui.inverted.form .field.error input[type="text"],
  325. .ui.inverted.form .field.error input[type="email"],
  326. .ui.inverted.form .field.error input[type="date"],
  327. .ui.inverted.form .field.error input[type="password"],
  328. .ui.inverted.form .field.error input[type="number"],
  329. .ui.inverted.form .field.error input[type="tel"] {
  330. background-color: #FFCCCC;
  331. }
  332. /*--------------------
  333. Field Groups
  334. ---------------------*/
  335. /* Grouped Vertically */
  336. .ui.form .grouped.fields {
  337. margin: 0em 0em 1em;
  338. }
  339. .ui.form .grouped.fields .field {
  340. display: block;
  341. float: none;
  342. margin: 0.5em 0em;
  343. padding: 0em;
  344. }
  345. /*--------------------
  346. Fields
  347. ---------------------*/
  348. /* Split fields */
  349. .ui.form .fields {
  350. clear: both;
  351. }
  352. .ui.form .fields:after {
  353. content: ' ';
  354. display: block;
  355. clear: both;
  356. visibility: hidden;
  357. line-height: 0;
  358. height: 0;
  359. }
  360. .ui.form .fields > .field {
  361. clear: none;
  362. float: right;
  363. -webkit-box-sizing: border-box;
  364. -moz-box-sizing: border-box;
  365. -ms-box-sizing: border-box;
  366. box-sizing: border-box;
  367. }
  368. .ui.form .fields > .field:first-child {
  369. border-right: none;
  370. -webkit-box-shadow: none;
  371. box-shadow: none;
  372. }
  373. /* Other Combinations */
  374. .ui.form .two.fields > .fields,
  375. .ui.form .two.fields > .field {
  376. width: 50%;
  377. padding-right: 1%;
  378. padding-left: 1%;
  379. }
  380. .ui.form .three.fields > .fields,
  381. .ui.form .three.fields > .field {
  382. width: 33.333%;
  383. padding-right: 1%;
  384. padding-left: 1%;
  385. }
  386. .ui.form .four.fields > .fields,
  387. .ui.form .four.fields > .field {
  388. width: 25%;
  389. padding-right: 1%;
  390. padding-left: 1%;
  391. }
  392. .ui.form .five.fields > .fields,
  393. .ui.form .five.fields > .field {
  394. width: 20%;
  395. padding-right: 1%;
  396. padding-left: 1%;
  397. }
  398. .ui.form .fields .field:first-child {
  399. padding-right: 0%;
  400. }
  401. .ui.form .fields .field:last-child {
  402. padding-left: 0%;
  403. }
  404. /*--------------------
  405. Inline Fields
  406. ---------------------*/
  407. .ui.form .inline.fields .field {
  408. min-height: 1.3em;
  409. margin-left: 0.5em;
  410. }
  411. .ui.form .inline.fields .field > label,
  412. .ui.form .inline.fields .field > p,
  413. .ui.form .inline.fields .field > input,
  414. .ui.form .inline.field > label,
  415. .ui.form .inline.field > p,
  416. .ui.form .inline.field > input {
  417. display: inline-block;
  418. width: auto;
  419. margin-top: 0em;
  420. margin-bottom: 0em;
  421. vertical-align: middle;
  422. font-size: 1em;
  423. }
  424. .ui.form .inline.fields .field > input,
  425. .ui.form .inline.field > input {
  426. font-size: 0.875em;
  427. }
  428. .ui.form .inline.fields .field > :first-child,
  429. .ui.form .inline.field > :first-child {
  430. margin: 0em 0em 0em 0.5em;
  431. }
  432. .ui.form .inline.fields .field > :only-child,
  433. .ui.form .inline.field > :only-child {
  434. margin: 0em;
  435. }
  436. /*--------------------
  437. Sizes
  438. ---------------------*/
  439. /* Standard */
  440. .ui.small.form {
  441. font-size: 0.875em;
  442. }
  443. .ui.small.form textarea,
  444. .ui.small.form input[type="text"],
  445. .ui.small.form input[type="email"],
  446. .ui.small.form input[type="date"],
  447. .ui.small.form input[type="password"],
  448. .ui.small.form input[type="number"],
  449. .ui.small.form input[type="tel"],
  450. .ui.small.form label,
  451. .ui.small.form select {
  452. font-size: 1em;
  453. }
  454. /* Large */
  455. .ui.large.form {
  456. font-size: 1.125em;
  457. }