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.

426 lines
9.7 KiB

  1. /*
  2. * # Semantic Form
  3. * http://github.com/quirkyinc/semantic
  4. *
  5. *
  6. * Copyright 2013 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. * Released: April 22 2013
  11. */
  12. /*******************************
  13. Standard
  14. *******************************/
  15. /*--------------------
  16. Form
  17. ---------------------*/
  18. .ui.form {
  19. position: relative;
  20. max-width: 100%;
  21. }
  22. .ui.form :first-child {
  23. margin-top: 0em;
  24. }
  25. .ui.form :last-child {
  26. margin-bottom: 0em;
  27. }
  28. /*--------------------
  29. Content
  30. ---------------------*/
  31. .ui.form > p {
  32. margin: 1em 0;
  33. }
  34. /*--------------------
  35. Field
  36. ---------------------*/
  37. .ui.form .field {
  38. clear: both;
  39. margin: 0em 0em 1em;
  40. }
  41. /*--------------------
  42. Labels
  43. ---------------------*/
  44. .ui.form .field > label {
  45. margin: 0em 0em 0.3em;
  46. display: block;
  47. color: #555555;
  48. font-size: 0.875em;
  49. }
  50. /*--------------------
  51. Standard Inputs
  52. ---------------------*/
  53. .ui.form textarea,
  54. .ui.form input[type="text"],
  55. .ui.form input[type="date"],
  56. .ui.form input[type="password"],
  57. .ui.form .ui.input {
  58. width: 100%;
  59. }
  60. .ui.form textarea,
  61. .ui.form input[type="text"],
  62. .ui.form input[type="date"],
  63. .ui.form input[type="password"] {
  64. margin: 0em;
  65. padding: 0.85em 1.2em;
  66. font-size: 0.875em;
  67. background-color: #FFFFFF;
  68. border: 1px solid rgba(0, 0, 0, 0.15);
  69. outline: none;
  70. color: rgba(0, 0, 0, 0.7);
  71. -webkit-border-radius: 0.3125em;
  72. -moz-border-radius: 0.3125em;
  73. border-radius: 0.3125em;
  74. -webkit-transition: background-color 0.3s ease-out, box-shadow 0.2s ease, border-color 0.2s ease;
  75. -moz-transition: background-color 0.3s ease-out, box-shadow 0.2s ease, border-color 0.2s ease;
  76. -o-transition: background-color 0.3s ease-out, box-shadow 0.2s ease, border-color 0.2s ease;
  77. -ms-transition: background-color 0.3s ease-out, box-shadow 0.2s ease, border-color 0.2s ease;
  78. transition: background-color 0.3s ease-out, box-shadow 0.2s ease, border-color 0.2s ease;
  79. -webkit-box-shadow: 0em 0em 0em 0em rgba(0, 0, 0, 0.3) inset;
  80. -moz-box-shadow: 0em 0em 0em 0em rgba(0, 0, 0, 0.3) inset;
  81. box-shadow: 0em 0em 0em 0em rgba(0, 0, 0, 0.3) inset;
  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-box-shadow: 0.3em 0em 0em 0em rgba(0, 0, 0, 0.2) inset;
  153. -moz-box-shadow: 0.3em 0em 0em 0em rgba(0, 0, 0, 0.2) inset;
  154. box-shadow: 0.3em 0em 0em 0em rgba(0, 0, 0, 0.2) inset;
  155. }
  156. /*--------------------
  157. Error
  158. ---------------------*/
  159. /* On Form */
  160. .ui.form.warning .warning.message {
  161. display: block;
  162. }
  163. /*--------------------
  164. Warning
  165. ---------------------*/
  166. /* On Form */
  167. .ui.form.error .error.message {
  168. display: block;
  169. }
  170. /* On Field(s) */
  171. .ui.form .fields.error .field label,
  172. .ui.form .field.error label {
  173. color: #EF4D6D;
  174. }
  175. .ui.form .fields.error .field textarea,
  176. .ui.form .fields.error .field input[type="text"],
  177. .ui.form .fields.error .field input[type="date"],
  178. .ui.form .fields.error .field input[type="password"],
  179. .ui.form .field.error textarea,
  180. .ui.form .field.error input[type="text"],
  181. .ui.form .field.error input[type="date"],
  182. .ui.form .field.error input[type="password"] {
  183. background-color: #FFFAFA;
  184. border-color: #E7BEBE;
  185. border-left: none;
  186. color: #EF4D6D;
  187. padding-left: 1.2em;
  188. border-bottom-left-radius: 0;
  189. border-top-left-radius: 0;
  190. -webkit-box-shadow: 0.3em 0em 0em 0em #EF4D6D inset;
  191. -moz-box-shadow: 0.3em 0em 0em 0em #EF4D6D inset;
  192. box-shadow: 0.3em 0em 0em 0em #EF4D6D inset;
  193. }
  194. .ui.form .field.error textarea:focus,
  195. .ui.form .field.error input[type="text"]:focus,
  196. .ui.form .field.error input[type="password"]:focus {
  197. border-color: #ff5050;
  198. color: #ff5050;
  199. -webkit-box-shadow: 0.3em 0em 0em 0em #FF5050 inset;
  200. -moz-box-shadow: 0.3em 0em 0em 0em #FF5050 inset;
  201. box-shadow: 0.3em 0em 0em 0em #FF5050 inset;
  202. }
  203. /*--------------------
  204. Empty (Placeholder)
  205. ---------------------*/
  206. /* browsers require these rules separate */
  207. .ui.form ::-webkit-input-placeholder {
  208. color: #E0E0E0;
  209. }
  210. .ui.form ::-moz-placeholder {
  211. color: #E0E0E0;
  212. }
  213. .ui.form :focus::-webkit-input-placeholder {
  214. color: #AAAAAA;
  215. }
  216. .ui.form :focus::-moz-placeholder {
  217. color: #AAAAAA;
  218. }
  219. /* Error Placeholder */
  220. .ui.form .error ::-webkit-input-placeholder {
  221. color: rgba(255, 80, 80, 0.4);
  222. }
  223. .ui.form .error ::-moz-placeholder {
  224. color: rgba(255, 80, 80, 0.4);
  225. }
  226. .ui.form .error :focus::-webkit-input-placeholder {
  227. color: rgba(255, 80, 80, 0.7);
  228. }
  229. .ui.form .error :focus::-moz-placeholder {
  230. color: rgba(255, 80, 80, 0.7);
  231. }
  232. /*--------------------
  233. Disabled
  234. ---------------------*/
  235. .ui.form .field :disabled,
  236. .ui.form .field.disabled {
  237. opacity: 0.5;
  238. }
  239. .ui.form .field.disabled label {
  240. opacity: 0.5;
  241. }
  242. .ui.form .field.disabled :disabled {
  243. opacity: 1;
  244. }
  245. /*--------------------
  246. Loading State
  247. ---------------------*/
  248. /* On Form */
  249. .ui.form.loading {
  250. position: relative;
  251. }
  252. .ui.form.loading:after {
  253. position: absolute;
  254. top: 0%;
  255. left: 0%;
  256. content: '';
  257. width: 100%;
  258. height: 100%;
  259. background: rgba(255, 255, 255, 0.8) url(../images/loader-large.gif) no-repeat 50% 50%;
  260. visibility: visible;
  261. }
  262. /*******************************
  263. Variations
  264. *******************************/
  265. /*--------------------
  266. Fluid Width
  267. ---------------------*/
  268. .ui.form.fluid {
  269. width: 100%;
  270. -webkit-box-sizing: border-box;
  271. -moz-box-sizing: border-box;
  272. -ms-box-sizing: border-box;
  273. box-sizing: border-box;
  274. }
  275. /*--------------------------
  276. Input w/ attached Button
  277. ---------------------------*/
  278. .ui.form input.attached {
  279. width: auto;
  280. }
  281. /*--------------------
  282. Date Input
  283. ---------------------*/
  284. .ui.form .date.field > label {
  285. position: relative;
  286. }
  287. .ui.form .date.field > label:after {
  288. position: absolute;
  289. top: 1.4em;
  290. right: 0.5em;
  291. font-family: 'Icons';
  292. content: '📅';
  293. /* '\1f4c5' */
  294. font-size: 1.5em;
  295. font-weight: normal;
  296. color: #CCCCCC;
  297. }
  298. /*--------------------
  299. Inverted Colors
  300. ---------------------*/
  301. .ui.inverted.form label {
  302. color: #FFFFFF;
  303. }
  304. .ui.inverted.form .field.error textarea,
  305. .ui.inverted.form .field.error input[type="text"] {
  306. background-color: #FFCCCC;
  307. }
  308. /*--------------------
  309. Field Groups
  310. ---------------------*/
  311. /* Grouped Vertically */
  312. .ui.form .grouped.fields {
  313. margin: 0em 0em 1em;
  314. }
  315. .ui.form .grouped.fields .field {
  316. display: block;
  317. float: none;
  318. margin: 0.5em 0em;
  319. padding: 0em;
  320. }
  321. /*--------------------
  322. Fields
  323. ---------------------*/
  324. /* Split fields */
  325. .ui.form .fields {
  326. clear: both;
  327. }
  328. .ui.form .fields:after {
  329. content: ' ';
  330. display: block;
  331. clear: both;
  332. visibility: hidden;
  333. line-height: 0;
  334. height: 0;
  335. }
  336. .ui.form .fields .field {
  337. clear: none;
  338. float: left;
  339. -webkit-box-sizing: border-box;
  340. -moz-box-sizing: border-box;
  341. -ms-box-sizing: border-box;
  342. box-sizing: border-box;
  343. }
  344. .ui.form .fields .field:first-child {
  345. border-left: none;
  346. box-shadow: none;
  347. }
  348. /* Other Combinations */
  349. .ui.form .two.fields .field {
  350. width: 50%;
  351. padding-left: 1%;
  352. padding-right: 1%;
  353. }
  354. .ui.form .three.fields .field {
  355. width: 33.333%;
  356. padding-left: 1%;
  357. padding-right: 1%;
  358. }
  359. .ui.form .four.fields .field {
  360. width: 25%;
  361. padding-left: 1%;
  362. padding-right: 1%;
  363. }
  364. .ui.form .five.fields .field {
  365. width: 20%;
  366. padding-left: 1%;
  367. padding-right: 1%;
  368. }
  369. /* override sides, ie8 no last-child */
  370. .ui.form .fields .field:first-child {
  371. padding-left: 0%;
  372. }
  373. .ui.form .fields .field:last-child {
  374. padding-right: 0%;
  375. }
  376. /*--------------------
  377. Inline Fields
  378. ---------------------*/
  379. .ui.form .inline.fields .field {
  380. margin-right: 0.5em;
  381. }
  382. .ui.form .inline.fields .field > label,
  383. .ui.form .inline.fields .field > p,
  384. .ui.form .inline.fields .field > input,
  385. .ui.form .inline.fields .field > select,
  386. .ui.form .inline.field > label,
  387. .ui.form .inline.field > p,
  388. .ui.form .inline.field > input,
  389. .ui.form .inline.field > select {
  390. display: inline-block;
  391. width: auto;
  392. margin-top: 0em;
  393. margin-bottom: 0em;
  394. vertical-align: middle;
  395. font-size: 1em;
  396. }
  397. .ui.form .inline.fields .field > input,
  398. .ui.form .inline.field > input {
  399. font-size: 0.875em;
  400. }
  401. .ui.form .inline.fields .field > :first-child,
  402. .ui.form .inline.field > :first-child {
  403. margin: 0em 0.5em 0em 0em;
  404. }
  405. .ui.form .inline.fields .field > :only-child,
  406. .ui.form .inline.field > :only-child {
  407. margin: 0em;
  408. }
  409. /*--------------------
  410. Sizes
  411. ---------------------*/
  412. /* Standard */
  413. .ui.small.form {
  414. font-size: 0.875em;
  415. }
  416. .ui.small.form textarea,
  417. .ui.small.form input[type="text"],
  418. .ui.small.form input[type="password"],
  419. .ui.small.form label {
  420. font-size: 1em;
  421. }
  422. /* Large */
  423. .ui.large.form {
  424. font-size: 1.125em;
  425. }