page.css 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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. direction: ltr !important;
  66. text-align: initial;
  67. }
  68. a {
  69. color: var(--color-blue);
  70. cursor: pointer;
  71. text-decoration: none;
  72. }
  73. h1 {
  74. font-size: 40px;
  75. line-height: 48px;
  76. font-weight: normal;
  77. margin-left: -2px;
  78. margin-top: 16px;
  79. margin-bottom: -8px;
  80. }
  81. h2 {
  82. font-size: 28px;
  83. line-height: 36px;
  84. font-weight: normal;
  85. margin-left: -1px;
  86. margin-top: 28px;
  87. margin-bottom: -8px;
  88. }
  89. h3 {
  90. font-size: 20px;
  91. line-height: 28px;
  92. font-weight: normal;
  93. margin-top: 24px;
  94. margin-bottom: -8px;
  95. }
  96. p,
  97. div,
  98. table,
  99. ol,
  100. ul,
  101. summary {
  102. margin-top: 16px;
  103. margin-bottom: 16px;
  104. }
  105. p {
  106. padding-right: 16px;
  107. }
  108. ul, ol {
  109. box-sizing: border-box;
  110. padding-left: 24px;
  111. }
  112. ul li,
  113. ol li {
  114. padding-left: 4px;
  115. margin-bottom: 4px;
  116. }
  117. li ul,
  118. li ol {
  119. margin-top: 4px;
  120. }
  121. code {
  122. font-size: calc(var(--font-size) - 1px);
  123. line-height: calc(var(--line-height) - 1px);
  124. margin: 16px calc(-1 * var(--page-padding));
  125. }
  126. ol code,
  127. ul code {
  128. margin: 16px 0;
  129. }
  130. code.inline {
  131. display: inline-block;
  132. vertical-align: middle;
  133. border-radius: 4px;
  134. padding: 0px 5px;
  135. background: #F5F5F5;
  136. margin: 0;
  137. }
  138. table {
  139. width: 100%;
  140. border-collapse: collapse;
  141. }
  142. .desc {
  143. padding-left: 0px;
  144. }
  145. table th,
  146. table td {
  147. text-align: left;
  148. vertical-align: top;
  149. padding: 8px 6px;
  150. border-bottom: var(--border-style);
  151. }
  152. table th {
  153. text-decoration: none;
  154. }
  155. table th:first-child,
  156. table td:first-child {
  157. padding-left: 0;
  158. }
  159. code:not(.inline) {
  160. display: block;
  161. padding: calc(var(--page-padding) - 6px) var(--page-padding);
  162. white-space: pre-wrap;
  163. overflow: auto;
  164. box-sizing: border-box;
  165. }
  166. iframe {
  167. width: 100%;
  168. height: 420px;
  169. border:0;
  170. }
  171. table code {
  172. padding: 0px;
  173. margin: 0px;
  174. width: auto;
  175. }
  176. strong {
  177. font-weight: 600;
  178. }
  179. /* TODO: Duplicate styles in main.css. Needed here cause button is inside the iframe */
  180. #button {
  181. position: fixed;
  182. bottom: 16px;
  183. right: 16px;
  184. padding: 12px;
  185. border-radius: 50%;
  186. margin-bottom: 0px;
  187. background-color: #FFF;
  188. opacity: .9;
  189. z-index: 999;
  190. box-shadow: 0 0 4px rgba(0,0,0,.15);
  191. }
  192. #button:hover {
  193. cursor: pointer;
  194. opacity: 1;
  195. }
  196. #button img {
  197. display: block;
  198. width: var(--icon-size);
  199. }
  200. a.permalink {
  201. float: right;
  202. margin-left: 5px;
  203. display: none;
  204. }
  205. a.param,
  206. span.param {
  207. color: #999;
  208. }
  209. a.param:hover {
  210. color: var(--text-color);
  211. }
  212. @media all and ( min-width: 1700px ) {
  213. :root {
  214. --panel-width: 360px;
  215. --font-size: 18px;
  216. --line-height: 28px;
  217. --max-width: 880px;
  218. --page-padding: 28px;
  219. --icon-size: 24px;
  220. }
  221. h1 {
  222. font-size: 42px;
  223. line-height: 50px;
  224. }
  225. h2 {
  226. font-size: 32px;
  227. line-height: 40px;
  228. }
  229. h3 {
  230. font-size: 24px;
  231. line-height: 32px;
  232. }
  233. }
  234. /* mobile */
  235. @media all and ( max-width: 640px ) {
  236. :root {
  237. --page-padding: 16px;
  238. --icon-size: 24px;
  239. }
  240. body {
  241. padding: var(--page-padding);
  242. }
  243. h1 {
  244. font-size: 28px;
  245. line-height: 36px;
  246. padding-right: 20px;
  247. margin-top: 0;
  248. }
  249. h2 {
  250. font-size: 24px;
  251. line-height: 32px;
  252. margin-top: 24px;
  253. }
  254. h3 {
  255. font-size: 20px;
  256. line-height: 28px;
  257. }
  258. }