value_selector.css 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. /* ----------------------------------
  2. * Value selector (Single & Multiple)
  3. * ---------------------------------- */
  4. /* Main dialog setup */
  5. [role="dialog"][data-type="value-selector"] {
  6. background: url(value_selector/images/ui/pattern.png) repeat left top, url(value_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="value-selector"] > section {
  19. padding: 0 1.5rem 0;
  20. -moz-box-sizing: padding-box;
  21. width: 100%;
  22. height: 100%;
  23. }
  24. [role="dialog"][data-type="value-selector"] h1 {
  25. font-weight: 400;
  26. font-size: 1.9rem;
  27. line-height: 4.8rem;
  28. color: #fff;
  29. border-bottom: 0.1rem solid #616262;
  30. background: rgba(0 ,0, 0, .2);
  31. margin: 0 -1.5rem;
  32. padding: 0 3rem 1rem;
  33. height: 4.8rem;
  34. -moz-box-sizing: border-box;
  35. }
  36. /* Specific component code */
  37. [role="dialog"][data-type="value-selector"] [role="listbox"] {
  38. position: relative;
  39. padding: 0;
  40. margin: 0 -1.5rem;
  41. max-height: calc(100% - 5rem);
  42. overflow: auto;
  43. }
  44. [role="dialog"][data-type="value-selector"] [role="listbox"] li {
  45. margin: 0;
  46. padding: 0 1.5rem;
  47. height: auto;
  48. list-style: none;
  49. position: relative;
  50. font-weight: lighter;
  51. font-size: 2.2rem;
  52. line-height: 3.9rem;
  53. color: #fff;
  54. transition: background-color 0.2s ease;
  55. }
  56. [role="dialog"][data-type="value-selector"] [role="listbox"] li:first-child label {
  57. border-top-color: transparent;
  58. }
  59. [role="dialog"][data-type="value-selector"] [role="listbox"] li label {
  60. outline: none;
  61. display: block;
  62. color: #fff;
  63. border-top: 0.1rem solid #666;
  64. }
  65. [role="dialog"][data-type="value-selector"] [role="listbox"] li label span {
  66. display: block;
  67. padding: 1rem 1.5rem;
  68. line-height: 4rem;
  69. word-wrap: break-word;
  70. }
  71. /* Pressed status */
  72. [role="dialog"][data-type="value-selector"] [role="listbox"] li:active {
  73. background-color: #00ABCC;
  74. }
  75. [role="dialog"][data-type="value-selector"] [role="listbox"] li:active label,
  76. [role="dialog"][data-type="value-selector"] [role="listbox"] li:active + li label {
  77. border-top-color: transparent;
  78. }
  79. [role="dialog"][data-type="value-selector"] [role="listbox"] li:active label span {
  80. color: #fff !important;
  81. background-image: none;
  82. }
  83. /* Checked status */
  84. [role="dialog"][data-type="value-selector"] [role="listbox"] li[aria-selected="true"] span {
  85. padding-right: 2.6rem;
  86. margin-right: 1.2rem;
  87. color: #00abcd;
  88. background: transparent url(value_selector/images/icons/checked.png) no-repeat 100% 50%;
  89. background-size: 2rem;
  90. }
  91. /* Menu & buttons setup */
  92. [role="dialog"][data-type="value-selector"] menu {
  93. white-space: nowrap;
  94. margin: 0;
  95. padding: 1.5rem;
  96. background: #2d2d2d url(value_selector/images/ui/pattern.png) repeat left top;
  97. display: block;
  98. overflow: hidden;
  99. position: absolute;
  100. left: 0;
  101. right: 0;
  102. bottom: 0;
  103. }
  104. [role="dialog"][data-type="value-selector"] menu button::-moz-focus-inner {
  105. border: none;
  106. outline: none;
  107. }
  108. [role="dialog"][data-type="value-selector"] menu button {
  109. width: calc((100% - 1rem) / 2);
  110. font-family: sans-serif;
  111. font-style: italic;
  112. height: 4rem;
  113. margin: 0 0 1rem;
  114. padding: 0 1.2rem;
  115. -moz-box-sizing: border-box;
  116. display: inline-block;
  117. vertical-align: middle;
  118. text-overflow: ellipsis;
  119. white-space: nowrap;
  120. overflow: hidden;
  121. background: #d8d8d8;
  122. border: none;
  123. border-radius: 2rem;
  124. font-weight: normal;
  125. font-size: 1.6rem;
  126. line-height: 4rem;
  127. color: #333;
  128. text-align: center;
  129. text-shadow: none;
  130. text-decoration: none;
  131. outline: none;
  132. }
  133. /* Affirmative */
  134. [role="dialog"][data-type="value-selector"] menu button.affirmative,
  135. [role="dialog"][data-type="value-selector"] menu button.recommend {
  136. background-color: #00caf2;
  137. color: #fff;
  138. }
  139. /* Pressed */
  140. [role="dialog"][data-type="value-selector"] menu button:active {
  141. background: #00aacc;
  142. color: #fff;
  143. }
  144. /* Disabled */
  145. [role="dialog"][data-type="value-selector"] > menu > button[disabled] {
  146. background-color: #565656;
  147. color: rgba(255,255,255,0.4);
  148. pointer-events: none;
  149. }
  150. [role="dialog"][data-type="value-selector"] > menu > button[disabled].recommend {
  151. background-color: #006579;
  152. }
  153. button[disabled]::-moz-selection {
  154. -moz-user-select: none;
  155. }
  156. [role="dialog"][data-type="value-selector"] menu button:last-child {
  157. margin-left: 1rem;
  158. }
  159. [role="dialog"][data-type="value-selector"] menu button,
  160. [role="dialog"][data-type="value-selector"] menu button:first-child {
  161. margin: 0;
  162. }
  163. [role="dialog"][data-type="value-selector"] menu button.full {
  164. width: 100%;
  165. }
  166. /* Right to left tweaks */
  167. html[dir="rtl"] #value-selector li input:checked + span,
  168. html[dir="rtl"] #value-selector li[aria-selected="true"] span {
  169. padding-left: 2.6rem;
  170. padding-right: 1.5rem;
  171. margin-left: 1.2rem;
  172. margin-right: 0;
  173. background-position: 0 50%;
  174. }