page.css 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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.5rem;
  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. }
  104. ol code,
  105. ul code {
  106. margin: 1.2rem 0;
  107. }
  108. table {
  109. width: 100%;
  110. border-collapse: collapse;
  111. }
  112. .desc {
  113. padding-left: 0px;
  114. }
  115. table th,
  116. table td {
  117. text-align: left;
  118. vertical-align: top;
  119. padding: .6rem .4rem;
  120. border-bottom: var(--border-style);
  121. }
  122. table th {
  123. text-decoration: none;
  124. }
  125. table th:first-child,
  126. table td:first-child {
  127. padding-left: 0;
  128. }
  129. code {
  130. display: block;
  131. padding: 1.32rem var(--page-padding);
  132. white-space: pre-wrap;
  133. overflow: auto;
  134. box-sizing: border-box;
  135. }
  136. iframe {
  137. width: 100%;
  138. height: 420px;
  139. border:0;
  140. }
  141. table code {
  142. padding: 0px;
  143. margin: 0px;
  144. width: auto;
  145. }
  146. strong {
  147. font-weight: bold;
  148. }
  149. /* TODO: Duplicate styles in main.css. Needed here cause button is inside the iframe */
  150. #button {
  151. position: fixed;
  152. bottom: 1rem;
  153. right: 1rem;
  154. padding: 0.75rem;
  155. border-radius: 2rem;
  156. margin-bottom: 0px;
  157. background-color: #FFF;
  158. opacity: .9;
  159. z-index: 999;
  160. box-shadow: 0 0 4px rgba(0,0,0,.15);
  161. }
  162. #button:hover {
  163. cursor: pointer;
  164. opacity: 1;
  165. }
  166. #button img {
  167. display: block;
  168. width: calc(1.125 * var(--icon-size));
  169. }
  170. a.permalink {
  171. float: right;
  172. margin-left: 5px;
  173. display: none;
  174. }
  175. a.param,
  176. span.param {
  177. color: #999;
  178. }
  179. a.param:hover {
  180. color: var(--text-color);
  181. }
  182. @media all and ( min-width: 1700px ) {
  183. :root {
  184. --panel-width: 360px;
  185. --font-size: 18px;
  186. --line-height: 30px;
  187. --header-height: 60px;
  188. --max-width: 1160px;
  189. }
  190. }
  191. /* @media all and ( min-width: 2400px ) {
  192. :root {
  193. --panel-width: 480px;
  194. --font-size: 24px;
  195. --line-height: 38px;
  196. --header-height: 72px;
  197. --max-width: 1280px;
  198. }
  199. } */
  200. /* mobile */
  201. @media all and ( max-width: 640px ) {
  202. :root {
  203. --page-padding: var(--panel-padding);
  204. }
  205. body {
  206. padding: var(--page-padding);
  207. }
  208. h1 {
  209. font-size: 2rem;
  210. line-height: 2.6rem;
  211. padding-right: 2rem;
  212. margin-top: 0;
  213. }
  214. h2 {
  215. font-size: 1.6rem;
  216. line-height: 2.2rem;
  217. margin-top: 1.6rem;
  218. }
  219. }