base.scss 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. @use './mixins' as *;
  2. *,
  3. ::before,
  4. ::after {
  5. box-sizing: border-box;
  6. }
  7. html {
  8. line-height: 1.4;
  9. font-size: 16px;
  10. text-size-adjust: 100%;
  11. font-family: var(--font-family);
  12. font-weight: 400;
  13. -webkit-font-smoothing: antialiased;
  14. -webkit-tap-highlight-color: transparent;
  15. }
  16. body {
  17. margin: 0;
  18. width: 100%;
  19. min-width: 320px;
  20. min-height: 100vh;
  21. line-height: 1.4;
  22. font-size: 16px;
  23. font-weight: 400;
  24. color: var(--text-color);
  25. background-color: var(--bg-color);
  26. direction: ltr;
  27. font-synthesis: none;
  28. text-rendering: optimizeLegibility;
  29. -webkit-font-smoothing: antialiased;
  30. -moz-osx-font-smoothing: grayscale;
  31. transition: background-color var(--el-transition-duration-fast);
  32. }
  33. main {
  34. display: block;
  35. }
  36. h1,
  37. h2,
  38. h3,
  39. h4,
  40. h5,
  41. h6 {
  42. margin: 0;
  43. line-height: 1.25;
  44. }
  45. .doc-content {
  46. h1,
  47. h2,
  48. h3,
  49. h4,
  50. h5,
  51. h6 {
  52. display: flex;
  53. align-items: center;
  54. position: relative;
  55. // Special case for handling tagged header.
  56. .el-tag,
  57. .vp-tag {
  58. margin-left: 8px;
  59. }
  60. }
  61. }
  62. h1,
  63. h2,
  64. h3,
  65. h4,
  66. h5,
  67. h6,
  68. strong,
  69. b {
  70. font-weight: 600;
  71. }
  72. h1:hover .header-anchor,
  73. h1:focus .header-anchor,
  74. h2:hover .header-anchor,
  75. h2:focus .header-anchor,
  76. h3:hover .header-anchor,
  77. h3:focus .header-anchor,
  78. h4:hover .header-anchor,
  79. h4:focus .header-anchor,
  80. h5:hover .header-anchor,
  81. h5:focus .header-anchor,
  82. h6:hover .header-anchor,
  83. h6:focus .header-anchor {
  84. opacity: 1;
  85. }
  86. h1 {
  87. margin-top: 1.5rem;
  88. margin-bottom: 2rem;
  89. font-size: 1.9rem;
  90. }
  91. @include respond-to('sm') {
  92. h1 {
  93. font-size: 2.2rem;
  94. }
  95. }
  96. h2 {
  97. margin-top: 2.25rem;
  98. margin-bottom: 1.25rem;
  99. padding-bottom: 0.3rem;
  100. line-height: 1.25;
  101. font-size: 1.65rem;
  102. /* overflow-x: auto; */
  103. }
  104. h2 + h3 {
  105. margin-top: 1.5rem;
  106. }
  107. h3 {
  108. margin-top: 2rem;
  109. font-size: 1.35rem;
  110. }
  111. h4 {
  112. font-size: 1.15rem;
  113. }
  114. p,
  115. ol,
  116. ul {
  117. margin: 1rem 0;
  118. line-height: 1.7;
  119. }
  120. a,
  121. area,
  122. button,
  123. [role='button'],
  124. input,
  125. label,
  126. select,
  127. summary,
  128. textarea {
  129. touch-action: manipulation;
  130. }
  131. a {
  132. font-weight: 500;
  133. text-decoration: inherit;
  134. color: var(--brand-color);
  135. &.header-anchor {
  136. color: var(--brand-color);
  137. }
  138. }
  139. a.header-anchor {
  140. position: absolute;
  141. margin-top: 0.125em;
  142. margin-left: -0.87em;
  143. padding-right: 0.23em;
  144. font-size: 0.85em;
  145. opacity: 0;
  146. &:hover,
  147. :focus {
  148. text-decoration: none;
  149. }
  150. }
  151. figure {
  152. margin: 0;
  153. }
  154. img {
  155. max-width: 100%;
  156. }
  157. ul,
  158. ol {
  159. padding-left: 1.25em;
  160. }
  161. li > ul,
  162. li > ol {
  163. margin: 0;
  164. }
  165. .doc-content > div .vp-table {
  166. width: 100%;
  167. overflow-y: hidden;
  168. overflow-x: auto;
  169. margin-bottom: 45px;
  170. & > table {
  171. border-collapse: collapse;
  172. width: 100%;
  173. background-color: var(--bg-color);
  174. font-size: 14px;
  175. line-height: 1.5em;
  176. tr {
  177. td:nth-child(2) {
  178. font-family: var(--font-family);
  179. }
  180. }
  181. th,
  182. td {
  183. white-space: nowrap;
  184. border-top: 1px solid var(--border-color);
  185. border-bottom: 1px solid var(--border-color);
  186. padding: 0.6em 1em;
  187. text-align: left;
  188. max-width: 250px;
  189. white-space: pre-wrap;
  190. }
  191. thead tr:first-child th {
  192. border-top: none;
  193. }
  194. tbody tr td:first-child {
  195. font-family: var(--font-family-mono);
  196. }
  197. }
  198. }
  199. blockquote {
  200. margin: 1rem 0;
  201. border-left: 0.2rem solid var(--el-border-color);
  202. padding: 0.25rem 0 0.25rem 1rem;
  203. font-size: 1rem;
  204. color: var(--text-color-lighter);
  205. }
  206. blockquote > p {
  207. margin: 0;
  208. }
  209. form {
  210. margin: 0;
  211. }
  212. details {
  213. summary {
  214. margin: 16px 0;
  215. font-size: 18px;
  216. font-weight: 600;
  217. }
  218. }
  219. .el-popover.is-light.translation-popup {
  220. background-color: var(--bg-color) !important;
  221. border-color: var(--border-color);
  222. border-radius: 8px;
  223. padding: 12px 0;
  224. min-width: 192px;
  225. border: 1px solid transparent;
  226. transition: background-color 0.5s;
  227. }
  228. #nprogress .bar {
  229. background: var(--brand-color) !important;
  230. }
  231. .custom-block {
  232. .custom-block-title {
  233. font-weight: 700;
  234. }
  235. p:not(.custom-block-title) {
  236. font-size: 0.9rem;
  237. }
  238. &.tip {
  239. padding: 8px 16px;
  240. background-color: var(--block-tip-bg-color);
  241. border-radius: 4px;
  242. border-left: 5px solid var(--el-color-primary);
  243. margin: 20px 0;
  244. }
  245. &.warning {
  246. padding: 8px 16px;
  247. background-color: var(--block-warning-bg-color);
  248. border-radius: 4px;
  249. border-left: 5px solid var(--el-color-danger);
  250. margin: 20px 0;
  251. }
  252. }