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.

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