lists.css 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. /* ----------------------------------
  2. * Lists
  3. * ---------------------------------- */
  4. [data-type="list"] {
  5. font-weight: 400;
  6. padding: 0 1.5rem;
  7. }
  8. [data-type="list"] ul {
  9. list-style: none;
  10. margin: 0;
  11. padding: 0;
  12. overflow: hidden;
  13. }
  14. [data-type="list"] strong {
  15. font-weight: 500;
  16. }
  17. /* Title divisors */
  18. [data-type="list"] header {
  19. border-bottom: 0.1rem solid #ff4E00;
  20. padding: 0 1.5rem;
  21. margin: 0;
  22. font-size: 1.6rem;
  23. height: 3rem;
  24. line-height: 4rem;
  25. font-weight: normal;
  26. color: #ff4E00;
  27. text-transform: uppercase;
  28. overflow: hidden;
  29. text-overflow: ellipsis;
  30. white-space: nowrap;
  31. }
  32. /* List items */
  33. [data-type="list"] li {
  34. width: 100%;
  35. height: 6rem;
  36. -moz-box-sizing: border-box;
  37. border-bottom: solid 0.1rem #e7e7e7;
  38. color: #000;
  39. margin: 0;
  40. display: block;
  41. position: relative;
  42. z-index: 1;
  43. }
  44. [data-type="list"] li:last-child {
  45. border: none;
  46. }
  47. /* Pressed State */
  48. li a:active {
  49. background: none; /* remove default color for active state */
  50. }
  51. [data-type="list"] li > a {
  52. text-decoration: none;
  53. color: #000;
  54. display: block;
  55. height: 6rem;
  56. position: relative;
  57. border: none;
  58. outline: none;
  59. }
  60. [data-type="list"].active li:after,
  61. [data-type="list"] li > a:after {
  62. content: "";
  63. pointer-events: none;
  64. position: absolute;
  65. left: -1.5rem;
  66. top: 0;
  67. right: -1.5rem;
  68. bottom: 0;
  69. z-index: 3;
  70. }
  71. [data-type="list"].active li:active:after,
  72. [data-type="list"].active li:hover:after,
  73. [data-type="list"] li > a:active:after,
  74. [data-type="list"] li > a:hover:after {
  75. background-color: rgba(0,213,255,0.3);
  76. }
  77. /* Disabled */
  78. [data-type="list"] li[aria-disabled="true"] {
  79. pointer-events: none;
  80. opacity: 0.2;
  81. border-color: #888;
  82. }
  83. /* Graphic content */
  84. [data-type="list"] aside {
  85. float: left;
  86. margin: 0 0.5rem 0 0;
  87. height: 100%;
  88. position: relative;
  89. z-index: 2;
  90. }
  91. [data-type="list"] li > a aside,
  92. [data-type="list"] li > a aside.icon {
  93. background-color: transparent;
  94. z-index: -1;
  95. }
  96. [data-type="list"] aside.pack-end {
  97. float: right;
  98. margin: 0 0 0 0.5rem;
  99. text-align: right;
  100. }
  101. [data-type="list"] aside.icon {
  102. width: 3rem;
  103. height: 6rem;
  104. background: #fff no-repeat left center / 100% auto;
  105. font-size: 0;
  106. display: block;
  107. overflow: hidden;
  108. }
  109. [data-type="list"] aside span[data-type=img],
  110. [data-type="list"] aside img {
  111. display: block;
  112. overflow: hidden;
  113. width: 6rem;
  114. height: 6rem;
  115. background: transparent center center / cover;
  116. position: relative;
  117. z-index: 1;
  118. /* Favor performance over quality */
  119. image-rendering: -moz-crisp-edges;
  120. }
  121. /* Text content */
  122. [data-type="list"] li p {
  123. white-space: nowrap;
  124. overflow: hidden;
  125. text-overflow: ellipsis;
  126. border: none;
  127. display: block;
  128. margin: 0;
  129. color: #5b5b5b;
  130. font-size: 1.5rem;
  131. line-height: 2rem;
  132. }
  133. [data-type="list"] li p:first-of-type {
  134. font-size: 1.8rem;
  135. line-height: 2.2rem;
  136. color: #000;
  137. padding: 1rem 0 0;
  138. }
  139. [data-type="list"] li p:only-child,
  140. [data-type="list"] li p:first-of-type:last-of-type {
  141. line-height: 4rem;
  142. }
  143. [data-type="list"] li p em {
  144. font-size: 1.5rem;
  145. font-style: normal;
  146. }
  147. [data-type="list"] li p time {
  148. margin-right: 0.3rem;
  149. text-transform: uppercase;
  150. }
  151. /* Checkable content */
  152. [data-type="list"] li > .pack-checkbox,
  153. [data-type="list"] li > .pack-radio,
  154. [data-type="list"] li > .pack-switch {
  155. pointer-events: none;
  156. position: absolute;
  157. top: -0.1rem;
  158. bottom: 0;
  159. right: 0;
  160. left: -4rem;
  161. z-index: 1;
  162. width: auto;
  163. height: auto;
  164. }
  165. [data-type="list"] li > .pack-checkbox input ~ span:after,
  166. [data-type="list"] li > .pack-radio input ~ span:after,
  167. [data-type="list"] li > .pack-switch input ~ span:after {
  168. left: 0;
  169. margin-left: 0;
  170. }
  171. /* Edit mode */
  172. [data-type="list"] [data-type="edit"] li {
  173. transform: translateX(4rem);
  174. padding-left: 0;
  175. }
  176. [data-type="list"] [data-type="edit"] li > .pack-checkbox,
  177. [data-type="list"] [data-type="edit"] li > .pack-radio,
  178. [data-type="list"] [data-type="edit"] li > .pack-switch {
  179. pointer-events: auto;
  180. }
  181. [data-type="list"] [data-type="edit"] li > a:active:after,
  182. [data-type="list"] [data-type="edit"] li > a:hover:after {
  183. display: none;
  184. }