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.

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