general.css 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. /* Base styles and content styles */
  2. @import 'variables.css';
  3. :root {
  4. /* Browser default font-size is 16px, this way 1 rem = 10px */
  5. font-size: 62.5%;
  6. }
  7. html {
  8. font-family: "Open Sans", sans-serif;
  9. color: var(--fg);
  10. background-color: var(--bg);
  11. text-size-adjust: none;
  12. }
  13. body {
  14. margin: 0;
  15. font-size: 1.6rem;
  16. overflow-x: hidden;
  17. }
  18. code {
  19. font-family: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace !important;
  20. font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */
  21. }
  22. /* Don't change font size in headers. */
  23. h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
  24. font-size: unset;
  25. }
  26. .left { float: left; }
  27. .right { float: right; }
  28. .boring { opacity: 0.6; }
  29. .hide-boring .boring { display: none; }
  30. .hidden { display: none !important; }
  31. h2, h3, h4, h5 { margin-top: 1em; }
  32. .header + .header h3,
  33. .header + .header h4,
  34. .header + .header h5 {
  35. margin-top: 1em;
  36. }
  37. /* This is broken on Safari as of version 14, but is fixed
  38. in Safari Technology Preview 117 which I think will be Safari 14.2.
  39. https://bugs.webkit.org/show_bug.cgi?id=218076
  40. */
  41. :target {
  42. scroll-margin-top: calc(var(--menu-bar-height) + 1em);
  43. }
  44. .page {
  45. outline: 0;
  46. padding: 0 var(--page-padding);
  47. margin-top: calc(0px - var(--menu-bar-height)); /* Compensate for the #menu-bar-hover-placeholder */
  48. }
  49. .page-wrapper {
  50. box-sizing: border-box;
  51. }
  52. .js:not(.sidebar-resizing) .page-wrapper {
  53. transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */
  54. }
  55. .content {
  56. overflow-y: auto;
  57. padding: 0 15px;
  58. padding-bottom: 50px;
  59. }
  60. .content main {
  61. margin-left: auto;
  62. margin-right: auto;
  63. max-width: var(--content-max-width);
  64. }
  65. .content p { line-height: 1.45em; }
  66. .content ol { line-height: 1.45em; }
  67. .content ul { line-height: 1.45em; }
  68. .content a { text-decoration: none; }
  69. .content a:hover { text-decoration: underline; }
  70. .content img { max-width: 100%; }
  71. .content .header:link,
  72. .content .header:visited {
  73. color: var(--fg);
  74. }
  75. .content .header:link,
  76. .content .header:visited:hover {
  77. text-decoration: none;
  78. }
  79. table {
  80. margin: 0 auto;
  81. border-collapse: collapse;
  82. }
  83. table td {
  84. padding: 3px 20px;
  85. border: 1px var(--table-border-color) solid;
  86. }
  87. table thead {
  88. background: var(--table-header-bg);
  89. }
  90. table thead td {
  91. font-weight: 700;
  92. border: none;
  93. }
  94. table thead th {
  95. padding: 3px 20px;
  96. }
  97. table thead tr {
  98. border: 1px var(--table-header-bg) solid;
  99. }
  100. /* Alternate background colors for rows */
  101. table tbody tr:nth-child(2n) {
  102. background: var(--table-alternate-bg);
  103. }
  104. blockquote {
  105. margin: 20px 0;
  106. padding: 0 20px;
  107. color: var(--fg);
  108. background-color: var(--quote-bg);
  109. border-top: .1em solid var(--quote-border);
  110. border-bottom: .1em solid var(--quote-border);
  111. }
  112. :not(.footnote-definition) + .footnote-definition,
  113. .footnote-definition + :not(.footnote-definition) {
  114. margin-top: 2em;
  115. }
  116. .footnote-definition {
  117. font-size: 0.9em;
  118. margin: 0.5em 0;
  119. }
  120. .footnote-definition p {
  121. display: inline;
  122. }
  123. .tooltiptext {
  124. position: absolute;
  125. visibility: hidden;
  126. color: #fff;
  127. background-color: #333;
  128. transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */
  129. left: -8px; /* Half of the width of the icon */
  130. top: -35px;
  131. font-size: 0.8em;
  132. text-align: center;
  133. border-radius: 6px;
  134. padding: 5px 8px;
  135. margin: 5px;
  136. z-index: 1000;
  137. }
  138. .tooltipped .tooltiptext {
  139. visibility: visible;
  140. }
  141. .chapter li.part-title {
  142. color: var(--sidebar-fg);
  143. margin: 5px 0px;
  144. font-weight: bold;
  145. }