on e476321 help sign in
helix/book/theme/css/general.css
230 lines 5.0 kB history raw
1/* Base styles and content styles */
3@import 'variables.css';
5:root {
6 /* Browser default font-size is 16px, this way 1 rem = 10px */
7 font-size: 62.5%;
8}
10/* TODO: replace with self hosted fonts */
12html {
13 font-family: "Inter", sans-serif;
14 color: var(--fg);
15 background-color: var(--bg);
16 text-size-adjust: none;
19/* @supports (font-variation-settings: normal) { */
20/* html { font-family: 'Inter var', sans-serif; } */
21/* } */
23body {
24 margin: 0;
25 font-size: 1.6rem;
26 overflow-x: hidden;
29code {
30 font-family: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace !important;
31 font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */
34/* Don't change font size in headers. */
35h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
36 font-size: unset;
39.left { float: left; }
40.right { float: right; }
41.boring { opacity: 0.6; }
42.hide-boring .boring { display: none; }
43.hidden { display: none !important; }
45h2, h3 { margin-top: 2.5em; }
46h4, h5 { margin-top: 2em; }
48.header + .header h3,
49.header + .header h4,
50.header + .header h5 {
51 margin-top: 1em;
54h1:target::before,
55h2:target::before,
56h3:target::before,
57h4:target::before,
58h5:target::before,
59h6:target::before {
60 display: inline-block;
61 content: "»";
62 margin-left: -30px;
63 width: 30px;
66/* This is broken on Safari as of version 14, but is fixed
67 in Safari Technology Preview 117 which I think will be Safari 14.2.
68 https://bugs.webkit.org/show_bug.cgi?id=218076
69*/
70:target {
71 scroll-margin-top: calc(var(--menu-bar-height) + 0.5em);
74.page {
75 outline: 0;
76 padding: 0 var(--page-padding);
77 margin-top: calc(0px - var(--menu-bar-height)); /* Compensate for the #menu-bar-hover-placeholder */
79.page-wrapper {
80 box-sizing: border-box;
82.js:not(.sidebar-resizing) .page-wrapper {
83 transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */
86.content {
87 overflow-y: auto;
88 padding: 0 15px;
89 padding-bottom: 50px;
91.content main {
92 margin-left: auto;
93 margin-right: auto;
94 max-width: var(--content-max-width);
98/* 2 1.75 1.5 1.25 1 .875 */
100.content h1 { font-size: 2em }
101.content h2 { font-size: 1.75em }
102.content h3 { font-size: 1.5em }
103.content h4 { font-size: 1.25em }
104.content h5 { font-size: 1em }
105.content h6 { font-size: .875em }
107.content h1, .content h2, .content h3, .content h4 {
108 font-weight: 500;
109 margin-top: 1.275em;
110 margin-bottom: .875em;
112.content p, .content ol, .content ul, .content table {
113 margin-top: 0;
114 margin-bottom: .875em;
117.content ul li {
118margin-bottom: .25rem;
120.content ul {
121 list-style-type: square;
123.content ul ul, .content ol ul {
124 margin-bottom: .5rem;
126.content li p {
127 margin-bottom: .5em;
130.content p { line-height: 1.45em; }
131.content ol { line-height: 1.45em; }
132.content ul { line-height: 1.45em; }
133.content a { text-decoration: none; }
134.content a:hover { text-decoration: underline; }
135.content img { max-width: 100%; }
136.content .header:link,
137.content .header:visited {
138 color: var(--fg);
139 color: var(--heading-fg);
141.content .header:link,
142.content .header:visited:hover {
143 text-decoration: none;
146table {
147 margin: 0 auto;
148 border-collapse: collapse;
149 width: 100%;
151table td {
152 padding: .75rem;
153 width: auto;
155table thead {
156 background: var(--table-header-bg);
158table thead td {
159 font-weight: 700;
160 border: none;
162table thead th {
163 padding: .75rem;
164 text-align: left;
165 color: var(--table-border-color);
166 font-weight: 500;
167 line-height: 1.5;
168 width: auto;
170table thead tr {
171 border-bottom: 2px var(--table-border-color) solid;
173table tbody tr {
174 border-bottom: 1px var(--table-border-line) solid;
176/* Alternate background colors for rows */
177table tbody tr:nth-child(2n) {
178 /* background: var(--table-alternate-bg); */
182blockquote {
183 margin: 1.5rem 0;
184 padding: 1rem 1.5rem;
185 color: var(--fg);
186 opacity: .9;
187 background-color: var(--quote-bg);
188 border-left: 4px solid var(--quote-border);
190blockquote *:last-child {
191 margin-bottom: 0;
195:not(.footnote-definition) + .footnote-definition,
196.footnote-definition + :not(.footnote-definition) {
197 margin-top: 2em;
199.footnote-definition {
200 font-size: 0.9em;
201 margin: 0.5em 0;
203.footnote-definition p {
204 display: inline;
207.tooltiptext {
208 position: absolute;
209 visibility: hidden;
210 color: #fff;
211 background-color: #333;
212 transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */
213 left: -8px; /* Half of the width of the icon */
214 top: -35px;
215 font-size: 0.8em;
216 text-align: center;
217 border-radius: 6px;
218 padding: 5px 8px;
219 margin: 5px;
220 z-index: 1000;
222.tooltipped .tooltiptext {
223 visibility: visible;
226.chapter li.part-title {
227 color: var(--sidebar-fg);
228 margin: 5px 0px;
229 font-weight: bold;