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.

363 lines
7.7 KiB

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