on 44566ea help sign in
helix/book/theme/css/general.css
217 lines 4.8 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 p { line-height: 1.45em; }
118.content ol { line-height: 1.45em; }
119.content ul { line-height: 1.45em; }
120.content a { text-decoration: none; }
121.content a:hover { text-decoration: underline; }
122.content img { max-width: 100%; }
123.content .header:link,
124.content .header:visited {
125 color: var(--fg);
126 color: var(--heading-fg);
128.content .header:link,
129.content .header:visited:hover {
130 text-decoration: none;
133table {
134 margin: 0 auto;
135 border-collapse: collapse;
136 width: 100%;
138table td {
139 padding: .75rem;
140 width: auto;
142table thead {
143 background: var(--table-header-bg);
145table thead td {
146 font-weight: 700;
147 border: none;
149table thead th {
150 padding: .75rem;
151 text-align: left;
152 color: var(--table-border-color);
153 font-weight: 500;
154 line-height: 1.5;
155 width: auto;
157table thead tr {
158 border-bottom: 2px var(--table-border-color) solid;
160table tbody tr {
161 border-bottom: 1px var(--table-border-line) solid;
163/* Alternate background colors for rows */
164table tbody tr:nth-child(2n) {
165 /* background: var(--table-alternate-bg); */
169blockquote {
170 margin: 1.5rem 0;
171 padding: 1rem 1.5rem;
172 color: var(--fg);
173 opacity: .9;
174 background-color: var(--quote-bg);
175 border-left: 4px solid var(--quote-border);
177blockquote *:last-child {
178 margin-bottom: 0;
182:not(.footnote-definition) + .footnote-definition,
183.footnote-definition + :not(.footnote-definition) {
184 margin-top: 2em;
186.footnote-definition {
187 font-size: 0.9em;
188 margin: 0.5em 0;
190.footnote-definition p {
191 display: inline;
194.tooltiptext {
195 position: absolute;
196 visibility: hidden;
197 color: #fff;
198 background-color: #333;
199 transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */
200 left: -8px; /* Half of the width of the icon */
201 top: -35px;
202 font-size: 0.8em;
203 text-align: center;
204 border-radius: 6px;
205 padding: 5px 8px;
206 margin: 5px;
207 z-index: 1000;
209.tooltipped .tooltiptext {
210 visibility: visible;
213.chapter li.part-title {
214 color: var(--sidebar-fg);
215 margin: 5px 0px;
216 font-weight: bold;