general.css 3.9 KB

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