general.css 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /* Base styles and content styles */
  2. @import 'variables.css';
  3. html {
  4. font-family: "Open Sans", sans-serif;
  5. color: var(--fg);
  6. background-color: var(--bg);
  7. text-size-adjust: none;
  8. }
  9. body {
  10. margin: 0;
  11. font-size: 1rem;
  12. overflow-x: hidden;
  13. }
  14. code {
  15. font-family: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace;
  16. font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */
  17. }
  18. .left { float: left; }
  19. .right { float: right; }
  20. .hidden { display: none; }
  21. .play-button.hidden { display: none; }
  22. h2, h3 { margin-top: 2.5em; }
  23. h4, h5 { margin-top: 2em; }
  24. .header + .header h3,
  25. .header + .header h4,
  26. .header + .header h5 {
  27. margin-top: 1em;
  28. }
  29. a.header:target h1:before,
  30. a.header:target h2:before,
  31. a.header:target h3:before,
  32. a.header:target h4:before {
  33. display: inline-block;
  34. content: "»";
  35. margin-left: -30px;
  36. width: 30px;
  37. }
  38. .page {
  39. outline: 0;
  40. padding: 0 var(--page-padding);
  41. }
  42. .page-wrapper {
  43. box-sizing: border-box;
  44. }
  45. .js .page-wrapper {
  46. transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */
  47. }
  48. .content {
  49. overflow-y: auto;
  50. padding: 0 15px;
  51. padding-bottom: 50px;
  52. }
  53. .content main {
  54. margin-left: auto;
  55. margin-right: auto;
  56. max-width: var(--content-max-width);
  57. }
  58. .content a { text-decoration: none; }
  59. .content a:hover { text-decoration: underline; }
  60. .content img { max-width: 100%; }
  61. .content .header:link,
  62. .content .header:visited {
  63. color: var(--fg);
  64. }
  65. .content .header:link,
  66. .content .header:visited:hover {
  67. text-decoration: none;
  68. }
  69. table {
  70. margin: 0 auto;
  71. border-collapse: collapse;
  72. }
  73. table td {
  74. padding: 3px 20px;
  75. border: 1px var(--table-border-color) solid;
  76. }
  77. table thead {
  78. background: var(--table-header-bg);
  79. }
  80. table thead td {
  81. font-weight: 700;
  82. border: none;
  83. }
  84. table thead tr {
  85. border: 1px var(--table-header-bg) solid;
  86. }
  87. /* Alternate background colors for rows */
  88. table tbody tr:nth-child(2n) {
  89. background: var(--table-alternate-bg);
  90. }
  91. blockquote {
  92. margin: 20px 0;
  93. padding: 0 20px;
  94. color: var(--fg);
  95. background-color: var(--quote-bg);
  96. border-top: .1em solid var(--quote-border);
  97. border-bottom: .1em solid var(--quote-border);
  98. }
  99. :not(.footnote-definition) + .footnote-definition,
  100. .footnote-definition + :not(.footnote-definition) {
  101. margin-top: 2em;
  102. }
  103. .footnote-definition {
  104. font-size: 0.9em;
  105. margin: 0.5em 0;
  106. }
  107. .footnote-definition p {
  108. display: inline;
  109. }
  110. .tooltiptext {
  111. position: absolute;
  112. visibility: hidden;
  113. color: #fff;
  114. background-color: #333;
  115. transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */
  116. left: -8px; /* Half of the width of the icon */
  117. top: -35px;
  118. font-size: 0.8em;
  119. text-align: center;
  120. border-radius: 6px;
  121. padding: 5px 8px;
  122. margin: 5px;
  123. z-index: 1000;
  124. }
  125. .tooltipped .tooltiptext {
  126. visibility: visible;
  127. }