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.

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