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.

381 lines
8.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. 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.3);
  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.3) inset;
  129. -moz-box-shadow: 0.3em 0em 0em 0em rgba(0, 0, 0, 0.3) inset;
  130. box-shadow: 0.3em 0em 0em 0em rgba(0, 0, 0, 0.3) 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 :disabled {
  219. opacity: 1;
  220. }
  221. /*--------------------
  222. Loading State
  223. ---------------------*/
  224. /* On Form */
  225. .ui.form.loading {
  226. position: relative;
  227. }
  228. .ui.form.loading:after {
  229. position: absolute;
  230. top: 0%;
  231. left: 0%;
  232. content: '';
  233. width: 100%;
  234. height: 100%;
  235. background: rgba(255, 255, 255, 0.8) url(../images/throbber-large.gif) no-repeat 50% 50%;
  236. }
  237. /*******************************
  238. Variations
  239. *******************************/
  240. /*--------------------
  241. Fluid Width
  242. ---------------------*/
  243. .ui.form.fluid {
  244. width: 100%;
  245. -webkit-box-sizing: border-box;
  246. -moz-box-sizing: border-box;
  247. -ms-box-sizing: border-box;
  248. box-sizing: border-box;
  249. }
  250. /*--------------------------
  251. Input w/ attached Button
  252. ---------------------------*/
  253. .ui.form input.attached {
  254. width: auto;
  255. }
  256. /*--------------------
  257. Date Input
  258. ---------------------*/
  259. .ui.form .date.field > label {
  260. position: relative;
  261. }
  262. .ui.form .date.field > label:after {
  263. position: absolute;
  264. top: 1.2em;
  265. right: 0.4em;
  266. font-family: 'Icons';
  267. content: '📅';
  268. /* '\1f4c5' */
  269. font-size: 1.5em;
  270. font-weight: normal;
  271. color: #CCCCCC;
  272. }
  273. /*--------------------
  274. Inverted Colors
  275. ---------------------*/
  276. .ui.inverted.form label {
  277. color: #FFFFFF;
  278. }
  279. .ui.inverted.form .field.error textarea,
  280. .ui.inverted.form .field.error input[type="text"] {
  281. background-color: #FFCCCC;
  282. }
  283. /*--------------------
  284. Field Groups
  285. ---------------------*/
  286. /* Split fields */
  287. .ui.form .fields {
  288. clear: both;
  289. }
  290. .ui.form .fields:after {
  291. content: ' ';
  292. display: block;
  293. clear: both;
  294. visibility: hidden;
  295. line-height: 0;
  296. height: 0;
  297. }
  298. .ui.form .fields .field {
  299. clear: none;
  300. float: left;
  301. -webkit-box-sizing: border-box;
  302. -moz-box-sizing: border-box;
  303. -ms-box-sizing: border-box;
  304. box-sizing: border-box;
  305. }
  306. .ui.form .fields .field:first-child {
  307. border-left: none;
  308. box-shadow: none;
  309. }
  310. /* Other Combinations */
  311. .ui.form .fields .field,
  312. .ui.form .two.fields .field {
  313. width: 50%;
  314. padding-left: 1%;
  315. padding-right: 1%;
  316. }
  317. .ui.form .three.fields .field {
  318. width: 33.333%;
  319. padding-left: 1%;
  320. padding-right: 1%;
  321. }
  322. .ui.form .four.fields .field {
  323. width: 25%;
  324. padding-left: 1%;
  325. padding-right: 1%;
  326. }
  327. .ui.form .five.fields .field {
  328. width: 20%;
  329. padding-left: 1%;
  330. padding-right: 1%;
  331. }
  332. /* override sides, ie8 no last-child */
  333. .ui.form .fields .field:first-child {
  334. padding-left: 0%;
  335. }
  336. .ui.form .fields .field:last-child {
  337. padding-right: 0%;
  338. }
  339. /*--------------------
  340. Inline Fields
  341. ---------------------*/
  342. .ui.form .inline.fields .field > label,
  343. .ui.form .inline.fields .field > p,
  344. .ui.form .inline.fields .field > input,
  345. .ui.form .inline.fields .field > select,
  346. .ui.form .inline.field > label,
  347. .ui.form .inline.field > p,
  348. .ui.form .inline.field > input,
  349. .ui.form .inline.field > select {
  350. display: inline-block;
  351. width: auto;
  352. margin-top: 0em;
  353. margin-bottom: 0em;
  354. vertical-align: middle;
  355. font-size: 1em;
  356. }
  357. .ui.form .inline.fields .field > :first-child,
  358. .ui.form .inline.field > :first-child {
  359. margin: 0em 0.5em 0em 0em;
  360. }
  361. /*--------------------
  362. Sizes
  363. ---------------------*/
  364. /* Standard */
  365. .ui.small.form {
  366. font-size: 0.875em;
  367. }
  368. .ui.small.form textarea,
  369. .ui.small.form input[type="text"],
  370. .ui.small.form input[type="password"],
  371. .ui.small.form label {
  372. font-size: 1em;
  373. }
  374. /* Large */
  375. .ui.large.form {
  376. font-size: 1.125em;
  377. }
  378. .ui.large.form label {
  379. font-weight: bold;
  380. }