Skip to content

Commit 53de0c2

Browse files
Fishrock123Myles Borins
authored and
Myles Borins
committed
doc: improve header styling for API docs
Sizes were mostly decided by using http://type-scale.com/ with the 1.250 "Major Third" scaling. PR-URL: #8811 Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Prince John Wesley <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Phillip Johnsen <[email protected]>
1 parent 9077f63 commit 53de0c2

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

doc/api_assets/style.css

+29-29
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,31 @@ body {
1515
background: #fff;
1616
}
1717

18+
h1, h2, h3, h4 {
19+
margin: .8em 0 .5em;
20+
line-height: 1.2;
21+
}
22+
23+
h5, h6 {
24+
margin: 1em 0 .8em;
25+
line-height: 1.2;
26+
}
27+
28+
h1 {
29+
margin-top: 0;
30+
font-size: 2.441em;
31+
}
32+
33+
h2 {font-size: 1.953em;}
34+
35+
h3 {font-size: 1.563em;}
36+
37+
h4 {font-size: 1.25em;}
38+
39+
h5 {font-size: 1em;}
40+
41+
h6 {font-size: .8em;}
42+
1843
pre, tt, code, .pre, span.type, a.type {
1944
font-family: Monaco, Consolas, "Lucida Console", monospace;
2045
}
@@ -127,7 +152,7 @@ abbr {
127152
p {
128153
position: relative;
129154
text-rendering: optimizeLegibility;
130-
margin: 0 0 1em 0;
155+
margin: 0 0 1.125em 0;
131156
line-height: 1.5em;
132157
}
133158

@@ -180,10 +205,10 @@ h1, h2, h3, h4, h5, h6 {
180205
text-rendering: optimizeLegibility;
181206
font-weight: 700;
182207
position: relative;
183-
margin-bottom: .5em;
184208
}
185209

186210
header h1 {
211+
font-size: 2em;
187212
line-height: 2em;
188213
margin: 0;
189214
}
@@ -198,30 +223,15 @@ header h1 {
198223
background-color: #ccc;
199224
}
200225

201-
#toc + h1 {
202-
margin-top: 1em;
203-
padding-top: 0;
204-
}
205-
206-
h2 {
207-
font-size: 1.5em;
208-
margin: 1em 0 .5em;
209-
}
210-
211226
h2 + h2 {
212227
margin: 0 0 .5em;
213228
}
214229

215-
h3 {
216-
font-size: 1em;
217-
margin: 1.5em 0 .5em;
218-
}
219-
220230
h3 + h3 {
221231
margin: 0 0 .5em;
222232
}
223233

224-
h2, h3, h4 {
234+
h2, h3, h4, h5 {
225235
position: relative;
226236
padding-right: 40px;
227237
}
@@ -244,16 +254,6 @@ h1 span a, h2 span a, h3 span a, h4 span a {
244254
font-weight: bold;
245255
}
246256

247-
h5 {
248-
font-size: 1.125em;
249-
line-height: 1.4em;
250-
}
251-
252-
h6 {
253-
font-size: 1em;
254-
line-height: 1.4667em;
255-
}
256-
257257
pre, tt, code {
258258
line-height: 1.5em;
259259
margin: 0; padding: 0;
@@ -353,7 +353,7 @@ hr {
353353
margin-bottom: 0;
354354
}
355355

356-
p tt, p code, li code {
356+
tt, code {
357357
font-size: .9em;
358358
color: #040404;
359359
background-color: #f2f2f2;

0 commit comments

Comments
 (0)