page.css 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. h3 {
  2. margin-top: 16px;
  3. margin-bottom: 16px;
  4. }
  5. /* Below CSS should only affect the page section */
  6. #page {
  7. --font-size: 16px;
  8. --line-height: 26px;
  9. --panel-width: 300px;
  10. --page-padding: 24px;
  11. --max-width: 960px;
  12. --icon-size: 20px;
  13. --border-style: 1px solid #E8E8E8;
  14. color: var(--text-color);
  15. tab-size: 4;
  16. overflow: auto;
  17. max-width: var(--max-width);
  18. margin: 0 auto;
  19. padding-top: var(--page-padding);
  20. padding-bottom: var(--page-padding);
  21. padding-right: var(--page-padding);
  22. padding-left: var(--page-padding);
  23. word-break: break-word;
  24. @font-face {
  25. font-family: 'Roboto Mono';
  26. src: local('Roboto Mono'), local('RobotoMono-Regular'), url('/files/RobotoMono-Regular.woff2') format('woff2');
  27. font-style: normal;
  28. font-weight: 400;
  29. }
  30. @font-face {
  31. font-family: 'Inter';
  32. font-style: normal;
  33. font-weight: 400;
  34. src: local('Inter-Regular'), url("/files/Inter-Regular.woff2?v=3.6") format("woff2");
  35. }
  36. @font-face {
  37. font-family: 'Inter';
  38. font-style: normal;
  39. font-weight: 600;
  40. src: local('Inter-SemiBold'), url("/files/Inter-SemiBold.woff2?v=3.6") format("woff2");
  41. }
  42. a {
  43. color: var(--color-blue);
  44. cursor: pointer;
  45. text-decoration: none;
  46. }
  47. h1 {
  48. font-size: 40px;
  49. line-height: 48px;
  50. font-weight: normal;
  51. margin-left: -2px;
  52. margin-top: 16px;
  53. }
  54. h2 {
  55. font-size: 28px;
  56. line-height: 36px;
  57. font-weight: normal;
  58. margin-left: -1px;
  59. margin-top: 28px;
  60. }
  61. h3 {
  62. font-size: 20px;
  63. line-height: 28px;
  64. font-weight: normal;
  65. margin-top: 32px;
  66. margin-bottom: 32px;
  67. }
  68. p,
  69. div,
  70. table,
  71. ol,
  72. ul {
  73. margin-top: 16px;
  74. margin-bottom: 16px;
  75. }
  76. p {
  77. padding-right: 16px;
  78. }
  79. ul, ol {
  80. box-sizing: border-box;
  81. padding-left: 24px;
  82. }
  83. ul li,
  84. ol li {
  85. padding-left: 4px;
  86. margin-bottom: 4px;
  87. }
  88. li ul,
  89. li ol {
  90. margin-top: 4px;
  91. }
  92. table {
  93. width: 100%;
  94. border-collapse: collapse;
  95. }
  96. .desc {
  97. padding-left: 0px;
  98. }
  99. table th,
  100. table td {
  101. text-align: left;
  102. vertical-align: top;
  103. padding: 16px 8px;
  104. border-bottom: var(--border-style);
  105. max-width: 480px;
  106. min-width: 120px;
  107. }
  108. table th {
  109. text-decoration: none;
  110. }
  111. table th:first-child,
  112. table td:first-child {
  113. padding-left: 0;
  114. }
  115. table p {
  116. margin: 0;
  117. }
  118. strong {
  119. font-weight: 600;
  120. }
  121. a.permalink {
  122. float: right;
  123. margin-left: 5px;
  124. display: none;
  125. }
  126. a.param,
  127. span.param {
  128. color: #999;
  129. }
  130. a.param:hover {
  131. color: var(--text-color);
  132. }
  133. .method,
  134. .member {
  135. margin-bottom: 64px;
  136. }
  137. ol.linenums {
  138. padding-left: 64px;
  139. }
  140. code {
  141. display: inline-block;
  142. vertical-align: middle;
  143. border-radius: 4px;
  144. padding: 0px 5px;
  145. }
  146. pre {
  147. overflow: auto;
  148. white-space: pre-wrap;
  149. font-size: calc(var(--font-size) - 1px);
  150. line-height: calc(var(--line-height) - 1px);
  151. }
  152. pre > code {
  153. display: block;
  154. box-sizing: border-box;
  155. border-radius: 0;
  156. padding: calc(var(--page-padding) - 6px) var(--page-padding);
  157. }
  158. .link-anchor {
  159. color: #ddd;
  160. visibility: hidden;
  161. }
  162. .name:hover .link-anchor {
  163. visibility: visible;
  164. }
  165. .search-result-item {
  166. border-bottom: var(--border-style);
  167. display: block;
  168. padding: 16px 0;
  169. }
  170. .search-result-item-description {
  171. color: var(--text-color);
  172. }
  173. }
  174. @media (prefers-color-scheme: dark) {
  175. #page {
  176. --text-color: #bbb;
  177. --border-style: 1px solid #444;
  178. .link-anchor {
  179. color: #555;
  180. }
  181. }
  182. }
  183. @media all and ( min-width: 1700px ) {
  184. #page {
  185. --panel-width: 360px;
  186. --font-size: 18px;
  187. --line-height: 28px;
  188. --max-width: 1080px;
  189. --page-padding: 28px;
  190. --icon-size: 24px;
  191. h1 {
  192. font-size: 42px;
  193. line-height: 50px;
  194. }
  195. h2 {
  196. font-size: 32px;
  197. line-height: 40px;
  198. }
  199. h3 {
  200. font-size: 24px;
  201. line-height: 32px;
  202. }
  203. }
  204. }
  205. /* mobile */
  206. @media all and ( max-width: 640px ) {
  207. #page {
  208. --page-padding: 16px;
  209. --icon-size: 24px;
  210. padding: var(--page-padding);
  211. h1 {
  212. font-size: 28px;
  213. line-height: 36px;
  214. padding-right: 20px;
  215. margin-top: 0;
  216. }
  217. h2 {
  218. font-size: 24px;
  219. line-height: 32px;
  220. margin-top: 24px;
  221. }
  222. h3 {
  223. font-size: 20px;
  224. line-height: 28px;
  225. }
  226. }
  227. }
粤ICP备19079148号