page.css 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  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. ol.linenums .selected {
  141. background-color: #ddd;
  142. }
  143. code {
  144. display: inline-block;
  145. vertical-align: middle;
  146. border-radius: 4px;
  147. padding: 0px 5px;
  148. background-color: #F5F5F5;
  149. }
  150. pre {
  151. overflow: auto;
  152. white-space: pre-wrap;
  153. font-size: calc(var(--font-size) - 1px);
  154. line-height: calc(var(--line-height) - 1px);
  155. position: relative;
  156. }
  157. pre code {
  158. background-color: inherit;
  159. padding: calc(var(--page-padding) - 6px) var(--page-padding);
  160. }
  161. pre.linenums code {
  162. padding: 0px 5px;
  163. }
  164. .link-anchor {
  165. color: #ddd;
  166. visibility: hidden;
  167. }
  168. .name:hover .link-anchor {
  169. visibility: visible;
  170. }
  171. .search-result-item {
  172. border-bottom: var(--border-style);
  173. display: block;
  174. padding: 16px 0;
  175. }
  176. .search-result-item-description {
  177. color: var(--text-color);
  178. }
  179. .copy-btn {
  180. cursor: pointer;
  181. position: absolute;
  182. top: 16px;
  183. right: 16px;
  184. width: 24px;
  185. height: 24px;
  186. background-color: transparent;
  187. background-image: url('/files/ic_copy_grey_24dp.svg');
  188. background-size: contain;
  189. background-position: center;
  190. background-repeat: no-repeat;
  191. opacity: 0.9;
  192. border: none;
  193. }
  194. .copy-btn:hover {
  195. opacity: 1;
  196. }
  197. .copy-btn.copied {
  198. pointer-events: none;
  199. opacity: 1;
  200. background-image: url('/files/ic_tick_green_24dp.svg');
  201. }
  202. }
  203. @media (prefers-color-scheme: dark) {
  204. #page {
  205. --text-color: #bbb;
  206. --border-style: 1px solid #444;
  207. .link-anchor {
  208. color: #555;
  209. }
  210. ol.linenums .selected {
  211. background-color: #444;
  212. }
  213. code {
  214. background-color: #444;
  215. }
  216. }
  217. }
  218. @media all and ( min-width: 1700px ) {
  219. #page {
  220. --panel-width: 360px;
  221. --font-size: 18px;
  222. --line-height: 28px;
  223. --max-width: 1080px;
  224. --page-padding: 28px;
  225. --icon-size: 24px;
  226. h1 {
  227. font-size: 42px;
  228. line-height: 50px;
  229. }
  230. h2 {
  231. font-size: 32px;
  232. line-height: 40px;
  233. }
  234. h3 {
  235. font-size: 24px;
  236. line-height: 32px;
  237. }
  238. }
  239. }
  240. /* mobile */
  241. @media all and ( max-width: 640px ) {
  242. #page {
  243. --page-padding: 16px;
  244. --icon-size: 24px;
  245. padding: var(--page-padding);
  246. h1 {
  247. font-size: 28px;
  248. line-height: 36px;
  249. padding-right: 20px;
  250. margin-top: 0;
  251. }
  252. h2 {
  253. font-size: 24px;
  254. line-height: 32px;
  255. margin-top: 24px;
  256. }
  257. h3 {
  258. font-size: 20px;
  259. line-height: 28px;
  260. }
  261. }
  262. }
粤ICP备19079148号