Skip to content

Commit 7f2dbcb

Browse files
authored
Rollup merge of #92797 - jsha:fewer-lines, r=GuillaumeGomez
Remove horizontal lines at top of page They are not needed to separate the search bar and the title, which are visually distinct on their own. Part of #59840 Demo: https://rustdoc.crud.net/jsha/fewer-lines/std/string/struct.String.html r? `@GuillaumeGomez`
2 parents 9a82f74 + fa9a843 commit 7f2dbcb

File tree

6 files changed

+6
-22
lines changed

6 files changed

+6
-22
lines changed

src/librustdoc/html/static/css/rustdoc.css

-3
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@ h1.fqn {
148148
}
149149
.main-heading {
150150
display: flex;
151-
border-bottom: 1px dashed #DDDDDD;
152-
padding-bottom: 6px;
153151
margin-bottom: 15px;
154152

155153
/* workaround to keep flex from breaking below 700 px width due to the float: right on the nav
@@ -785,7 +783,6 @@ nav.sub {
785783

786784
nav.sub {
787785
flex-grow: 1;
788-
padding-bottom: 10px;
789786
margin-bottom: 25px;
790787
}
791788
.source nav.sub {

src/librustdoc/html/static/css/themes/ayu.css

-3
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,6 @@ pre, .rustdoc.source .example-wrap {
194194
pre.rust .comment { color: #788797; }
195195
pre.rust .doccomment { color: #a1ac88; }
196196

197-
nav:not(.sidebar) {
198-
border-bottom-color: #424c57;
199-
}
200197
nav.main .current {
201198
border-top-color: #5c6773;
202199
border-bottom-color: #5c6773;

src/librustdoc/html/static/css/themes/dark.css

-3
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,6 @@ a.result-keyword:focus { background-color: #884719; }
151151
pre.rust .comment { color: #8d8d8b; }
152152
pre.rust .doccomment { color: #8ca375; }
153153

154-
nav:not(.sidebar) {
155-
border-bottom-color: #4e4e4e;
156-
}
157154
nav.main .current {
158155
border-top-color: #eee;
159156
border-bottom-color: #eee;

src/librustdoc/html/static/css/themes/light.css

-3
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,6 @@ a.result-keyword:focus { background-color: #afc6e4; }
148148
.content .fnname { color: #AD7C37; }
149149
.content span.keyword, .content a.keyword, .block a.current.keyword { color: #3873AD; }
150150

151-
nav:not(.sidebar) {
152-
border-bottom-color: #e0e0e0;
153-
}
154151
nav.main .current {
155152
border-top-color: #000;
156153
border-bottom-color: #000;

src/test/rustdoc-gui/headings.goml

-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html
1616

1717
assert-css: ("h1.fqn", {"font-size": "24px"})
18-
assert-css: (".main-heading", {"border-bottom-width": "1px"})
1918

2019
assert-css: ("h2#top-doc-prose-title", {"font-size": "20.8px"})
2120
assert-css: ("h2#top-doc-prose-title", {"border-bottom-width": "1px"})
@@ -55,7 +54,6 @@ assert-css: ("h6#sub-sub-heading-for-struct-impl-item-doc", {"font-size": "15.2p
5554
goto: file://|DOC_PATH|/test_docs/enum.HeavilyDocumentedEnum.html
5655

5756
assert-css: ("h1.fqn", {"font-size": "24px"})
58-
assert-css: (".main-heading", {"border-bottom-width": "1px"})
5957

6058
assert-css: ("h2#top-doc-prose-title", {"font-size": "20.8px"})
6159
assert-css: ("h2#top-doc-prose-title", {"border-bottom-width": "1px"})
@@ -115,7 +113,6 @@ assert-css: (".sidebar .others h3", {"border-bottom-width": "0px"}, ALL)
115113
goto: file://|DOC_PATH|/test_docs/union.HeavilyDocumentedUnion.html
116114

117115
assert-css: ("h1.fqn", {"font-size": "24px"})
118-
assert-css: (".main-heading", {"border-bottom-width": "1px"})
119116

120117
assert-css: ("h2#top-doc-prose-title", {"font-size": "20.8px"})
121118
assert-css: ("h2#top-doc-prose-title", {"border-bottom-width": "1px"})
@@ -148,7 +145,6 @@ assert-css: ("h6#sub-heading-for-union-impl-item-doc", {"border-bottom-width": "
148145
goto: file://|DOC_PATH|/test_docs/macro.heavily_documented_macro.html
149146

150147
assert-css: ("h1.fqn", {"font-size": "24px"})
151-
assert-css: (".main-heading", {"border-bottom-width": "1px"})
152148

153149
assert-css: ("h2#top-doc-prose-title", {"font-size": "20.8px"})
154150
assert-css: ("h2#top-doc-prose-title", {"border-bottom-width": "1px"})

src/test/rustdoc-gui/toggle-docs-mobile.goml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
22
size: (433, 600)
33
assert-attribute: (".top-doc", {"open": ""})
4-
click: (4, 260) // This is the position of the top doc comment toggle
4+
click: (4, 250) // This is the position of the top doc comment toggle
55
assert-attribute-false: (".top-doc", {"open": ""})
6-
click: (4, 260)
6+
click: (4, 250)
77
assert-attribute: (".top-doc", {"open": ""})
88
// To ensure that the toggle isn't over the text, we check that the toggle isn't clicked.
9-
click: (3, 260)
9+
click: (3, 250)
1010
assert-attribute: (".top-doc", {"open": ""})
1111

1212
// Assert the position of the toggle on the top doc block.
@@ -22,10 +22,10 @@ assert-position: (
2222
// Now we do the same but with a little bigger width
2323
size: (600, 600)
2424
assert-attribute: (".top-doc", {"open": ""})
25-
click: (4, 260) // New Y position since all search elements are back on one line.
25+
click: (4, 250) // New Y position since all search elements are back on one line.
2626
assert-attribute-false: (".top-doc", {"open": ""})
27-
click: (4, 260)
27+
click: (4, 250)
2828
assert-attribute: (".top-doc", {"open": ""})
2929
// To ensure that the toggle isn't over the text, we check that the toggle isn't clicked.
30-
click: (3, 260)
30+
click: (3, 250)
3131
assert-attribute: (".top-doc", {"open": ""})

0 commit comments

Comments
 (0)