page.css 3.7 KB

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