Skip to content

Commit f00d0b2

Browse files
committed
More styling
1 parent 86eae73 commit f00d0b2

File tree

5 files changed

+244
-3
lines changed

5 files changed

+244
-3
lines changed

Diff for: src/common-issues.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
## Common Issues
2+
# Common Issues
33

44
Several things can lead to a program not working. The most common reasons are listed below.
55

Diff for: src/cx.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Whisky or CrossOver?
1+
# Whisky or CrossOver?
22

33
There are a lot of questions about which is better, here's an easy chart:
44

Diff for: src/not-found.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# We couldn't find that page
2+
3+
Return [home](guide.md).

Diff for: src/paths.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## What's where?
1+
# What's Where?
22

33
| Item | Location |
44
|-----------|--------------------------------------------------------------------|

Diff for: theme/css/general.css

+238
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
/* Base styles and content styles */
2+
3+
@import 'variables.css';
4+
5+
:root {
6+
/* Browser default font-size is 16px, this way 1 rem = 10px */
7+
font-size: 62.5%;
8+
color-scheme: var(--color-scheme);
9+
}
10+
11+
html {
12+
font-family: "Open Sans", sans-serif;
13+
color: var(--fg);
14+
background-color: var(--bg);
15+
text-size-adjust: none;
16+
-webkit-text-size-adjust: none;
17+
}
18+
19+
body {
20+
margin: 0;
21+
font-size: 1.6rem;
22+
overflow-x: hidden;
23+
}
24+
25+
code {
26+
font-family: var(--mono-font) !important;
27+
font-size: var(--code-font-size);
28+
direction: ltr !important;
29+
}
30+
31+
/* make long words/inline code not x overflow */
32+
main {
33+
overflow-wrap: break-word;
34+
}
35+
36+
/* make wide tables scroll if they overflow */
37+
.table-wrapper {
38+
overflow-x: auto;
39+
}
40+
41+
/* Don't change font size in headers. */
42+
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
43+
font-size: unset;
44+
}
45+
46+
.left { float: left; }
47+
.right { float: right; }
48+
.boring { opacity: 0.6; }
49+
.hide-boring .boring { display: none; }
50+
.hidden { display: none !important; }
51+
52+
h1 > a {
53+
background-image: linear-gradient(to right, rgb(245 158 11) 0%, rgb(239 68 68) 100%);
54+
-webkit-background-clip: text;
55+
background-clip: text;
56+
color: transparent !important;
57+
}
58+
59+
.header + .header h3,
60+
.header + .header h4,
61+
.header + .header h5 {
62+
margin-block-start: 1em;
63+
}
64+
65+
h1:target::before,
66+
h2:target::before,
67+
h3:target::before,
68+
h4:target::before,
69+
h5:target::before,
70+
h6:target::before {
71+
display: inline-block;
72+
content: "»";
73+
margin-inline-start: -30px;
74+
width: 30px;
75+
}
76+
77+
/* This is broken on Safari as of version 14, but is fixed
78+
in Safari Technology Preview 117 which I think will be Safari 14.2.
79+
https://bugs.webkit.org/show_bug.cgi?id=218076
80+
*/
81+
:target {
82+
/* Safari does not support logical properties */
83+
scroll-margin-top: calc(var(--menu-bar-height) + 0.5em);
84+
}
85+
86+
.page {
87+
outline: 0;
88+
padding: 0 var(--page-padding);
89+
margin-block-start: calc(0px - var(--menu-bar-height)); /* Compensate for the #menu-bar-hover-placeholder */
90+
}
91+
.page-wrapper {
92+
box-sizing: border-box;
93+
background-color: var(--bg);
94+
}
95+
.no-js .page-wrapper,
96+
.js:not(.sidebar-resizing) .page-wrapper {
97+
transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */
98+
}
99+
[dir=rtl] .js:not(.sidebar-resizing) .page-wrapper {
100+
transition: margin-right 0.3s ease, transform 0.3s ease; /* Animation: slide away */
101+
}
102+
103+
.content {
104+
overflow-y: auto;
105+
padding: 0 5px 50px 5px;
106+
}
107+
.content main {
108+
margin-inline-start: auto;
109+
margin-inline-end: auto;
110+
max-width: var(--content-max-width);
111+
}
112+
.content p { line-height: 1.45em; }
113+
.content ol { line-height: 1.45em; }
114+
.content ul { line-height: 1.45em; }
115+
.content a { text-decoration: none; }
116+
.content a:hover { text-decoration: underline; }
117+
.content img, .content video { max-width: 100%; }
118+
.content .header:link,
119+
.content .header:visited {
120+
color: var(--fg);
121+
}
122+
.content .header:link,
123+
.content .header:visited:hover {
124+
text-decoration: none;
125+
}
126+
127+
table {
128+
margin: 0 auto;
129+
border-collapse: collapse;
130+
}
131+
table td {
132+
padding: 3px 20px;
133+
border: 1px var(--table-border-color) solid;
134+
}
135+
table thead {
136+
background: var(--table-header-bg);
137+
}
138+
table thead td {
139+
font-weight: 700;
140+
border: none;
141+
}
142+
table thead th {
143+
padding: 3px 20px;
144+
}
145+
table thead tr {
146+
border: 1px var(--table-header-bg) solid;
147+
}
148+
/* Alternate background colors for rows */
149+
table tbody tr:nth-child(2n) {
150+
background: var(--table-alternate-bg);
151+
}
152+
153+
154+
blockquote {
155+
margin: 20px 0;
156+
padding: 0 20px;
157+
color: var(--fg);
158+
background-color: var(--quote-bg);
159+
border-block-start: .1em solid var(--quote-border);
160+
border-block-end: .1em solid var(--quote-border);
161+
}
162+
163+
.warning {
164+
margin: 20px;
165+
padding: 0 20px;
166+
border-inline-start: 2px solid var(--warning-border);
167+
}
168+
169+
.warning:before {
170+
position: absolute;
171+
width: 3rem;
172+
height: 3rem;
173+
margin-inline-start: calc(-1.5rem - 21px);
174+
content: "ⓘ";
175+
text-align: center;
176+
background-color: var(--bg);
177+
color: var(--warning-border);
178+
font-weight: bold;
179+
font-size: 2rem;
180+
}
181+
182+
blockquote .warning:before {
183+
background-color: var(--quote-bg);
184+
}
185+
186+
kbd {
187+
background-color: var(--table-border-color);
188+
border-radius: 4px;
189+
border: solid 1px var(--theme-popup-border);
190+
box-shadow: inset 0 -1px 0 var(--theme-hover);
191+
display: inline-block;
192+
font-size: var(--code-font-size);
193+
font-family: var(--mono-font);
194+
line-height: 10px;
195+
padding: 4px 5px;
196+
vertical-align: middle;
197+
}
198+
199+
:not(.footnote-definition) + .footnote-definition,
200+
.footnote-definition + :not(.footnote-definition) {
201+
margin-block-start: 2em;
202+
}
203+
.footnote-definition {
204+
font-size: 0.9em;
205+
margin: 0.5em 0;
206+
}
207+
.footnote-definition p {
208+
display: inline;
209+
}
210+
211+
.tooltiptext {
212+
position: absolute;
213+
visibility: hidden;
214+
color: #fff;
215+
background-color: #333;
216+
transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */
217+
left: -8px; /* Half of the width of the icon */
218+
top: -35px;
219+
font-size: 0.8em;
220+
text-align: center;
221+
border-radius: 6px;
222+
padding: 5px 8px;
223+
margin: 5px;
224+
z-index: 1000;
225+
}
226+
.tooltipped .tooltiptext {
227+
visibility: visible;
228+
}
229+
230+
.chapter li.part-title {
231+
color: var(--sidebar-fg);
232+
margin: 5px 0px;
233+
font-weight: bold;
234+
}
235+
236+
.result-no-output {
237+
font-style: italic;
238+
}

0 commit comments

Comments
 (0)