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.

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