layout.css 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. *,
  2. ::before,
  3. ::after {
  4. box-sizing: border-box;
  5. }
  6. html {
  7. line-height: 1.4;
  8. font-size: 16px;
  9. -webkit-text-size-adjust: 100%;
  10. }
  11. body {
  12. margin: 0;
  13. width: 100%;
  14. min-width: 320px;
  15. min-height: 100vh;
  16. line-height: 1.4;
  17. font-family: var(--font-family-base);
  18. font-size: 16px;
  19. font-weight: 400;
  20. color: var(--c-text);
  21. background-color: var(--c-bg);
  22. direction: ltr;
  23. font-synthesis: none;
  24. text-rendering: optimizeLegibility;
  25. -webkit-font-smoothing: antialiased;
  26. -moz-osx-font-smoothing: grayscale;
  27. }
  28. main {
  29. display: block;
  30. }
  31. h1,
  32. h2,
  33. h3,
  34. h4,
  35. h5,
  36. h6 {
  37. margin: 0;
  38. line-height: 1.25;
  39. }
  40. h1,
  41. h2,
  42. h3,
  43. h4,
  44. h5,
  45. h6,
  46. strong,
  47. b {
  48. font-weight: 600;
  49. }
  50. h1:hover .header-anchor,
  51. h1:focus .header-anchor,
  52. h2:hover .header-anchor,
  53. h2:focus .header-anchor,
  54. h3:hover .header-anchor,
  55. h3:focus .header-anchor,
  56. h4:hover .header-anchor,
  57. h4:focus .header-anchor,
  58. h5:hover .header-anchor,
  59. h5:focus .header-anchor,
  60. h6:hover .header-anchor,
  61. h6:focus .header-anchor {
  62. opacity: 1;
  63. }
  64. h1 {
  65. margin-top: 1.5rem;
  66. font-size: 1.9rem;
  67. }
  68. @media screen and (min-width: 420px) {
  69. h1 {
  70. font-size: 2.2rem;
  71. }
  72. }
  73. h2 {
  74. margin-top: 2.25rem;
  75. margin-bottom: 1.25rem;
  76. border-bottom: 1px solid var(--c-divider);
  77. padding-bottom: 0.3rem;
  78. line-height: 1.25;
  79. font-size: 1.65rem;
  80. /* overflow-x: auto; */
  81. }
  82. h2 + h3 {
  83. margin-top: 1.5rem;
  84. }
  85. h3 {
  86. margin-top: 2rem;
  87. font-size: 1.35rem;
  88. }
  89. h4 {
  90. font-size: 1.15rem;
  91. }
  92. p,
  93. ol,
  94. ul {
  95. margin: 1rem 0;
  96. line-height: 1.7;
  97. }
  98. a,
  99. area,
  100. button,
  101. [role='button'],
  102. input,
  103. label,
  104. select,
  105. summary,
  106. textarea {
  107. touch-action: manipulation;
  108. }
  109. a {
  110. text-decoration: none;
  111. color: var(--c-brand);
  112. }
  113. a:hover {
  114. text-decoration: underline;
  115. }
  116. a.header-anchor {
  117. float: left;
  118. margin-top: 0.125em;
  119. margin-left: -0.87em;
  120. padding-right: 0.23em;
  121. font-size: 0.85em;
  122. opacity: 0;
  123. }
  124. a.header-anchor:hover,
  125. a.header-anchor:focus {
  126. text-decoration: none;
  127. }
  128. figure {
  129. margin: 0;
  130. }
  131. img {
  132. max-width: 100%;
  133. }
  134. ul,
  135. ol {
  136. padding-left: 1.25em;
  137. }
  138. li > ul,
  139. li > ol {
  140. margin: 0;
  141. }
  142. table {
  143. display: block;
  144. border-collapse: collapse;
  145. margin: 1rem 0;
  146. overflow-x: auto;
  147. }
  148. tr {
  149. border-top: 1px solid #dfe2e5;
  150. }
  151. tr:nth-child(2n) {
  152. background-color: #f6f8fa;
  153. }
  154. th,
  155. td {
  156. border: 1px solid #dfe2e5;
  157. padding: 0.6em 1em;
  158. }
  159. blockquote {
  160. margin: 1rem 0;
  161. border-left: 0.2rem solid #dfe2e5;
  162. padding: 0.25rem 0 0.25rem 1rem;
  163. font-size: 1rem;
  164. color: #999;
  165. }
  166. blockquote > p {
  167. margin: 0;
  168. }
  169. form {
  170. margin: 0;
  171. }
  172. .theme.sidebar-open .sidebar-mask {
  173. display: block;
  174. }
  175. .theme.no-navbar > h1,
  176. .theme.no-navbar > h2,
  177. .theme.no-navbar > h3,
  178. .theme.no-navbar > h4,
  179. .theme.no-navbar > h5,
  180. .theme.no-navbar > h6 {
  181. margin-top: 1.5rem;
  182. padding-top: 0;
  183. }
  184. .theme.no-navbar aside {
  185. top: 0;
  186. }
  187. @media screen and (min-width: 720px) {
  188. .theme.no-sidebar aside {
  189. display: none;
  190. }
  191. .theme.no-sidebar main {
  192. margin-left: 0;
  193. }
  194. }
  195. .sidebar-mask {
  196. position: fixed;
  197. z-index: 2;
  198. display: none;
  199. width: 100vw;
  200. height: 100vh;
  201. }