page.css 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. :root {
  2. color-scheme: light dark;
  3. --color-blue: #049EF4;
  4. --text-color: #444;
  5. --font-size: 16px;
  6. --line-height: 26px;
  7. --border-style: 1px solid #E8E8E8;
  8. --panel-width: 300px;
  9. --page-padding: 24px;
  10. --max-width: 760px;
  11. --icon-size: 20px;
  12. }
  13. @media (prefers-color-scheme: dark) {
  14. :root {
  15. --text-color: #bbb;
  16. --border-style: 1px solid #444;
  17. }
  18. }
  19. @font-face {
  20. font-family: 'Roboto Mono';
  21. src: local('Roboto Mono'), local('RobotoMono-Regular'), url('../files/RobotoMono-Regular.woff2') format('woff2');
  22. font-style: normal;
  23. font-weight: 400;
  24. }
  25. @font-face {
  26. font-family: 'Inter';
  27. font-style: normal;
  28. font-weight: 400;
  29. src: local('Inter-Regular'), url("../files/Inter-Regular.woff2?v=3.6") format("woff2");
  30. }
  31. @font-face {
  32. font-family: 'Inter';
  33. font-style: normal;
  34. font-weight: 600;
  35. src: local('Inter-SemiBold'), url("../files/Inter-SemiBold.woff2?v=3.6") format("woff2");
  36. }
  37. html {
  38. font-family: 'Inter', sans-serif;
  39. font-size: var(--font-size);
  40. line-height: var(--line-height);
  41. }
  42. body {
  43. color: var(--text-color);
  44. tab-size: 4;
  45. overflow: auto;
  46. max-width: var(--max-width);
  47. margin: 0 auto;
  48. padding-top: var(--page-padding);
  49. padding-bottom: var(--page-padding);
  50. padding-right: var(--page-padding);
  51. padding-left: calc(var(--page-padding) + var(--panel-width));
  52. word-break: break-word;
  53. }
  54. body.rtl h1,
  55. body.rtl h2,
  56. body.rtl h3,
  57. body.rtl h4,
  58. body.rtl p,
  59. body.rtl ul,
  60. body.rtl ol,
  61. body.rtl table {
  62. direction: rtl !important;
  63. }
  64. body.rtl code,
  65. body.rtl .RtlTitle {
  66. direction: ltr !important;
  67. text-align: initial;
  68. }
  69. a {
  70. color: var(--color-blue);
  71. cursor: pointer;
  72. text-decoration: none;
  73. }
  74. h1 {
  75. font-size: 40px;
  76. line-height: 48px;
  77. font-weight: normal;
  78. margin-left: -2px;
  79. margin-top: 16px;
  80. margin-bottom: -8px;
  81. }
  82. h2 {
  83. font-size: 28px;
  84. line-height: 36px;
  85. font-weight: normal;
  86. margin-left: -1px;
  87. margin-top: 28px;
  88. margin-bottom: -8px;
  89. }
  90. h3 {
  91. font-size: 20px;
  92. line-height: 28px;
  93. font-weight: normal;
  94. margin-top: 24px;
  95. margin-bottom: -8px;
  96. }
  97. p,
  98. div,
  99. table,
  100. ol,
  101. ul,
  102. summary {
  103. margin-top: 16px;
  104. margin-bottom: 16px;
  105. }
  106. p {
  107. padding-right: 16px;
  108. }
  109. ul, ol {
  110. box-sizing: border-box;
  111. padding-left: 24px;
  112. }
  113. ul li,
  114. ol li {
  115. padding-left: 4px;
  116. margin-bottom: 4px;
  117. }
  118. li ul,
  119. li ol {
  120. margin-top: 4px;
  121. }
  122. code {
  123. font-size: calc(var(--font-size) - 1px);
  124. line-height: calc(var(--line-height) - 1px);
  125. margin: 16px calc(-1 * var(--page-padding));
  126. }
  127. ol code,
  128. ul code {
  129. margin: 16px 0;
  130. }
  131. code.inline {
  132. display: inline-block;
  133. vertical-align: middle;
  134. border-radius: 4px;
  135. padding: 0px 5px;
  136. background: #F5F5F5;
  137. margin: 0;
  138. }
  139. table {
  140. width: 100%;
  141. border-collapse: collapse;
  142. }
  143. .desc {
  144. padding-left: 0px;
  145. }
  146. table th,
  147. table td {
  148. text-align: left;
  149. vertical-align: top;
  150. padding: 8px 6px;
  151. border-bottom: var(--border-style);
  152. }
  153. table th {
  154. text-decoration: none;
  155. }
  156. table th:first-child,
  157. table td:first-child {
  158. padding-left: 0;
  159. }
  160. code:not(.inline) {
  161. display: block;
  162. padding: calc(var(--page-padding) - 6px) var(--page-padding);
  163. white-space: pre-wrap;
  164. overflow: auto;
  165. box-sizing: border-box;
  166. }
  167. iframe {
  168. width: 100%;
  169. height: 420px;
  170. border:0;
  171. }
  172. table code {
  173. padding: 0px;
  174. margin: 0px;
  175. width: auto;
  176. }
  177. strong {
  178. font-weight: 600;
  179. }
  180. /* TODO: Duplicate styles in main.css. Needed here cause button is inside the iframe */
  181. #button {
  182. position: fixed;
  183. bottom: 16px;
  184. right: 16px;
  185. padding: 12px;
  186. border-radius: 50%;
  187. margin-bottom: 0px;
  188. background-color: #FFF;
  189. opacity: .9;
  190. z-index: 999;
  191. box-shadow: 0 0 4px rgba(0,0,0,.15);
  192. }
  193. #button:hover {
  194. cursor: pointer;
  195. opacity: 1;
  196. }
  197. #button img {
  198. display: block;
  199. width: var(--icon-size);
  200. }
  201. a.permalink {
  202. float: right;
  203. margin-left: 5px;
  204. display: none;
  205. }
  206. a.param,
  207. span.param {
  208. color: #999;
  209. }
  210. a.param:hover {
  211. color: var(--text-color);
  212. }
  213. @media all and ( min-width: 1700px ) {
  214. :root {
  215. --panel-width: 360px;
  216. --font-size: 18px;
  217. --line-height: 28px;
  218. --max-width: 880px;
  219. --page-padding: 28px;
  220. --icon-size: 24px;
  221. }
  222. h1 {
  223. font-size: 42px;
  224. line-height: 50px;
  225. }
  226. h2 {
  227. font-size: 32px;
  228. line-height: 40px;
  229. }
  230. h3 {
  231. font-size: 24px;
  232. line-height: 32px;
  233. }
  234. }
  235. /* mobile */
  236. @media all and ( max-width: 640px ) {
  237. :root {
  238. --page-padding: 16px;
  239. --icon-size: 24px;
  240. }
  241. body {
  242. padding: var(--page-padding);
  243. }
  244. h1 {
  245. font-size: 28px;
  246. line-height: 36px;
  247. padding-right: 20px;
  248. margin-top: 0;
  249. }
  250. h2 {
  251. font-size: 24px;
  252. line-height: 32px;
  253. margin-top: 24px;
  254. }
  255. h3 {
  256. font-size: 20px;
  257. line-height: 28px;
  258. }
  259. }