drawer.css 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. /* ----------------------------------
  2. * Drawer
  3. * ---------------------------------- */
  4. /* Main region */
  5. section[role="region"] {
  6. width: 100%;
  7. transition: all 0.25s ease;
  8. position: relative;
  9. z-index: 100;
  10. }
  11. section[role="region"]:target {
  12. transform: translateX(80%);
  13. }
  14. /* Hide anchor to change target */
  15. section[role="region"] > header:first-child > a:first-of-type {
  16. display: none;
  17. }
  18. section[role="region"]:target > header:first-child > a:first-of-type {
  19. display: block;
  20. }
  21. section[role="region"] > header:first-child > a:last-of-type {
  22. display: block;
  23. }
  24. section[role="region"]:target > header:first-child > a:last-of-type {
  25. display: none;
  26. }
  27. /* Sidebar */
  28. section[data-type="sidebar"] {
  29. position: absolute;
  30. width: 80%;
  31. background: url(drawer/images/ui/pattern.png) repeat;
  32. height: 100%;
  33. top: 0;
  34. left: 0;
  35. overflow: hidden;
  36. }
  37. /* Sidebar header */
  38. section[data-type="sidebar"] > header {
  39. position: relative;
  40. z-index: 10;
  41. height: 5rem;
  42. color: #fff;
  43. background: url(drawer/images/ui/header.png) repeat-x left bottom / 100% auto;
  44. }
  45. section[data-type="sidebar"] > header:after {
  46. content: "";
  47. height: 0.3rem;
  48. position: absolute;
  49. top: 100%;
  50. left: 0;
  51. right: 0;
  52. background: url(drawer/images/ui/shadow_header.png) repeat-x left top;
  53. background-size: auto 100%;
  54. }
  55. section[data-type="sidebar"] > header h1 {
  56. font-size: 2.2rem;
  57. line-height: 4.8rem;
  58. text-align: left;
  59. white-space: nowrap;
  60. text-overflow: ellipsis;
  61. display: block;
  62. overflow: hidden;
  63. margin: 0 0 0 3rem;
  64. height: 100%
  65. }
  66. section[data-type="sidebar"] > header h1 em {
  67. font-weight: bold;
  68. font-size: 1.5rem;
  69. line-height: 1em;
  70. }
  71. /* Generic set of actions in toolbar */
  72. section[data-type="sidebar"] > header menu[type="toolbar"] {
  73. height: 100%;
  74. float: right;
  75. }
  76. section[data-type="sidebar"] > header menu[type="toolbar"] a,
  77. section[data-type="sidebar"] > header menu[type="toolbar"] button {
  78. height: 4.9rem;
  79. line-height: 4.9rem;
  80. float: left;
  81. background: none;
  82. padding: 0 1.75rem;
  83. -moz-box-sizing: border-box;
  84. min-width: 5rem;
  85. text-align: center;
  86. }
  87. section[data-type="sidebar"] > header menu[type="toolbar"] a:last-child,
  88. section[data-type="sidebar"] > header menu[type="toolbar"] button:last-child {
  89. background: url(drawer/images/ui/separator.png) no-repeat left center / auto 3.1rem;
  90. }
  91. section[data-type="sidebar"] > header menu[type="toolbar"] {
  92. padding: 0;
  93. margin: 0;
  94. }
  95. section[data-type="sidebar"] > header a,
  96. section[data-type="sidebar"] > header button {
  97. border: none;
  98. background: none;
  99. padding: 0;
  100. overflow: hidden;
  101. font-weight: 600;
  102. font-size: 1.4rem;
  103. line-height: 1.1em;
  104. color: #fff;
  105. }
  106. section[data-type="sidebar"] > header a:first-letter,
  107. section[data-type="sidebar"] > header button:first-letter {
  108. text-transform: uppercase;
  109. }
  110. /* Icon definitions */
  111. section[data-type="sidebar"] > header .icon {
  112. display: inline-block;
  113. width: 3rem;
  114. height: 4.9rem;
  115. margin: 0 -1rem;
  116. background: transparent no-repeat center center / 100% auto;
  117. font-size: 0;
  118. overflow: hidden;
  119. position: relative;
  120. }
  121. section[data-type="sidebar"]:after {
  122. content: "";
  123. width: 1rem;
  124. background: url(drawer/images/ui/shadow.png) right top repeat-y;
  125. height: 100%;
  126. position: absolute;
  127. top: 0;
  128. right: 0;
  129. z-index: 5;
  130. }
  131. section[data-type="sidebar"] > nav {
  132. overflow-y: auto;
  133. max-height: 100%;
  134. margin-right: -0.8rem;
  135. }
  136. section[data-type="sidebar"] > nav > h2 {
  137. font-weight: bold;
  138. font-size: 1.4rem;
  139. line-height: 3.3rem;
  140. text-indent: 3rem;
  141. color: #fff;
  142. background: url(drawer/images/ui/pattern_subheader.png) repeat left top;
  143. border-bottom: 0.1rem solid #596068;
  144. margin: 0;
  145. padding-right: 0.8rem;
  146. }
  147. section[data-type="sidebar"] [role="toolbar"] {
  148. position: absolute;
  149. }
  150. section[data-type="sidebar"] > nav > ul {
  151. width: 100%;
  152. margin: 0;
  153. padding: 0;
  154. }
  155. section[data-type="sidebar"] > nav > ul > li {
  156. color: #fff;
  157. list-style: none;
  158. transition: background 0.2s ease;
  159. }
  160. section[data-type="sidebar"] > nav > ul > li:active {
  161. background: #00ABCC;
  162. }
  163. section[data-type="sidebar"] > nav > ul > li > a {
  164. text-decoration: none;
  165. color: #fff;
  166. font-size: 1.6rem;
  167. line-height: 4.35rem;
  168. border-bottom: 0.1rem solid #596068;
  169. text-indent: 3rem;
  170. padding-right: 0.8rem;
  171. width: 100%;
  172. -moz-box-sizing: border-box;
  173. display: block;
  174. text-overflow: ellipsis;
  175. white-space: nowrap;
  176. overflow: hidden;
  177. }