_base.scss 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  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. abbr, acronym, dfn {
  82. cursor: help;
  83. border-bottom: 1px dotted var(--textColor);
  84. }
  85. pre, code, samp, %pre, %code {
  86. font-family: var(--monoFont);
  87. font-weight: normal;
  88. font-style: normal;
  89. font-size: .9em;
  90. color: var(--textColor);
  91. white-space: pre-wrap;
  92. direction: ltr;
  93. -moz-tab-size: 2;
  94. -o-tab-size: 2;
  95. tab-size: 2;
  96. }
  97. pre, %pre {
  98. position: relative;
  99. margin: 1.5em 0;
  100. padding: .375rem .625rem;
  101. line-height: 1.5;
  102. overflow: auto;
  103. @extend %box;
  104. }
  105. a > code { color: inherit; }
  106. table {
  107. margin: 1.5em 0;
  108. background: none;
  109. border: 1px solid var(--boxBorder);
  110. border-collapse: separate;
  111. border-spacing: 0;
  112. border-radius: 3px;
  113. display: inline-block;
  114. overflow-x: auto;
  115. max-width: 100%;
  116. }
  117. caption {
  118. font-weight: var(--boldFontWeight);
  119. padding: 0 .7em .3em;
  120. }
  121. th, td {
  122. vertical-align: top;
  123. padding: .3em .7em;
  124. padding-bottom: -webkit-calc(.3em + 1px);
  125. padding-bottom: calc(.3em + 1px);
  126. text-align: left;
  127. white-space: normal !important;
  128. }
  129. th {
  130. font-weight: var(--boldFontWeight);
  131. border: 0;
  132. border-bottom: 1px solid var(--boxBorder);
  133. border-radius: 0;
  134. @extend %heading-box;
  135. &:empty { background: none; }
  136. + th, + td { border-left: 1px solid var(--boxBorder); }
  137. tr:first-child > &:first-child { border-top-left-radius: 3px; }
  138. tr:first-child > &:last-child { border-top-right-radius: 3px; }
  139. tr:last-child > &:first-child { border-bottom-left-radius: 3px; }
  140. thead > tr:last-child > &:first-child { border-bottom-left-radius: 0; }
  141. tr:last-child > & { border-bottom-width: 0; }
  142. thead > tr:last-child > & { border-bottom-width: 1px; }
  143. }
  144. td {
  145. background: var(--contentBackground);
  146. border-bottom: 1px solid var(--boxBorderLight);
  147. + td { border-left: 1px solid var(--boxBorderLight); }
  148. tr:last-child > & { border-bottom: 0; }
  149. > pre:only-child, > p:only-child, > ul:only-child, > ol:only-child {
  150. margin-top: 0;
  151. margin-bottom: 0;
  152. }
  153. > pre:first-child, > p:first-child, > ul:first-child, > ol:first-child { margin-top: 0; }
  154. > pre:last-child, > p:last-child, > ul:last-child, > ol:last-child { margin-bottom: 0; }
  155. }
  156. section, main {
  157. display: block;
  158. outline: 0;
  159. }
  160. label {
  161. display: block;
  162. @extend %user-select-none;
  163. }
  164. input, button {
  165. display: inline-block;
  166. margin: 0;
  167. font-family: inherit;
  168. font-size: 100%;
  169. color: var(--textColor);
  170. line-height: normal;
  171. @extend %border-box;
  172. }
  173. input[type=checkbox] {
  174. width: 1rem;
  175. height: 1rem;
  176. cursor: pointer;
  177. }
  178. button {
  179. padding: 0;
  180. background: none;
  181. border: 0;
  182. cursor: pointer;
  183. }
  184. button, input[type="search"] {
  185. -webkit-appearance: none;
  186. appearance: none;
  187. }
  188. button:focus {
  189. outline: 1px dotted;
  190. outline: -webkit-focus-ring-color auto 5px;
  191. }
  192. img, iframe {
  193. background: var(--externalsBackground);
  194. }
  195. input[type="search"]::-webkit-search-cancel-button,
  196. input[type="search"]::-webkit-search-decoration {
  197. -webkit-appearance: none;
  198. }
  199. ::-ms-clear { display: none; }
  200. ::-moz-focus-inner {
  201. padding: 0 !important;
  202. border: 0 !important;
  203. }
  204. ::-webkit-input-placeholder { color: var(--textColorLighter); }
  205. ::-moz-placeholder { color: var(--textColorLighter); opacity: 1; }
  206. :-ms-input-placeholder { color: var(--textColorLighter); }
  207. body:not(._native-scrollbars) {
  208. *::-webkit-scrollbar { -webkit-appearance: none; }
  209. *::-webkit-scrollbar:vertical { width: 16px; }
  210. *::-webkit-scrollbar:horizontal { height: 16px; }
  211. *::-webkit-scrollbar-button,
  212. *::-webkit-scrollbar-corner { display: none; }
  213. *::-webkit-scrollbar-track {
  214. background: var(--contentBackground);
  215. border: 1px solid var(--contentBackground);
  216. &:hover {
  217. background: var(--sidebarBackground);
  218. border-color: var(--sidebarBorder);
  219. }
  220. &:vertical { border-width: 0 0 0 1px; }
  221. &:vertical:corner-present {
  222. border-width: 0 0 1px 1px;
  223. border-radius: 0 0 0 2px;
  224. }
  225. &:horizontal {
  226. border-width: 1px 1px 0 1px;
  227. border-radius: 2px 2px 0 0;
  228. }
  229. }
  230. *::-webkit-scrollbar-thumb {
  231. min-height: 2rem;
  232. background: var(--scrollbarColor);
  233. background-clip: padding-box;
  234. border: 5px solid rgba(black, 0);
  235. border-radius: 10px;
  236. &:hover,
  237. &:active {
  238. background-color: var(--scrollbarColorHover);
  239. border-width: 4px;
  240. }
  241. }
  242. }