_base.scss 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. html {
  2. height: 100%;
  3. font-size: 100%;
  4. background: #fff; // fallback to show the error message to browsers that don't support CSS variables.
  5. background: var(--documentBackground);
  6. @include mobile { font-size: 93.75%; }
  7. @include print { background: none; }
  8. @import 'global/print';
  9. }
  10. html._theme-default {
  11. color-scheme: light only;
  12. }
  13. html._theme-dark {
  14. color-scheme: dark only;
  15. }
  16. body {
  17. height: 100%;
  18. margin: 0;
  19. overflow: auto;
  20. font-size: 1em;
  21. font-weight: normal;
  22. font-family: $baseFont;
  23. line-height: 1.7;
  24. color: $textColor; // fallback to show the error message to browsers that don't support CSS variables.
  25. color: var(--textColor);
  26. word-wrap: break-word;
  27. overflow-wrap: break-word;
  28. background: var(--contentBackground);
  29. touch-action: manipulation;
  30. -webkit-tap-highlight-color: rgba(black, 0);
  31. -webkit-touch-callout: none;
  32. -webkit-text-size-adjust: 100%;
  33. -ms-text-size-adjust: 100%;
  34. }
  35. a {
  36. color: var(--linkColor);
  37. text-decoration: var(--linkTextDecoration);
  38. &:hover {
  39. color: var(--linkColorHover);
  40. text-decoration: underline;
  41. }
  42. }
  43. img {
  44. max-width: 100%;
  45. height: auto;
  46. border: 0;
  47. }
  48. h1, h2, h3, h4, h5, h6 {
  49. margin: 1.5em 0 1em;
  50. line-height: 1.3;
  51. font-weight: var(--bolderFontWeight);
  52. }
  53. h1 { font-size: 1.5em; }
  54. h2 { font-size: 1.375em; }
  55. h3 { font-size: 1.25em; }
  56. h4 { font-size: 1.125em; }
  57. h5, h6 { font-size: 1em; }
  58. p { margin: 0 0 1em; }
  59. p:last-child { margin-bottom: 0; }
  60. b, strong { font-weight: var(--boldFontWeight); }
  61. small { font-size: .9em; }
  62. ul, ol {
  63. margin: 1.5em 0;
  64. padding: 0 0 0 2em;
  65. list-style: disc outside;
  66. }
  67. ul ul { list-style-type: circle; }
  68. ol { list-style-type: decimal; }
  69. ol ol { list-style-type: lower-alpha; }
  70. ol ol ol { list-style-type: lower-roman; }
  71. li + li { margin-top: .25em; }
  72. li > ul, li > ol, dd > ul, dd > ol { margin: .5em 0; }
  73. li > p { margin-bottom: .25em; }
  74. dl { margin: 1.5em 0; }
  75. dt { font-weight: var(--boldFontWeight); }
  76. dd {
  77. margin: .375em;
  78. padding-left: 1em;
  79. + dt { margin-top: 1em; }
  80. }
  81. dfn, var { font-style: normal; }
  82. abbr, acronym, dfn {
  83. cursor: help;
  84. border-bottom: 1px dotted var(--textColor);
  85. }
  86. pre, code, samp, %pre, %code {
  87. font-family: var(--monoFont);
  88. font-weight: normal;
  89. font-style: normal;
  90. font-size: .9em;
  91. color: var(--textColor);
  92. white-space: pre-wrap;
  93. direction: ltr;
  94. -moz-tab-size: 2;
  95. -o-tab-size: 2;
  96. tab-size: 2;
  97. }
  98. pre, %pre {
  99. position: relative;
  100. margin: 1.5em 0;
  101. padding: .375rem .625rem;
  102. line-height: 1.5;
  103. overflow: auto;
  104. @extend %box;
  105. }
  106. a > code { color: inherit; }
  107. table {
  108. margin: 1.5em 0;
  109. background: none;
  110. border: 1px solid var(--boxBorder);
  111. border-collapse: separate;
  112. border-spacing: 0;
  113. border-radius: 3px;
  114. display: inline-block;
  115. overflow-x: auto;
  116. max-width: 100%;
  117. }
  118. caption {
  119. font-weight: var(--boldFontWeight);
  120. padding: 0 .7em .3em;
  121. }
  122. th, td {
  123. vertical-align: top;
  124. padding: .3em .7em;
  125. padding-bottom: -webkit-calc(.3em + 1px);
  126. padding-bottom: calc(.3em + 1px);
  127. text-align: left;
  128. white-space: normal !important;
  129. }
  130. th {
  131. font-weight: var(--boldFontWeight);
  132. border: 0;
  133. border-bottom: 1px solid var(--boxBorder);
  134. border-radius: 0;
  135. @extend %heading-box;
  136. &:empty { background: none; }
  137. + th, + td { border-left: 1px solid var(--boxBorder); }
  138. tr:first-child > &:first-child { border-top-left-radius: 3px; }
  139. tr:first-child > &:last-child { border-top-right-radius: 3px; }
  140. tr:last-child > &:first-child { border-bottom-left-radius: 3px; }
  141. thead > tr:last-child > &:first-child { border-bottom-left-radius: 0; }
  142. tr:last-child > & { border-bottom-width: 0; }
  143. thead > tr:last-child > & { border-bottom-width: 1px; }
  144. }
  145. td {
  146. background: var(--contentBackground);
  147. border-bottom: 1px solid var(--boxBorderLight);
  148. + td { border-left: 1px solid var(--boxBorderLight); }
  149. tr:last-child > & { border-bottom: 0; }
  150. > pre:only-child, > p:only-child, > ul:only-child, > ol:only-child {
  151. margin-top: 0;
  152. margin-bottom: 0;
  153. }
  154. > pre:first-child, > p:first-child, > ul:first-child, > ol:first-child { margin-top: 0; }
  155. > pre:last-child, > p:last-child, > ul:last-child, > ol:last-child { margin-bottom: 0; }
  156. }
  157. section, main {
  158. display: block;
  159. outline: 0;
  160. }
  161. label {
  162. display: block;
  163. @extend %user-select-none;
  164. }
  165. input, button {
  166. display: inline-block;
  167. margin: 0;
  168. font-family: inherit;
  169. font-size: 100%;
  170. color: var(--textColor);
  171. line-height: normal;
  172. @extend %border-box;
  173. }
  174. input[type=checkbox] {
  175. width: 1rem;
  176. height: 1rem;
  177. cursor: pointer;
  178. }
  179. button {
  180. padding: 0;
  181. background: none;
  182. border: 0;
  183. cursor: pointer;
  184. }
  185. button, input[type="search"] {
  186. -webkit-appearance: none;
  187. appearance: none;
  188. }
  189. button:focus {
  190. outline: 1px dotted;
  191. outline: -webkit-focus-ring-color auto 5px;
  192. }
  193. img, iframe {
  194. background: var(--externalsBackground);
  195. }
  196. input[type="search"]::-webkit-search-cancel-button,
  197. input[type="search"]::-webkit-search-decoration {
  198. -webkit-appearance: none;
  199. }
  200. ::-ms-clear { display: none; }
  201. ::-moz-focus-inner {
  202. padding: 0 !important;
  203. border: 0 !important;
  204. }
  205. ::-webkit-input-placeholder { color: var(--textColorLighter); }
  206. ::-moz-placeholder { color: var(--textColorLighter); opacity: 1; }
  207. :-ms-input-placeholder { color: var(--textColorLighter); }
  208. body:not(._native-scrollbars) {
  209. *::-webkit-scrollbar { -webkit-appearance: none; }
  210. *::-webkit-scrollbar:vertical { width: 16px; }
  211. *::-webkit-scrollbar:horizontal { height: 16px; }
  212. *::-webkit-scrollbar-button,
  213. *::-webkit-scrollbar-corner { display: none; }
  214. *::-webkit-scrollbar-track {
  215. background: var(--contentBackground);
  216. border: 1px solid var(--contentBackground);
  217. &:hover {
  218. background: var(--sidebarBackground);
  219. border-color: var(--sidebarBorder);
  220. }
  221. &:vertical { border-width: 0 0 0 1px; }
  222. &:vertical:corner-present {
  223. border-width: 0 0 1px 1px;
  224. border-radius: 0 0 0 2px;
  225. }
  226. &:horizontal {
  227. border-width: 1px 1px 0 1px;
  228. border-radius: 2px 2px 0 0;
  229. }
  230. }
  231. *::-webkit-scrollbar-thumb {
  232. min-height: 2rem;
  233. background: var(--scrollbarColor);
  234. background-clip: padding-box;
  235. border: 5px solid rgba(black, 0);
  236. border-radius: 10px;
  237. &:hover,
  238. &:active {
  239. background-color: var(--scrollbarColorHover);
  240. border-width: 4px;
  241. }
  242. }
  243. }