page.css 4.0 KB

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