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.

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