general.css 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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 { margin-top: 2.5em; }
  32. h4, h5 { margin-top: 2em; }
  33. .header + .header h3,
  34. .header + .header h4,
  35. .header + .header h5 {
  36. margin-top: 1em;
  37. }
  38. h1:target::before,
  39. h2:target::before,
  40. h3:target::before,
  41. h4:target::before,
  42. h5:target::before,
  43. h6:target::before {
  44. display: inline-block;
  45. content: "»";
  46. margin-left: -30px;
  47. width: 30px;
  48. }
  49. /* This is broken on Safari as of version 14, but is fixed
  50. in Safari Technology Preview 117 which I think will be Safari 14.2.
  51. https://bugs.webkit.org/show_bug.cgi?id=218076
  52. */
  53. :target {
  54. scroll-margin-top: calc(var(--menu-bar-height) + 0.5em);
  55. }
  56. .page {
  57. outline: 0;
  58. padding: 0 var(--page-padding);
  59. margin-top: calc(0px - var(--menu-bar-height)); /* Compensate for the #menu-bar-hover-placeholder */
  60. }
  61. .page-wrapper {
  62. box-sizing: border-box;
  63. }
  64. .js:not(.sidebar-resizing) .page-wrapper {
  65. transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */
  66. }
  67. .content {
  68. overflow-y: auto;
  69. padding: 0 15px;
  70. padding-bottom: 50px;
  71. }
  72. .content main {
  73. margin-left: auto;
  74. margin-right: auto;
  75. max-width: var(--content-max-width);
  76. }
  77. .content p { line-height: 1.45em; }
  78. .content ol { line-height: 1.45em; }
  79. .content ul { line-height: 1.45em; }
  80. .content a { text-decoration: none; }
  81. .content a:hover { text-decoration: underline; }
  82. .content img, .content video { max-width: 100%; }
  83. .content .header:link,
  84. .content .header:visited {
  85. color: var(--fg);
  86. }
  87. .content .header:link,
  88. .content .header:visited:hover {
  89. text-decoration: none;
  90. }
  91. table {
  92. margin: 0 auto;
  93. border-collapse: collapse;
  94. }
  95. table td {
  96. padding: 3px 20px;
  97. border: 1px var(--table-border-color) solid;
  98. }
  99. table thead {
  100. background: var(--table-header-bg);
  101. }
  102. table thead td {
  103. font-weight: 700;
  104. border: none;
  105. }
  106. table thead th {
  107. padding: 3px 20px;
  108. }
  109. table thead tr {
  110. border: 1px var(--table-header-bg) solid;
  111. }
  112. /* Alternate background colors for rows */
  113. table tbody tr:nth-child(2n) {
  114. background: var(--table-alternate-bg);
  115. }
  116. blockquote {
  117. margin: 20px 0;
  118. padding: 0 20px;
  119. color: var(--fg);
  120. background-color: var(--quote-bg);
  121. border-top: .1em solid var(--quote-border);
  122. border-bottom: .1em solid var(--quote-border);
  123. }
  124. :not(.footnote-definition) + .footnote-definition,
  125. .footnote-definition + :not(.footnote-definition) {
  126. margin-top: 2em;
  127. }
  128. .footnote-definition {
  129. font-size: 0.9em;
  130. margin: 0.5em 0;
  131. }
  132. .footnote-definition p {
  133. display: inline;
  134. }
  135. .tooltiptext {
  136. position: absolute;
  137. visibility: hidden;
  138. color: #fff;
  139. background-color: #333;
  140. transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */
  141. left: -8px; /* Half of the width of the icon */
  142. top: -35px;
  143. font-size: 0.8em;
  144. text-align: center;
  145. border-radius: 6px;
  146. padding: 5px 8px;
  147. margin: 5px;
  148. z-index: 1000;
  149. }
  150. .tooltipped .tooltiptext {
  151. visibility: visible;
  152. }
  153. .chapter li.part-title {
  154. color: var(--sidebar-fg);
  155. margin: 5px 0px;
  156. font-weight: bold;
  157. }
  158. .result-no-output {
  159. font-style: italic;
  160. }