1
0

page.css 4.3 KB

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