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.

581 lines
12 KiB

11 years ago
11 years ago
11 years ago
11 years ago
  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="url"],
  59. .ui.form input[type="tel"],
  60. .ui.form .ui.input {
  61. width: 100%;
  62. }
  63. .ui.form textarea,
  64. .ui.form input[type="text"],
  65. .ui.form input[type="email"],
  66. .ui.form input[type="date"],
  67. .ui.form input[type="password"],
  68. .ui.form input[type="number"],
  69. .ui.form input[type="url"],
  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-right: 1em;
  156. }
  157. .ui.form .inline.field .prompt:before {
  158. margin-top: -0.3em;
  159. bottom: auto;
  160. left: auto;
  161. top: 50%;
  162. right: 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="url"]:focus,
  176. .ui.form input[type="tel"]:focus,
  177. .ui.form textarea:focus{
  178. color: rgba(0, 0, 0, 0.85);
  179. border-color: rgba(0, 0, 0, 0.2);
  180. border-bottom-right-radius: 0;
  181. border-top-right-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="url"],
  220. .ui.form .fields.error .field input[type="tel"],
  221. .ui.form .field.error textarea,
  222. .ui.form .field.error input[type="text"],
  223. .ui.form .field.error input[type="email"],
  224. .ui.form .field.error input[type="date"],
  225. .ui.form .field.error input[type="password"],
  226. .ui.form .field.error input[type="number"],
  227. .ui.form .field.error input[type="url"],
  228. .ui.form .field.error input[type="tel"] {
  229. background-color: #FFFAFA;
  230. border-color: #E7BEBE;
  231. border-right: none;
  232. color: #D95C5C;
  233. padding-right: 1.2em;
  234. border-bottom-right-radius: 0;
  235. border-top-right-radius: 0;
  236. -webkit-box-shadow: 0.3em 0em 0em 0em #D95C5C inset;
  237. -moz-box-shadow: 0.3em 0em 0em 0em #D95C5C inset;
  238. box-shadow: 0.3em 0em 0em 0em #D95C5C inset;
  239. }
  240. .ui.form .field.error textarea:focus,
  241. .ui.form .field.error input[type="text"]:focus,
  242. .ui.form .field.error input[type="email"]:focus,
  243. .ui.form .field.error input[type="date"]:focus,
  244. .ui.form .field.error input[type="password"]:focus,
  245. .ui.form .field.error input[type="number"]:focus,
  246. .ui.form .field.error input[type="url"]:focus,
  247. .ui.form .field.error input[type="tel"]:focus{
  248. border-color: rgba(255, 80, 80, 1);
  249. color: rgba(255, 80, 80, 1);
  250. -webkit-appearance: none;
  251. -webkit-box-shadow: 0.3em 0em 0em 0em #FF5050 inset;
  252. -moz-box-shadow: 0.3em 0em 0em 0em #FF5050 inset;
  253. box-shadow: 0.3em 0em 0em 0em #FF5050 inset;
  254. }
  255. /*--------------------
  256. Empty (Placeholder)
  257. ---------------------*/
  258. /* browsers require these rules separate */
  259. .ui.form ::-webkit-input-placeholder {
  260. color: #AAAAAA;
  261. }
  262. .ui.form ::-moz-placeholder {
  263. color: #AAAAAA;
  264. }
  265. .ui.form :focus::-webkit-input-placeholder {
  266. color: #999999;
  267. }
  268. .ui.form :focus::-moz-placeholder {
  269. color: #999999;
  270. }
  271. /* Error Placeholder */
  272. .ui.form .error ::-webkit-input-placeholder {
  273. color: rgba(255, 80, 80, 0.4);
  274. }
  275. .ui.form .error ::-moz-placeholder {
  276. color: rgba(255, 80, 80, 0.4);
  277. }
  278. .ui.form .error :focus::-webkit-input-placeholder {
  279. color: rgba(255, 80, 80, 0.7);
  280. }
  281. .ui.form .error :focus::-moz-placeholder {
  282. color: rgba(255, 80, 80, 0.7);
  283. }
  284. /*--------------------
  285. Disabled
  286. ---------------------*/
  287. .ui.form .field :disabled,
  288. .ui.form .field.disabled {
  289. opacity: 0.5;
  290. }
  291. .ui.form .field.disabled label {
  292. opacity: 0.5;
  293. }
  294. .ui.form .field.disabled :disabled {
  295. opacity: 1;
  296. }
  297. /*--------------------
  298. Loading State
  299. ---------------------*/
  300. /* On Form */
  301. .ui.form.loading {
  302. position: relative;
  303. }
  304. .ui.form.loading:after {
  305. position: absolute;
  306. top: 0%;
  307. right: 0%;
  308. content: '';
  309. width: 100%;
  310. height: 100%;
  311. background: rgba(255, 255, 255, 0.8) url(../images/loader-large.gif) no-repeat 50% 50%;
  312. visibility: visible;
  313. }
  314. /*******************************
  315. Variations
  316. *******************************/
  317. /*--------------------
  318. Fluid Width
  319. ---------------------*/
  320. .ui.form.fluid {
  321. width: 100%;
  322. -webkit-box-sizing: border-box;
  323. -moz-box-sizing: border-box;
  324. -ms-box-sizing: border-box;
  325. box-sizing: border-box;
  326. }
  327. /*--------------------------
  328. Input w/ attached Button
  329. ---------------------------*/
  330. .ui.form input.attached {
  331. width: auto;
  332. }
  333. /*--------------------
  334. Date Input
  335. ---------------------*/
  336. .ui.form .date.field > label {
  337. position: relative;
  338. }
  339. .ui.form .date.field > label:after {
  340. position: absolute;
  341. top: 2em;
  342. left: 0.5em;
  343. font-family: 'Icons';
  344. content: '\f133';
  345. font-size: 1.2em;
  346. font-weight: normal;
  347. color: #CCCCCC;
  348. }
  349. /*--------------------
  350. Inverted Colors
  351. ---------------------*/
  352. .ui.inverted.form label {
  353. color: #FFFFFF;
  354. }
  355. .ui.inverted.form .field.error textarea,
  356. .ui.inverted.form .field.error input[type="text"],
  357. .ui.inverted.form .field.error input[type="email"],
  358. .ui.inverted.form .field.error input[type="date"],
  359. .ui.inverted.form .field.error input[type="password"],
  360. .ui.inverted.form .field.error input[type="number"],
  361. .ui.inverted.form .field.error input[type="url"],
  362. .ui.inverted.form .field.error input[type="tel"]{
  363. background-color: #FFCCCC;
  364. }
  365. /*--------------------
  366. Field Groups
  367. ---------------------*/
  368. /* Grouped Vertically */
  369. .ui.form .grouped.fields {
  370. margin: 0em 0em 1em;
  371. }
  372. .ui.form .grouped.fields .field {
  373. display: block;
  374. float: none;
  375. margin: 0.5em 0em;
  376. padding: 0em;
  377. }
  378. /*--------------------
  379. Fields
  380. ---------------------*/
  381. /* Split fields */
  382. .ui.form .fields {
  383. clear: both;
  384. }
  385. .ui.form .fields:after {
  386. content: ' ';
  387. display: block;
  388. clear: both;
  389. visibility: hidden;
  390. line-height: 0;
  391. height: 0;
  392. }
  393. .ui.form .fields > .field {
  394. clear: none;
  395. float: right;
  396. -webkit-box-sizing: border-box;
  397. -moz-box-sizing: border-box;
  398. -ms-box-sizing: border-box;
  399. box-sizing: border-box;
  400. }
  401. .ui.form .fields > .field:first-child {
  402. border-right: none;
  403. box-shadow: none;
  404. }
  405. /* Other Combinations */
  406. .ui.form .two.fields > .fields,
  407. .ui.form .two.fields > .field {
  408. width: 50%;
  409. padding-right: 1%;
  410. padding-left: 1%;
  411. }
  412. .ui.form .three.fields > .fields,
  413. .ui.form .three.fields > .field {
  414. width: 33.333%;
  415. padding-right: 1%;
  416. padding-left: 1%;
  417. }
  418. .ui.form .four.fields > .fields,
  419. .ui.form .four.fields > .field {
  420. width: 25%;
  421. padding-right: 1%;
  422. padding-left: 1%;
  423. }
  424. .ui.form .five.fields > .fields,
  425. .ui.form .five.fields > .field {
  426. width: 20%;
  427. padding-right: 1%;
  428. padding-left: 1%;
  429. }
  430. .ui.form .fields .field:first-child {
  431. padding-right: 0%;
  432. }
  433. .ui.form .fields .field:last-child {
  434. padding-left: 0%;
  435. }
  436. /*--------------------
  437. Inline Fields
  438. ---------------------*/
  439. .ui.form .inline.fields .field {
  440. min-height: 1.3em;
  441. margin-left: 0.5em;
  442. }
  443. .ui.form .inline.fields .field > label,
  444. .ui.form .inline.fields .field > p,
  445. .ui.form .inline.fields .field > input,
  446. .ui.form .inline.field > label,
  447. .ui.form .inline.field > p,
  448. .ui.form .inline.field > input {
  449. display: inline-block;
  450. width: auto;
  451. margin-top: 0em;
  452. margin-bottom: 0em;
  453. vertical-align: middle;
  454. font-size: 1em;
  455. }
  456. .ui.form .inline.fields .field > input,
  457. .ui.form .inline.field > input {
  458. font-size: 0.875em;
  459. }
  460. .ui.form .inline.fields .field > :first-child,
  461. .ui.form .inline.field > :first-child {
  462. margin: 0em 0em 0em 0.5em;
  463. }
  464. .ui.form .inline.fields .field > :only-child,
  465. .ui.form .inline.field > :only-child {
  466. margin: 0em;
  467. }
  468. /*--------------------
  469. Sizes
  470. ---------------------*/
  471. /* Standard */
  472. .ui.small.form {
  473. font-size: 0.875em;
  474. }
  475. .ui.small.form textarea,
  476. .ui.small.form input[type="text"],
  477. .ui.small.form input[type="email"],
  478. .ui.small.form input[type="date"],
  479. .ui.small.form input[type="password"],
  480. .ui.small.form input[type="number"],
  481. .ui.small.form input[type="url"],
  482. .ui.small.form input[type="tel"],
  483. .ui.small.form label{
  484. font-size: 1em;
  485. }
  486. /* Large */
  487. .ui.large.form {
  488. font-size: 1.125em;
  489. }