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.

388 lines
8.9 KiB

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