|
17 | 17 | }
|
18 | 18 | }
|
19 | 19 |
|
| 20 | +/* === HEADING STYLES === */ |
20 | 21 | .doc h1,
|
21 | 22 | .doc h2,
|
22 | 23 | .doc h3,
|
23 | 24 | .doc h4,
|
24 | 25 | .doc h5,
|
25 | 26 | .doc h6 {
|
26 | 27 | color: var(--heading-font-color);
|
| 28 | + font-family: var(--body-font-family); |
27 | 29 | font-weight: var(--heading-font-weight);
|
28 | 30 | hyphens: none;
|
29 | 31 | line-height: 1.3;
|
30 |
| - margin: 1rem 0 0; |
31 |
| - scroll-margin-top: calc(var(--navbar-height) + var(--toolbar-height) + 1rem); /* Account for sticky header height */ |
| 32 | + margin: 16px 0; |
| 33 | + padding: 0; |
| 34 | + text-align: left; |
| 35 | + scroll-margin-top: calc(var(--navbar-height) + var(--toolbar-height) + 1rem); |
32 | 36 | }
|
33 | 37 |
|
34 |
| -.doc > h1.page:first-child { |
| 38 | +.doc h1 { |
35 | 39 | font-size: 32px;
|
36 |
| - margin: 16px 0; |
37 | 40 | }
|
38 | 41 |
|
| 42 | +.doc h2 { |
| 43 | + font-size: 24px; |
| 44 | +} |
| 45 | + |
| 46 | +.doc h3 { |
| 47 | + font-size: 20px; |
| 48 | +} |
| 49 | + |
| 50 | +.doc h4 { |
| 51 | + font-size: 18px; |
| 52 | +} |
| 53 | + |
| 54 | +.doc h5, |
| 55 | +.doc h6 { |
| 56 | + font-size: 16px; |
| 57 | +} |
| 58 | + |
| 59 | +/* Mobile heading sizes */ |
| 60 | +@media screen and (max-width: 1023.5px) { |
| 61 | + .doc h1 { |
| 62 | + font-size: 24px; |
| 63 | + } |
| 64 | + |
| 65 | + .doc h2 { |
| 66 | + font-size: 20px; |
| 67 | + } |
| 68 | + |
| 69 | + .doc h3 { |
| 70 | + font-size: 18px; |
| 71 | + } |
| 72 | + |
| 73 | + .doc h4 { |
| 74 | + font-size: 16px; |
| 75 | + } |
| 76 | +} |
| 77 | + |
| 78 | +/* Special case: Page title gets extra top margin on larger screens */ |
39 | 79 | @media screen and (min-width: 768px) {
|
40 | 80 | .doc > h1.page:first-child {
|
41 | 81 | margin-top: 2.5rem;
|
42 | 82 | }
|
43 | 83 | }
|
44 | 84 |
|
| 85 | +/* Special case: Section spacing */ |
45 | 86 | .doc > h2#name + .sectionbody {
|
46 | 87 | margin-top: 1rem;
|
47 | 88 | }
|
|
51 | 92 | margin-top: 2rem;
|
52 | 93 | }
|
53 | 94 |
|
| 95 | +/* Special case: Abstract section header with background */ |
54 | 96 | .doc h1.sect0 {
|
55 | 97 | background: var(--abstract-background);
|
56 | 98 | font-size: 1.8em;
|
57 | 99 | margin: 1.5rem -1rem 0;
|
58 | 100 | padding: 0.5rem 1rem;
|
59 | 101 | }
|
60 | 102 |
|
61 |
| -.doc h2:not(.discrete) { |
62 |
| - margin-left: -1rem; |
63 |
| - margin-right: -1rem; |
64 |
| - padding: 0.4rem 1rem 0.1rem; |
65 |
| - font-weight: var(--alt-heading-font-weight); |
66 |
| -} |
67 |
| - |
68 |
| -.doc h3:not(.discrete), |
69 |
| -.doc h4:not(.discrete) { |
70 |
| - font-weight: var(--alt-heading-font-weight); |
71 |
| - font-size: 20px; |
72 |
| -} |
73 |
| - |
74 | 103 | .doc h1 .anchor,
|
75 | 104 | .doc h2 .anchor,
|
76 | 105 | .doc h3 .anchor,
|
|
1321 | 1350 | width: 1.5em;
|
1322 | 1351 | }
|
1323 | 1352 |
|
1324 |
| -/* === custom overrides === */ |
1325 |
| -/* uniform 16px (1rem) spacing and left alignment */ |
1326 |
| -.doc h1, |
1327 |
| -.doc h2, |
1328 |
| -.doc h3, |
1329 |
| -.doc h4, |
1330 |
| -.doc h5, |
1331 |
| -.doc h6 { |
1332 |
| - margin: 16px 0; |
1333 |
| - padding: 0; |
1334 |
| - text-align: left; |
1335 |
| - margin-left: 0; |
1336 |
| - margin-right: 0; |
1337 |
| - font-size: 24px; |
1338 |
| - font-weight: 500; |
1339 |
| -} |
1340 |
| - |
1341 |
| -/* remove negative offsets on section headers */ |
1342 |
| -.doc h2:not(.discrete), |
1343 |
| -.doc h3:not(.discrete), |
1344 |
| -.doc h4:not(.discrete) { |
1345 |
| - margin-left: 0; |
1346 |
| - margin-right: 0; |
1347 |
| - padding: 0; |
1348 |
| -} |
1349 | 1353 |
|
1350 | 1354 | /* paragraphs, lists, tables, blockquotes all get 16px bottom spacing */
|
1351 | 1355 | .doc p,
|
|
0 commit comments