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.

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