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.

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