4
0

docs.css 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. :root {
  2. --aside-width: 300px;
  3. }
  4. @font-face {
  5. font-family: 'Open Sans';
  6. font-style: normal;
  7. font-weight: 300 800;
  8. font-stretch: 100%;
  9. font-display: swap;
  10. src: url('{{ "/assets/fonts/OpenSans.woff2" | relative_url }}') format('woff2');
  11. unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  12. }
  13. /* layout */
  14. html, body {
  15. overflow-x: hidden;
  16. }
  17. body {
  18. font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  19. line-height: 1.5;
  20. min-height: 100vh;
  21. }
  22. aside {
  23. padding: 1rem;
  24. width: var(--aside-width);
  25. height: 100vh;
  26. border-right: 1px solid black;
  27. position: fixed;
  28. top: 0;
  29. left: 0;
  30. margin-right: 1rem;
  31. }
  32. aside > nav.docs {
  33. overflow-y: scroll;
  34. max-height: 90vh;
  35. }
  36. aside > nav.docs > ul {
  37. margin-bottom: 10rem; /* extra scroll space */
  38. }
  39. aside > nav.docs ul {
  40. padding-left: 1rem;
  41. margin-right: 1rem;
  42. }
  43. main {
  44. margin-left: calc(var(--aside-width) + 50px);
  45. max-width: 70vw;
  46. }
  47. img {
  48. max-width: 100%;
  49. }
  50. section.search {
  51. margin-top: 1rem;
  52. border-bottom: 1px solid black;
  53. }
  54. div.nojs-search {
  55. margin-bottom: 1rem;
  56. }
  57. nav.mobile-nav {
  58. display: none;
  59. }
  60. nav.lang-dropdown {
  61. display: none;
  62. }
  63. div.lang-dropdown:target nav {
  64. padding: 0.2rem;
  65. display: block;
  66. border: 1px solid black;
  67. border-radius: 6px;
  68. position: absolute;
  69. background-color: white;
  70. z-index: 100;
  71. text-wrap: nowrap;
  72. }
  73. div#mobile-language:target nav {
  74. right: 0.2rem;
  75. }
  76. div.lang-dropdown:target nav a:hover {
  77. background-color: silver;
  78. }
  79. div.lang-dropdown:target a.close {
  80. display: block;
  81. cursor: default;
  82. position: fixed;
  83. top: 0;
  84. left: 0;
  85. width: 100vw;
  86. height: 100vh;
  87. z-index: 99; /* just below language dropdown */
  88. }
  89. nav.lang-dropdown ul {
  90. margin: 0;
  91. padding: 0;
  92. list-style-type: none;
  93. }
  94. /* mobile layout */
  95. @media (max-width: 1200px) {
  96. aside {
  97. display: none;
  98. }
  99. aside a.close {
  100. display: block;
  101. }
  102. aside a.lang-btn {
  103. display: none;
  104. }
  105. html:has(aside:target) {
  106. overflow-y: hidden;
  107. }
  108. body:has(aside:target) > a.close {
  109. display: block;
  110. cursor: default;
  111. position: fixed;
  112. top: 0;
  113. background-color: black;
  114. opacity: 0.3;
  115. width: 100vw;
  116. height: 100vh;
  117. z-index: 99; /* just below aside */
  118. }
  119. aside:target {
  120. display: block;
  121. position: fixed;
  122. background-color: white;
  123. z-index: 100;
  124. }
  125. main {
  126. margin-left: 1rem;
  127. max-width: 90vw;
  128. }
  129. nav.mobile-nav {
  130. display: block;
  131. border-bottom: 1px dashed black;
  132. }
  133. nav.mobile-nav > a.toggle-aside {
  134. color: black;
  135. -webkit-tap-highlight-color: transparent;
  136. }
  137. nav.mobile-nav > a.toggle-aside svg {
  138. width: 2rem;
  139. height: 2rem;
  140. }
  141. }
  142. /* general styling */
  143. a {
  144. text-decoration: none;
  145. color: #00e;
  146. }
  147. a.close {
  148. display: none;
  149. }
  150. aside a.close {
  151. float: right;
  152. color: #f00;
  153. font-size: 24px;
  154. position: relative;
  155. bottom: 4px;
  156. }
  157. table, th, tr, td {
  158. border: 1px solid black;
  159. border-collapse: collapse;
  160. }
  161. th, tr, td {
  162. padding: 0.3rem;
  163. }
  164. button.copy {
  165. margin: 0.5rem;
  166. float: right;
  167. }
  168. div.lang-dropdown {
  169. float: right;
  170. }
  171. a.lang-btn {
  172. color: black;
  173. }