input_areas.css 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. /* ----------------------------------
  2. * Input areas
  3. * ---------------------------------- */
  4. input[type="text"],
  5. input[type="password"],
  6. input[type="email"],
  7. input[type="tel"],
  8. input[type="search"],
  9. input[type="url"],
  10. input[type="number"],
  11. input[type="date"],
  12. textarea {
  13. -moz-box-sizing: border-box;
  14. display: block;
  15. width: 100%;
  16. height: 4rem;
  17. resize: none;
  18. padding: 0 1.2rem;
  19. font-size: 1.8rem;
  20. line-height: 4rem;
  21. border: 0.1rem solid #ccc;
  22. border-radius: 0.3rem;
  23. box-shadow: none; /* override the box-shadow from the system (performance issue) */
  24. background: #fff url(input_areas/images/ui/shadow.png) repeat-x;
  25. }
  26. textarea {
  27. height: 10rem;
  28. max-height: 10rem;
  29. line-height: 2rem;
  30. margin: 0;
  31. }
  32. /* fix for required inputs with wrong or empty value e.g. [type=email] */
  33. input:invalid,
  34. textarea:invalid {
  35. border: 0.1rem solid #820000;
  36. color: #b90000;
  37. }
  38. input::-moz-placeholder,
  39. textarea::-moz-placeholder {
  40. color: #858585;
  41. opacity: 1;
  42. }
  43. input:-moz-placeholder,
  44. textarea:-moz-placeholder {
  45. color: #858585;
  46. opacity: 1;
  47. }
  48. form p {
  49. position: relative;
  50. margin: 0;
  51. }
  52. form p + p {
  53. margin-top: 1rem;
  54. }
  55. form p input + button[type="reset"],
  56. form p textarea + button[type="reset"],
  57. form p input + button.reset,
  58. form p textarea + button.reset {
  59. position: absolute;
  60. top: 50%;
  61. right: 0;
  62. width: 3rem;
  63. height: 4rem;
  64. padding: 0;
  65. border: none;
  66. font-size: 0;
  67. opacity: 0;
  68. pointer-events: none;
  69. background: transparent url(input_areas/images/icons/clear.png) no-repeat 50% 50% / 1.7rem auto;
  70. }
  71. form.skin-dark p input + button[type="reset"],
  72. form.skin-dark p textarea + button[type="reset"],
  73. form.skin-dark p input + button.reset,
  74. form.skin-dark p textarea + button.reset {
  75. background-image: url(input_areas/images/icons/clear-dark.png);
  76. }
  77. /* To avoid colission with BB butons */
  78. li input + button[type="reset"]:after,
  79. li textarea + button[type="reset"]:after,
  80. li input + button.reset:after,
  81. li textarea + button.reset:after {
  82. background: none;
  83. }
  84. form p input + button[type="reset"],
  85. form p textarea + button[type="reset"],
  86. form p input + button.reset,
  87. form p textarea + button.reset {
  88. top: 0;
  89. margin: 0;
  90. }
  91. textarea {
  92. padding: 1.2rem;
  93. }
  94. form p input:focus {
  95. padding-right: 3rem;
  96. }
  97. form p input:focus + button[type="reset"],
  98. form p textarea:focus + button[type="reset"],
  99. form p input:focus + button.reset,
  100. form p textarea:focus + button.reset {
  101. opacity: 1;
  102. pointer-events: all;
  103. }
  104. /* Fieldset */
  105. fieldset {
  106. position: relative;
  107. overflow: hidden;
  108. margin: 0;
  109. padding: 0;
  110. border-radius: 0.3rem;
  111. border: 0.1rem solid rgba(0,0,0,.2);
  112. font-size: 1.8rem;
  113. line-height: 1em;
  114. background: #fff url(input_areas/images/ui/shadow.png) repeat-x left top;
  115. }
  116. fieldset + fieldset {
  117. margin-top: 1.5rem;
  118. }
  119. fieldset legend {
  120. -moz-box-sizing: border-box;
  121. position: absolute;
  122. width: 9.5rem;
  123. height: 100%;
  124. padding: 0 0.5rem 0 1.5rem;
  125. white-space: nowrap;
  126. text-overflow: ellipsis;
  127. overflow: hidden;
  128. color: #333;
  129. line-height: 4rem;
  130. text-transform: uppercase;
  131. }
  132. fieldset legend.action {
  133. background: url(input_areas/images/icons/arrow.png) no-repeat 100% 100% / 1.2rem;
  134. }
  135. fieldset legend:active {
  136. background-color: #008caa;
  137. text-shadow: 0.1rem 0.1rem 0 rgba(255,255,255,.3);
  138. }
  139. fieldset section input[type="text"],
  140. fieldset section input[type="password"],
  141. fieldset section input[type="email"],
  142. fieldset section input[type="tel"],
  143. fieldset section input[type="search"],
  144. fieldset section input[type="number"],
  145. fieldset section input[type="date"],
  146. fieldset section textarea {
  147. height: 4rem;
  148. border: none;
  149. border-radius: 0;
  150. background: none;
  151. }
  152. fieldset section {
  153. display: block;
  154. border-left: 0.1rem solid #ddd;
  155. border-radius: 0 0.3rem 0.3rem 0;
  156. overflow: hidden;
  157. margin-left: 9.5rem;
  158. }
  159. fieldset section p {
  160. margin: 0;
  161. border-bottom: 0.1rem solid #ddd;
  162. }
  163. fieldset section p:last-child {
  164. border-bottom: none;
  165. }
  166. /* Tidy (search/submit) */
  167. form[role="search"] {
  168. position: relative;
  169. height: 3.7rem;
  170. background: #dbe3eb;
  171. }
  172. form[role="search"].skin-dark {
  173. background: url(input_areas/images/ui/background-dark.png) repeat;
  174. background-size: 2rem;
  175. }
  176. form[role="search"].bottom {
  177. background: #fff;
  178. }
  179. form[role="search"]:before {
  180. content: "";
  181. position: absolute;
  182. top: 1rem;
  183. left: 1rem;
  184. height: 1.6rem;
  185. width: 1.6rem;
  186. background: url(input_areas/images/icons/search.png) no-repeat;
  187. background-size: 1.6rem;
  188. }
  189. form[role="search"].bottom:before {
  190. display: none;
  191. }
  192. form[role="search"].skin-dark:before {
  193. background-image: url(input_areas/images/icons/search-dark.png);
  194. }
  195. form[role="search"]:after {
  196. content: "";
  197. position: absolute;
  198. top: 3.6rem;
  199. right: 0;
  200. left: 0;
  201. height: 0.4rem;
  202. background: url(input_areas/images/ui/shadow-search.png) repeat-x left top;
  203. border-top: 0.1rem solid #fff;
  204. }
  205. form[role="search"].bottom:after {
  206. content: "";
  207. position: absolute;
  208. top: -0.4rem;
  209. background: url(input_areas/images/ui/shadow-invert.png) repeat-x 0 100%;
  210. border-color: transparent;
  211. }
  212. form[role="search"].skin-dark:after {
  213. border-color: #2b3538;
  214. }
  215. section[role="region"] > header:first-child + form[role="search"]:after{
  216. background: none;
  217. }
  218. form[role="search"] p {
  219. padding: 0.4rem 1.2rem 0 3.2rem;
  220. overflow: hidden;
  221. }
  222. form[role="search"].bottom p {
  223. padding: 0.4rem 1.2rem 0 1.2rem;
  224. }
  225. form[role="search"] p input,
  226. form[role="search"] p textarea {
  227. height: 3rem;
  228. border: none;
  229. background: none;
  230. font-size: 1.8rem;
  231. padding: 0.5rem 0;
  232. }
  233. form[role="search"] p input:focus {
  234. padding: 0 2rem 0 0;
  235. }
  236. form[role="search"] p input:invalid,
  237. form[role="search"] p textarea:invalid {
  238. border: none;
  239. }
  240. form[role="search"].skin-dark p input,
  241. form[role="search"].skin-dark p textarea {
  242. color: #fff;
  243. }
  244. form[role="search"] button.icon {
  245. float: left;
  246. height: 3.7rem;
  247. width: 3rem;
  248. border: none;
  249. font-size: 0;
  250. background: url(input_areas/images/ui/separator.png) no-repeat 100% 50%,
  251. url(input_areas/images/ui/background.png) repeat-x 0 100%;
  252. background-size: auto 100%;
  253. border-radius: 0;
  254. padding: 0;
  255. margin: 0;
  256. position: relative;
  257. }
  258. form[role="search"] button.icon:before {
  259. content: "";
  260. position: absolute;
  261. width: 3rem;
  262. height: 3.7rem;
  263. background: transparent center no-repeat;
  264. top: 0;
  265. left: 0;
  266. }
  267. form[role="search"] p button[type="reset"],
  268. form[role="search"] p button.reset {
  269. right: 0;
  270. }
  271. form[role="search"] button[type="submit"] {
  272. float: right;
  273. min-width: 6rem;
  274. height: 3.7rem;
  275. padding: 0 1.5rem;
  276. border: none;
  277. color: #000;
  278. font-weight: 500;
  279. font-size: 1.6rem;
  280. line-height: 3.7rem;
  281. background: url(input_areas/images/ui/separator.png) no-repeat 0 50%;
  282. background-size: auto 100%;
  283. width: auto;
  284. border-radius: 0;
  285. margin: 0;
  286. }
  287. form[role="search"].bottom button[type="submit"] {
  288. color: #333;
  289. background: url(input_areas/images/ui/separator.png) no-repeat 0 50%,
  290. url(input_areas/images/ui/active.png) repeat-x 0 100%;
  291. }
  292. form[role="search"].skin-dark button[type="submit"] {
  293. color: #fff;
  294. background-image: url(input_areas/images/ui/separator-dark.png);
  295. }
  296. form[role="search"] button[type="submit"] + p > textarea {
  297. height: 3rem;
  298. line-height: 2rem;
  299. font-size: 1.8rem;
  300. }
  301. form[role="search"] button[type="submit"] + p button {
  302. height: 3.7rem;
  303. }
  304. form[role="search"].full button[type="submit"] {
  305. display: none;
  306. }
  307. form[role="search"] button.icon:active,
  308. form[role="search"] button[type="submit"]:active {
  309. background: #008caa;
  310. text-shadow: 0.1rem 0.1rem 0 rgba(255,255,255,.3);
  311. }
  312. form[role="search"] button[type="submit"][disabled] {
  313. color: #adadad;
  314. background: url(input_areas/images/ui/separator.png) no-repeat 0 50%,
  315. url(input_areas/images/ui/background.png) repeat-x 0 100%;
  316. }
  317. form button::-moz-focus-inner {
  318. border: none;
  319. outline: none;
  320. margin-top: -0.2rem; /* To fix line-height bug (697451) */
  321. }
  322. /******************************************************************************
  323. * Right-to-Left layout
  324. */
  325. html[dir="rtl"] form p input + button[type="reset"],
  326. form p textarea + button[type="reset"],
  327. html[dir="rtl"] form p input + button.reset,
  328. form p textarea + button.reset {
  329. left: 0;
  330. right: auto;
  331. }
  332. html[dir="rtl"] form p input:focus {
  333. padding-left: 3rem;
  334. padding-right: inherit;
  335. }
  336. html[dir="rtl"] fieldset legend {
  337. padding-left: .5rem;
  338. padding-right: 1.5rem;
  339. }
  340. html[dir="rtl"] fieldset section {
  341. border-left: none;
  342. border-right: 0.1rem solid #ddd;
  343. border-radius: 0.3rem 0 0 0.3rem;
  344. margin-left: auto;
  345. margin-right: 9.5rem;
  346. }
  347. html[dir="rtl"] form[role="search"]:before {
  348. left: auto;
  349. right: 1rem;
  350. }
  351. html[dir="rtl"] form[role="search"] p {
  352. padding-left: 1.2rem;
  353. padding-right: 3.2rem;
  354. }
  355. html[dir="rtl"] form[role="search"] p input:focus {
  356. padding-left: 2rem;
  357. padding-right: 0;
  358. }
  359. html[dir="rtl"] form[role="search"] button.icon {
  360. float: right;
  361. background-position: 0 50%, 0 100%;
  362. }
  363. html[dir="rtl"] form[role="search"] button.icon:before {
  364. left: auto;
  365. right: 0;
  366. }
  367. html[dir="rtl"] form[role="search"] p button[type="reset"],
  368. html[dir="rtl"] form[role="search"] p button.reset {
  369. left: 0;
  370. right: auto;
  371. }
  372. html[dir="rtl"] form[role="search"] button[type="submit"] {
  373. float: left;
  374. background-position: 100% 50%;
  375. }
  376. html[dir="rtl"] fieldset legend.action {
  377. background-position: 0 100%;
  378. }
  379. html[dir="rtl"] form[role="search"] button[type="submit"][disabled],
  380. html[dir="rtl"] form[role="search"].bottom button[type="submit"] {
  381. background-position: 100% 50%, 0 100%;
  382. }