date_selector.css 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. /* ----------------------------------
  2. * Date selector
  3. * ---------------------------------- */
  4. /* Main dialog setup */
  5. [role="dialog"][data-type="date-selector"] {
  6. background: url(date_selector/images/ui/pattern.png) repeat left top, url(date_selector/images/ui/gradient.png) no-repeat left top / 100% 100%;
  7. overflow: hidden;
  8. position: absolute;
  9. z-index: 100;
  10. top: 0;
  11. left: 0;
  12. right: 0;
  13. bottom: 0;
  14. padding: 0 0 7rem;
  15. color: #fff;
  16. font-family: sans-serif;
  17. }
  18. [role="dialog"][data-type="date-selector"] h1 {
  19. font-weight: 400;
  20. font-size: 1.9rem;
  21. line-height: 4.8rem;
  22. color: #fff;
  23. border-bottom: 0.1rem solid #616262;
  24. background: rgba(0 ,0, 0, .2);
  25. margin: 0;
  26. padding: 0 3rem 1rem;
  27. height: 4.8rem;
  28. -moz-box-sizing: border-box;
  29. }
  30. /* Date picker */
  31. [role="dialog"][data-type="date-selector"] .picker-container {
  32. -moz-box-sizing: border-box;
  33. position: relative;
  34. width: calc(100% - 5rem);
  35. height: 22.5rem;
  36. margin: 5.4rem auto 0;
  37. padding-top: 8.8rem;
  38. border-left: 0.1rem solid #111;
  39. border-right: 0.1rem solid #111;
  40. overflow: hidden;
  41. }
  42. [role="dialog"][data-type="date-selector"] .picker-container:before {
  43. content: '';
  44. position: absolute;
  45. top: 0;
  46. right: 0;
  47. left: 0;
  48. border-top: solid 0.7rem;
  49. -moz-border-top-colors:
  50. rgba(0, 0, 0, 0.5) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.3)
  51. rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.1)
  52. rgba(0, 0, 0, 0.05);
  53. z-index: 10;
  54. }
  55. [role="dialog"][data-type="date-selector"] .picker-container:after {
  56. content: '';
  57. position: absolute;
  58. right: 0;
  59. bottom: 0;
  60. left: 0;
  61. border-bottom: solid 0.7rem;
  62. -moz-border-bottom-colors:
  63. rgba(0, 0, 0, 0.5) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.3)
  64. rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.1)
  65. rgba(0, 0, 0, 0.05);
  66. z-index: 10;
  67. }
  68. [role="dialog"][data-type="date-selector"] .picker-bar-background {
  69. position: absolute;
  70. top: 0;
  71. right: 0;
  72. width: 27%;
  73. height: 100%;
  74. background: url(date_selector/images/ui/pattern-time.png);
  75. }
  76. [role="dialog"][data-type="date-selector"] .value-picker-date-wrapper,
  77. [role="dialog"][data-type="date-selector"] .value-picker-month-wrapper,
  78. [role="dialog"][data-type="date-selector"] .value-picker-year-wrapper {
  79. -moz-box-sizing: border-box;
  80. position: absolute;
  81. top: 0;
  82. left: 0;
  83. width: 21%;
  84. height: 100%;
  85. padding-top: 8.3rem;
  86. border-right: solid 0.2rem;
  87. -moz-border-right-colors: #1d1d1d #4a4a4a;
  88. }
  89. [role="dialog"][data-type="date-selector"] .value-picker-month-wrapper {
  90. left: 21%;
  91. width: 52%;
  92. }
  93. [role="dialog"][data-type="date-selector"] .value-picker-year-wrapper {
  94. left: auto;
  95. right: 0;
  96. width: 27%;
  97. }
  98. /*DMY*/
  99. [role="dialog"][data-type="date-selector"] .DMY .value-picker-year-wrapper {
  100. border: none;
  101. }
  102. /*YMD*/
  103. [role="dialog"][data-type="date-selector"] .YMD .value-picker-year-wrapper {
  104. left: 0;
  105. right: auto;
  106. }
  107. [role="dialog"][data-type="date-selector"] .YMD .value-picker-month-wrapper {
  108. left: 27%;
  109. }
  110. [role="dialog"][data-type="date-selector"] .YMD .value-picker-date-wrapper {
  111. left: auto;
  112. right: 0;
  113. border: none;
  114. }
  115. /*MDY*/
  116. [role="dialog"][data-type="date-selector"] .MDY .value-picker-month-wrapper {
  117. left: 0;
  118. }
  119. [role="dialog"][data-type="date-selector"] .MDY .value-picker-date-wrapper {
  120. left: 52%;
  121. }
  122. [role="dialog"][data-type="date-selector"] .MDY .value-picker-year-wrapper {
  123. border: none;
  124. }
  125. [role="dialog"][data-type="date-selector"] .value-picker-date,
  126. [role="dialog"][data-type="date-selector"] .value-picker-month,
  127. [role="dialog"][data-type="date-selector"] .value-picker-year {
  128. -moz-user-select: none;
  129. position: relative;
  130. width: 100%;
  131. z-index: 1;
  132. }
  133. [role="dialog"][data-type="date-selector"] .value-picker-date > *[data-disabled="true"],
  134. [role="dialog"][data-type="date-selector"] .value-picker-month > *[data-disabled="true"],
  135. [role="dialog"][data-type="date-selector"] .value-picker-year > *[data-disabled="true"] {
  136. visibility: hidden;
  137. }
  138. [role="dialog"][data-type="date-selector"] .value-indicator {
  139. position: absolute;
  140. width: 100%;
  141. height: 4.6rem;
  142. background-color: #00A5C5;
  143. box-shadow: 0 0 0.7rem rgba(0,0,0, .4);
  144. opacity: .99;
  145. pointer-events: none;
  146. }
  147. [role="dialog"][data-type="date-selector"] .animation-on {
  148. transition-duration: 0.5s;
  149. transition-property: transform;
  150. }
  151. [role="dialog"][data-type="date-selector"] .picker-unit {
  152. position: relative;
  153. font: 2.2rem/5.6rem 'MozTT',sans-serif;
  154. color: #fff;
  155. text-align: center;
  156. vertical-align: middle;
  157. width: 100%;
  158. height: 5.6rem;
  159. pointer-events: none;
  160. }
  161. /* Menu & buttons setup */
  162. [role="dialog"][data-type="date-selector"] menu {
  163. white-space: nowrap;
  164. margin: 0;
  165. padding: 1.5rem;
  166. background: #2d2d2d url(date_selector/images/ui/pattern.png) repeat left top;
  167. display: block;
  168. overflow: hidden;
  169. position: absolute;
  170. left: 0;
  171. right: 0;
  172. bottom: 0;
  173. }
  174. [role="dialog"][data-type="date-selector"] menu button::-moz-focus-inner {
  175. border: none;
  176. outline: none;
  177. }
  178. [role="dialog"][data-type="date-selector"] menu button {
  179. width: calc((100% - 1rem) / 2);
  180. font-family: sans-serif;
  181. font-style: italic;
  182. height: 4rem;
  183. margin: 0 0 1rem;
  184. padding: 0 1.2rem;
  185. -moz-box-sizing: border-box;
  186. display: inline-block;
  187. vertical-align: middle;
  188. text-overflow: ellipsis;
  189. white-space: nowrap;
  190. overflow: hidden;
  191. background: #d8d8d8;
  192. border: none;
  193. border-radius: 2rem;
  194. font-weight: normal;
  195. font-size: 1.6rem;
  196. line-height: 4rem;
  197. color: #333;
  198. text-align: center;
  199. text-shadow: none;
  200. text-decoration: none;
  201. outline: none;
  202. }
  203. /* Affirmative */
  204. [role="dialog"][data-type="date-selector"] menu button.affirmative,
  205. [role="dialog"][data-type="date-selector"] menu button.recommend {
  206. background-color: #00caf2;
  207. color: #fff;
  208. }
  209. /* Pressed */
  210. [role="dialog"][data-type="date-selector"] menu button:active {
  211. background: #00aacc;
  212. color: #fff;
  213. }
  214. /* Disabled */
  215. [role="dialog"][data-type="date-selector"] > menu > button[disabled] {
  216. background-color: #565656;
  217. color: rgba(255,255,255,0.4);
  218. pointer-events: none;
  219. }
  220. [role="dialog"][data-type="date-selector"] > menu > button[disabled].recommend {
  221. background-color: #006579;
  222. }
  223. button[disabled]::-moz-selection {
  224. -moz-user-select: none;
  225. }
  226. [role="dialog"][data-type="date-selector"] menu button:last-child {
  227. margin-left: 1rem;
  228. }
  229. [role="dialog"][data-type="date-selector"] menu button,
  230. [role="dialog"][data-type="date-selector"] menu button:first-child {
  231. margin: 0;
  232. }
  233. [role="dialog"][data-type="date-selector"] menu button.full {
  234. width: 100%;
  235. }