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.

384 lines
10 KiB

9 years ago
  1. /*!
  2. Pure v0.6.0
  3. Copyright 2014 Yahoo! Inc. All rights reserved.
  4. Licensed under the BSD License.
  5. https://github.com/yahoo/pure/blob/master/LICENSE.md
  6. */
  7. /*csslint box-model:false*/
  8. /*
  9. Box-model set to false because we're setting a height on select elements, which
  10. also have border and padding. This is done because some browsers don't render
  11. the padding. We explicitly set the box-model for select elements to border-box,
  12. so we can ignore the csslint warning.
  13. */
  14. .pure-form input[type="text"],
  15. .pure-form input[type="password"],
  16. .pure-form input[type="email"],
  17. .pure-form input[type="url"],
  18. .pure-form input[type="date"],
  19. .pure-form input[type="month"],
  20. .pure-form input[type="time"],
  21. .pure-form input[type="datetime"],
  22. .pure-form input[type="datetime-local"],
  23. .pure-form input[type="week"],
  24. .pure-form input[type="number"],
  25. .pure-form input[type="search"],
  26. .pure-form input[type="tel"],
  27. .pure-form input[type="color"],
  28. .pure-form select,
  29. .pure-form textarea {
  30. padding: 0.5em 0.6em;
  31. display: inline-block;
  32. border: 1px solid #ccc;
  33. box-shadow: inset 0 1px 3px #ddd;
  34. border-radius: 4px;
  35. vertical-align: middle;
  36. -webkit-box-sizing: border-box;
  37. -moz-box-sizing: border-box;
  38. box-sizing: border-box;
  39. }
  40. /*
  41. Need to separate out the :not() selector from the rest of the CSS 2.1 selectors
  42. since IE8 won't execute CSS that contains a CSS3 selector.
  43. */
  44. .pure-form input:not([type]) {
  45. padding: 0.5em 0.6em;
  46. display: inline-block;
  47. border: 1px solid #ccc;
  48. box-shadow: inset 0 1px 3px #ddd;
  49. border-radius: 4px;
  50. -webkit-box-sizing: border-box;
  51. -moz-box-sizing: border-box;
  52. box-sizing: border-box;
  53. }
  54. /* Chrome (as of v.32/34 on OS X) needs additional room for color to display. */
  55. /* May be able to remove this tweak as color inputs become more standardized across browsers. */
  56. .pure-form input[type="color"] {
  57. padding: 0.2em 0.5em;
  58. }
  59. .pure-form input[type="text"]:focus,
  60. .pure-form input[type="password"]:focus,
  61. .pure-form input[type="email"]:focus,
  62. .pure-form input[type="url"]:focus,
  63. .pure-form input[type="date"]:focus,
  64. .pure-form input[type="month"]:focus,
  65. .pure-form input[type="time"]:focus,
  66. .pure-form input[type="datetime"]:focus,
  67. .pure-form input[type="datetime-local"]:focus,
  68. .pure-form input[type="week"]:focus,
  69. .pure-form input[type="number"]:focus,
  70. .pure-form input[type="search"]:focus,
  71. .pure-form input[type="tel"]:focus,
  72. .pure-form input[type="color"]:focus,
  73. .pure-form select:focus,
  74. .pure-form textarea:focus {
  75. outline: 0;
  76. border-color: #129FEA;
  77. }
  78. /*
  79. Need to separate out the :not() selector from the rest of the CSS 2.1 selectors
  80. since IE8 won't execute CSS that contains a CSS3 selector.
  81. */
  82. .pure-form input:not([type]):focus {
  83. outline: 0;
  84. border-color: #129FEA;
  85. }
  86. .pure-form input[type="file"]:focus,
  87. .pure-form input[type="radio"]:focus,
  88. .pure-form input[type="checkbox"]:focus {
  89. outline: thin solid #129FEA;
  90. outline: 1px auto #129FEA;
  91. }
  92. .pure-form .pure-checkbox,
  93. .pure-form .pure-radio {
  94. margin: 0.5em 0;
  95. display: block;
  96. }
  97. .pure-form input[type="text"][disabled],
  98. .pure-form input[type="password"][disabled],
  99. .pure-form input[type="email"][disabled],
  100. .pure-form input[type="url"][disabled],
  101. .pure-form input[type="date"][disabled],
  102. .pure-form input[type="month"][disabled],
  103. .pure-form input[type="time"][disabled],
  104. .pure-form input[type="datetime"][disabled],
  105. .pure-form input[type="datetime-local"][disabled],
  106. .pure-form input[type="week"][disabled],
  107. .pure-form input[type="number"][disabled],
  108. .pure-form input[type="search"][disabled],
  109. .pure-form input[type="tel"][disabled],
  110. .pure-form input[type="color"][disabled],
  111. .pure-form select[disabled],
  112. .pure-form textarea[disabled] {
  113. cursor: not-allowed;
  114. background-color: #eaeded;
  115. color: #cad2d3;
  116. }
  117. /*
  118. Need to separate out the :not() selector from the rest of the CSS 2.1 selectors
  119. since IE8 won't execute CSS that contains a CSS3 selector.
  120. */
  121. .pure-form input:not([type])[disabled] {
  122. cursor: not-allowed;
  123. background-color: #eaeded;
  124. color: #cad2d3;
  125. }
  126. .pure-form input[readonly],
  127. .pure-form select[readonly],
  128. .pure-form textarea[readonly] {
  129. background-color: #eee; /* menu hover bg color */
  130. color: #777; /* menu text color */
  131. border-color: #ccc;
  132. }
  133. .pure-form input:focus:invalid,
  134. .pure-form textarea:focus:invalid,
  135. .pure-form select:focus:invalid {
  136. color: #b94a48;
  137. border-color: #e9322d;
  138. }
  139. .pure-form input[type="file"]:focus:invalid:focus,
  140. .pure-form input[type="radio"]:focus:invalid:focus,
  141. .pure-form input[type="checkbox"]:focus:invalid:focus {
  142. outline-color: #e9322d;
  143. }
  144. .pure-form select {
  145. /* Normalizes the height; padding is not sufficient. */
  146. height: 2.25em;
  147. border: 1px solid #ccc;
  148. background-color: white;
  149. }
  150. .pure-form select[multiple] {
  151. height: auto;
  152. }
  153. .pure-form label {
  154. margin: 0.5em 0 0.2em;
  155. }
  156. .pure-form fieldset {
  157. margin: 0;
  158. padding: 0.35em 0 0.75em;
  159. border: 0;
  160. }
  161. .pure-form legend {
  162. display: block;
  163. width: 100%;
  164. padding: 0.3em 0;
  165. margin-bottom: 0.3em;
  166. color: #333;
  167. border-bottom: 1px solid #e5e5e5;
  168. }
  169. .pure-form-stacked input[type="text"],
  170. .pure-form-stacked input[type="password"],
  171. .pure-form-stacked input[type="email"],
  172. .pure-form-stacked input[type="url"],
  173. .pure-form-stacked input[type="date"],
  174. .pure-form-stacked input[type="month"],
  175. .pure-form-stacked input[type="time"],
  176. .pure-form-stacked input[type="datetime"],
  177. .pure-form-stacked input[type="datetime-local"],
  178. .pure-form-stacked input[type="week"],
  179. .pure-form-stacked input[type="number"],
  180. .pure-form-stacked input[type="search"],
  181. .pure-form-stacked input[type="tel"],
  182. .pure-form-stacked input[type="color"],
  183. .pure-form-stacked input[type="file"],
  184. .pure-form-stacked select,
  185. .pure-form-stacked label,
  186. .pure-form-stacked textarea {
  187. display: block;
  188. margin: 0.25em 0;
  189. }
  190. /*
  191. Need to separate out the :not() selector from the rest of the CSS 2.1 selectors
  192. since IE8 won't execute CSS that contains a CSS3 selector.
  193. */
  194. .pure-form-stacked input:not([type]) {
  195. display: block;
  196. margin: 0.25em 0;
  197. }
  198. .pure-form-aligned input,
  199. .pure-form-aligned textarea,
  200. .pure-form-aligned select,
  201. /* NOTE: pure-help-inline is deprecated. Use .pure-form-message-inline instead. */
  202. .pure-form-aligned .pure-help-inline,
  203. .pure-form-message-inline {
  204. display: inline-block;
  205. *display: inline;
  206. *zoom: 1;
  207. vertical-align: middle;
  208. }
  209. .pure-form-aligned textarea {
  210. vertical-align: top;
  211. }
  212. /* Aligned Forms */
  213. .pure-form-aligned .pure-control-group {
  214. margin-bottom: 0.5em;
  215. }
  216. .pure-form-aligned .pure-control-group label {
  217. text-align: right;
  218. display: inline-block;
  219. vertical-align: middle;
  220. width: 10em;
  221. margin: 0 1em 0 0;
  222. }
  223. .pure-form-aligned .pure-controls {
  224. margin: 1.5em 0 0 11em;
  225. }
  226. /* Rounded Inputs */
  227. .pure-form input.pure-input-rounded,
  228. .pure-form .pure-input-rounded {
  229. border-radius: 2em;
  230. padding: 0.5em 1em;
  231. }
  232. /* Grouped Inputs */
  233. .pure-form .pure-group fieldset {
  234. margin-bottom: 10px;
  235. }
  236. .pure-form .pure-group input,
  237. .pure-form .pure-group textarea {
  238. display: block;
  239. padding: 10px;
  240. margin: 0 0 -1px;
  241. border-radius: 0;
  242. position: relative;
  243. top: -1px;
  244. }
  245. .pure-form .pure-group input:focus,
  246. .pure-form .pure-group textarea:focus {
  247. z-index: 3;
  248. }
  249. .pure-form .pure-group input:first-child,
  250. .pure-form .pure-group textarea:first-child {
  251. top: 1px;
  252. border-radius: 4px 4px 0 0;
  253. margin: 0;
  254. }
  255. .pure-form .pure-group input:first-child:last-child,
  256. .pure-form .pure-group textarea:first-child:last-child {
  257. top: 1px;
  258. border-radius: 4px;
  259. margin: 0;
  260. }
  261. .pure-form .pure-group input:last-child,
  262. .pure-form .pure-group textarea:last-child {
  263. top: -2px;
  264. border-radius: 0 0 4px 4px;
  265. margin: 0;
  266. }
  267. .pure-form .pure-group button {
  268. margin: 0.35em 0;
  269. }
  270. .pure-form .pure-input-1 {
  271. width: 100%;
  272. }
  273. .pure-form .pure-input-2-3 {
  274. width: 66%;
  275. }
  276. .pure-form .pure-input-1-2 {
  277. width: 50%;
  278. }
  279. .pure-form .pure-input-1-3 {
  280. width: 33%;
  281. }
  282. .pure-form .pure-input-1-4 {
  283. width: 25%;
  284. }
  285. /* Inline help for forms */
  286. /* NOTE: pure-help-inline is deprecated. Use .pure-form-message-inline instead. */
  287. .pure-form .pure-help-inline,
  288. .pure-form-message-inline {
  289. display: inline-block;
  290. padding-left: 0.3em;
  291. color: #666;
  292. vertical-align: middle;
  293. font-size: 0.875em;
  294. }
  295. /* Block help for forms */
  296. .pure-form-message {
  297. display: block;
  298. color: #666;
  299. font-size: 0.875em;
  300. }
  301. @media only screen and (max-width : 480px) {
  302. .pure-form button[type="submit"] {
  303. margin: 0.7em 0 0;
  304. }
  305. .pure-form input:not([type]),
  306. .pure-form input[type="text"],
  307. .pure-form input[type="password"],
  308. .pure-form input[type="email"],
  309. .pure-form input[type="url"],
  310. .pure-form input[type="date"],
  311. .pure-form input[type="month"],
  312. .pure-form input[type="time"],
  313. .pure-form input[type="datetime"],
  314. .pure-form input[type="datetime-local"],
  315. .pure-form input[type="week"],
  316. .pure-form input[type="number"],
  317. .pure-form input[type="search"],
  318. .pure-form input[type="tel"],
  319. .pure-form input[type="color"],
  320. .pure-form label {
  321. margin-bottom: 0.3em;
  322. display: block;
  323. }
  324. .pure-group input:not([type]),
  325. .pure-group input[type="text"],
  326. .pure-group input[type="password"],
  327. .pure-group input[type="email"],
  328. .pure-group input[type="url"],
  329. .pure-group input[type="date"],
  330. .pure-group input[type="month"],
  331. .pure-group input[type="time"],
  332. .pure-group input[type="datetime"],
  333. .pure-group input[type="datetime-local"],
  334. .pure-group input[type="week"],
  335. .pure-group input[type="number"],
  336. .pure-group input[type="search"],
  337. .pure-group input[type="tel"],
  338. .pure-group input[type="color"] {
  339. margin-bottom: 0;
  340. }
  341. .pure-form-aligned .pure-control-group label {
  342. margin-bottom: 0.3em;
  343. text-align: left;
  344. display: block;
  345. width: 100%;
  346. }
  347. .pure-form-aligned .pure-controls {
  348. margin: 1.5em 0 0 0;
  349. }
  350. /* NOTE: pure-help-inline is deprecated. Use .pure-form-message-inline instead. */
  351. .pure-form .pure-help-inline,
  352. .pure-form-message-inline,
  353. .pure-form-message {
  354. display: block;
  355. font-size: 0.75em;
  356. /* Increased bottom padding to make it group with its related input element. */
  357. padding: 0.2em 0 0.8em;
  358. }
  359. }