on bc4e54c help sign in
helix/book/theme/css/general.css
194 lines 4.3 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);
96.content p { line-height: 1.45em; }
97.content ol { line-height: 1.45em; }
98.content ul { line-height: 1.45em; }
99.content a { text-decoration: none; }
100.content a:hover { text-decoration: underline; }
101.content img { max-width: 100%; }
102.content .header:link,
103.content .header:visited {
104 color: var(--fg);
105 /* color: white; */
106 color: #281733;
108.content .header:link,
109.content .header:visited:hover {
110 text-decoration: none;
113table {
114 margin: 0 auto;
115 border-collapse: collapse;
116 width: 100%;
118table td {
119 padding: .75rem;
120 width: auto;
122table thead {
123 background: var(--table-header-bg);
125table thead td {
126 font-weight: 700;
127 border: none;
129table thead th {
130 padding: .75rem;
131 text-align: left;
132 color: var(--table-border-color);
133 font-weight: 500;
134 line-height: 1.5;
135 width: auto;
137table thead tr {
138 border-bottom: 2px var(--table-border-color) solid;
140table tbody tr {
141 border-bottom: 1px var(--table-border-line) solid;
143/* Alternate background colors for rows */
144table tbody tr:nth-child(2n) {
145 /* background: var(--table-alternate-bg); */
149blockquote {
150 margin: 20px 0;
151 padding: 0 20px;
152 color: var(--fg);
153 background-color: var(--quote-bg);
154 border-top: .1em solid var(--quote-border);
155 border-bottom: .1em solid var(--quote-border);
159:not(.footnote-definition) + .footnote-definition,
160.footnote-definition + :not(.footnote-definition) {
161 margin-top: 2em;
163.footnote-definition {
164 font-size: 0.9em;
165 margin: 0.5em 0;
167.footnote-definition p {
168 display: inline;
171.tooltiptext {
172 position: absolute;
173 visibility: hidden;
174 color: #fff;
175 background-color: #333;
176 transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */
177 left: -8px; /* Half of the width of the icon */
178 top: -35px;
179 font-size: 0.8em;
180 text-align: center;
181 border-radius: 6px;
182 padding: 5px 8px;
183 margin: 5px;
184 z-index: 1000;
186.tooltipped .tooltiptext {
187 visibility: visible;
190.chapter li.part-title {
191 color: var(--sidebar-fg);
192 margin: 5px 0px;
193 font-weight: bold;