page.css 3.8 KB

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