|
1 |
| -// This test check that headers (a) have the correct heading level, and (b) are the right size. |
| 1 | +// This test check that headers (a) have the correct heading level, (b) are the right size, |
| 2 | +// and (c) have the correct underlining (or absence of underlining). |
2 | 3 | // The sizes may change as design changes, but try to make sure a lower header is never bigger than
|
3 |
| -// its parent headers. |
| 4 | +// its parent headers. Also make sure lower headers don't have underlines when their parents lack |
| 5 | +// an underline. |
4 | 6 | // Most of these sizes are set in CSS in `em` units, so here's a conversion chart based on our
|
5 | 7 | // default 16px font size:
|
6 | 8 | // 24px 1.5em
|
|
13 | 15 | goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html
|
14 | 16 |
|
15 | 17 | assert-css: ("h1.fqn", {"font-size": "24px"})
|
| 18 | +assert-css: ("h1.fqn", {"border-bottom-width": "1px"}) |
16 | 19 |
|
17 | 20 | assert-css: ("h2#top-doc-prose-title", {"font-size": "20.8px"})
|
| 21 | +assert-css: ("h2#top-doc-prose-title", {"border-bottom-width": "1px"}) |
18 | 22 | assert-css: ("h3#top-doc-prose-sub-heading", {"font-size": "18.4px"})
|
| 23 | +assert-css: ("h3#top-doc-prose-sub-heading", {"border-bottom-width": "1px"}) |
19 | 24 | assert-css: ("h4#top-doc-prose-sub-sub-heading", {"font-size": "17.6px"})
|
| 25 | +assert-css: ("h4#top-doc-prose-sub-sub-heading", {"border-bottom-width": "1px"}) |
20 | 26 |
|
21 | 27 | assert-css: ("h2#fields", {"font-size": "22.4px"})
|
| 28 | +assert-css: ("h2#fields", {"border-bottom-width": "1px"}) |
22 | 29 | assert-css: ("h3#title-for-field", {"font-size": "20.8px"})
|
| 30 | +assert-css: ("h3#title-for-field", {"border-bottom-width": "0px"}) |
23 | 31 | assert-css: ("h4#sub-heading-for-field", {"font-size": "16px"})
|
| 32 | +assert-css: ("h4#sub-heading-for-field", {"border-bottom-width": "0px"}) |
24 | 33 |
|
25 | 34 | assert-css: ("h2#implementations", {"font-size": "22.4px"})
|
| 35 | +assert-css: ("h2#implementations", {"border-bottom-width": "1px"}) |
26 | 36 |
|
27 | 37 | assert-css: ("#impl > h3.code-header", {"font-size": "17.6px"})
|
| 38 | +assert-css: ("#impl > h3.code-header", {"border-bottom-width": "0px"}) |
28 | 39 | assert-css: ("#method\.do_nothing > h4.code-header", {"font-size": "16px"})
|
| 40 | +assert-css: ("#method\.do_nothing > h4.code-header", {"border-bottom-width": "0px"}) |
29 | 41 |
|
30 | 42 | assert-css: ("h4#title-for-struct-impl-doc", {"font-size": "16px"})
|
| 43 | +assert-css: ("h4#title-for-struct-impl-doc", {"border-bottom-width": "0px"}) |
31 | 44 | assert-css: ("h5#sub-heading-for-struct-impl-doc", {"font-size": "16px"})
|
| 45 | +assert-css: ("h5#sub-heading-for-struct-impl-doc", {"border-bottom-width": "0px"}) |
32 | 46 | assert-css: ("h6#sub-sub-heading-for-struct-impl-doc", {"font-size": "15.2px"})
|
| 47 | +assert-css: ("h6#sub-sub-heading-for-struct-impl-doc", {"border-bottom-width": "0px"}) |
33 | 48 |
|
34 | 49 | assert-css: ("h5#title-for-struct-impl-item-doc", {"font-size": "16px"})
|
| 50 | +assert-css: ("h5#title-for-struct-impl-item-doc", {"border-bottom-width": "0px"}) |
35 | 51 | assert-css: ("h6#sub-heading-for-struct-impl-item-doc", {"font-size": "15.2px"})
|
| 52 | +assert-css: ("h6#sub-heading-for-struct-impl-item-doc", {"border-bottom-width": "0px"}) |
36 | 53 | assert-css: ("h6#sub-sub-heading-for-struct-impl-item-doc", {"font-size": "15.2px"})
|
37 | 54 |
|
38 | 55 | goto: file://|DOC_PATH|/test_docs/enum.HeavilyDocumentedEnum.html
|
39 | 56 |
|
40 | 57 | assert-css: ("h1.fqn", {"font-size": "24px"})
|
| 58 | +assert-css: ("h1.fqn", {"border-bottom-width": "1px"}) |
41 | 59 |
|
42 | 60 | assert-css: ("h2#top-doc-prose-title", {"font-size": "20.8px"})
|
| 61 | +assert-css: ("h2#top-doc-prose-title", {"border-bottom-width": "1px"}) |
43 | 62 | assert-css: ("h3#top-doc-prose-sub-heading", {"font-size": "18.4px"})
|
| 63 | +assert-css: ("h3#top-doc-prose-sub-heading", {"border-bottom-width": "1px"}) |
44 | 64 | assert-css: ("h4#top-doc-prose-sub-sub-heading", {"font-size": "17.6px"})
|
| 65 | +assert-css: ("h4#top-doc-prose-sub-sub-heading", {"border-bottom-width": "1px"}) |
45 | 66 |
|
46 | 67 | assert-css: ("h2#variants", {"font-size": "22.4px"})
|
| 68 | +assert-css: ("h2#variants", {"border-bottom-width": "1px"}) |
47 | 69 |
|
48 | 70 | assert-css: ("h3#none-prose-title", {"font-size": "20.8px"})
|
| 71 | +assert-css: ("h3#none-prose-title", {"border-bottom-width": "0px"}) |
49 | 72 | assert-css: ("h4#none-prose-sub-heading", {"font-size": "16px"})
|
| 73 | +assert-css: ("h4#none-prose-sub-heading", {"border-bottom-width": "0px"}) |
50 | 74 |
|
51 | 75 | assert-css: ("h3#wrapped-prose-title", {"font-size": "20.8px"})
|
| 76 | +assert-css: ("h3#wrapped-prose-title", {"border-bottom-width": "0px"}) |
52 | 77 | assert-css: ("h4#wrapped-prose-sub-heading", {"font-size": "16px"})
|
| 78 | +assert-css: ("h4#wrapped-prose-sub-heading", {"border-bottom-width": "0px"}) |
53 | 79 |
|
54 | 80 | assert-css: ("h4#wrapped0-prose-title", {"font-size": "16px"})
|
| 81 | +assert-css: ("h4#wrapped0-prose-title", {"border-bottom-width": "0px"}) |
55 | 82 | assert-css: ("h5#wrapped0-prose-sub-heading", {"font-size": "16px"})
|
| 83 | +assert-css: ("h5#wrapped0-prose-sub-heading", {"border-bottom-width": "0px"}) |
56 | 84 |
|
57 | 85 | assert-css: ("h4#structy-prose-title", {"font-size": "16px"})
|
| 86 | +assert-css: ("h4#structy-prose-title", {"border-bottom-width": "0px"}) |
58 | 87 | assert-css: ("h5#structy-prose-sub-heading", {"font-size": "16px"})
|
| 88 | +assert-css: ("h5#structy-prose-sub-heading", {"border-bottom-width": "0px"}) |
59 | 89 |
|
60 | 90 | assert-css: ("h2#implementations", {"font-size": "22.4px"})
|
| 91 | +assert-css: ("h2#implementations", {"border-bottom-width": "1px"}) |
61 | 92 |
|
62 | 93 | assert-css: ("#impl > h3.code-header", {"font-size": "17.6px"})
|
| 94 | +assert-css: ("#impl > h3.code-header", {"border-bottom-width": "0px"}) |
63 | 95 | assert-css: ("#method\.do_nothing > h4.code-header", {"font-size": "16px"})
|
| 96 | +assert-css: ("#method\.do_nothing > h4.code-header", {"border-bottom-width": "0px"}) |
64 | 97 |
|
65 | 98 | assert-css: ("h4#title-for-enum-impl-doc", {"font-size": "16px"})
|
| 99 | +assert-css: ("h4#title-for-enum-impl-doc", {"border-bottom-width": "0px"}) |
66 | 100 | assert-css: ("h5#sub-heading-for-enum-impl-doc", {"font-size": "16px"})
|
| 101 | +assert-css: ("h5#sub-heading-for-enum-impl-doc", {"border-bottom-width": "0px"}) |
67 | 102 | assert-css: ("h6#sub-sub-heading-for-enum-impl-doc", {"font-size": "15.2px"})
|
| 103 | +assert-css: ("h6#sub-sub-heading-for-enum-impl-doc", {"border-bottom-width": "0px"}) |
68 | 104 |
|
69 | 105 | assert-css: ("h5#title-for-enum-impl-item-doc", {"font-size": "16px"})
|
| 106 | +assert-css: ("h5#title-for-enum-impl-item-doc", {"border-bottom-width": "0px"}) |
70 | 107 | assert-css: ("h6#sub-heading-for-enum-impl-item-doc", {"font-size": "15.2px"})
|
| 108 | +assert-css: ("h6#sub-heading-for-enum-impl-item-doc", {"border-bottom-width": "0px"}) |
71 | 109 | assert-css: ("h6#sub-sub-heading-for-enum-impl-item-doc", {"font-size": "15.2px"})
|
| 110 | +assert-css: ("h6#sub-sub-heading-for-enum-impl-item-doc", {"border-bottom-width": "0px"}) |
72 | 111 |
|
73 | 112 | goto: file://|DOC_PATH|/test_docs/union.HeavilyDocumentedUnion.html
|
74 | 113 |
|
75 | 114 | assert-css: ("h1.fqn", {"font-size": "24px"})
|
| 115 | +assert-css: ("h1.fqn", {"border-bottom-width": "1px"}) |
76 | 116 |
|
77 | 117 | assert-css: ("h2#top-doc-prose-title", {"font-size": "20.8px"})
|
| 118 | +assert-css: ("h2#top-doc-prose-title", {"border-bottom-width": "1px"}) |
78 | 119 | assert-css: ("h3#top-doc-prose-sub-heading", {"font-size": "18.4px"})
|
| 120 | +assert-css: ("h3#top-doc-prose-sub-heading", {"border-bottom-width": "1px"}) |
79 | 121 |
|
80 | 122 | assert-css: ("h2#fields", {"font-size": "22.4px"})
|
| 123 | +assert-css: ("h2#fields", {"border-bottom-width": "1px"}) |
81 | 124 |
|
82 | 125 | assert-css: ("h3#title-for-union-variant", {"font-size": "20.8px"})
|
| 126 | +assert-css: ("h3#title-for-union-variant", {"border-bottom-width": "0px"}) |
83 | 127 | assert-css: ("h4#sub-heading-for-union-variant", {"font-size": "16px"})
|
| 128 | +assert-css: ("h4#sub-heading-for-union-variant", {"border-bottom-width": "0px"}) |
84 | 129 |
|
85 | 130 | assert-css: ("h2#implementations", {"font-size": "22.4px"})
|
| 131 | +assert-css: ("h2#implementations", {"border-bottom-width": "1px"}) |
86 | 132 |
|
87 | 133 | assert-css: ("#impl > h3.code-header", {"font-size": "17.6px"})
|
| 134 | +assert-css: ("#impl > h3.code-header", {"border-bottom-width": "0px"}) |
88 | 135 | assert-css: ("h4#title-for-union-impl-doc", {"font-size": "16px"})
|
| 136 | +assert-css: ("h4#title-for-union-impl-doc", {"border-bottom-width": "0px"}) |
89 | 137 | assert-css: ("h5#sub-heading-for-union-impl-doc", {"font-size": "16px"})
|
| 138 | +assert-css: ("h5#sub-heading-for-union-impl-doc", {"border-bottom-width": "0px"}) |
90 | 139 |
|
91 | 140 | assert-css: ("h5#title-for-union-impl-item-doc", {"font-size": "16px"})
|
| 141 | +assert-css: ("h5#title-for-union-impl-item-doc", {"border-bottom-width": "0px"}) |
92 | 142 | assert-css: ("h6#sub-heading-for-union-impl-item-doc", {"font-size": "15.2px"})
|
| 143 | +assert-css: ("h6#sub-heading-for-union-impl-item-doc", {"border-bottom-width": "0px"}) |
93 | 144 |
|
94 | 145 | goto: file://|DOC_PATH|/test_docs/macro.heavily_documented_macro.html
|
95 | 146 |
|
96 | 147 | assert-css: ("h1.fqn", {"font-size": "24px"})
|
| 148 | +assert-css: ("h1.fqn", {"border-bottom-width": "1px"}) |
97 | 149 |
|
98 | 150 | assert-css: ("h2#top-doc-prose-title", {"font-size": "20.8px"})
|
| 151 | +assert-css: ("h2#top-doc-prose-title", {"border-bottom-width": "1px"}) |
99 | 152 | assert-css: ("h3#top-doc-prose-sub-heading", {"font-size": "18.4px"})
|
| 153 | +assert-css: ("h3#top-doc-prose-sub-heading", {"border-bottom-width": "1px"}) |
0 commit comments