Skip to content

Commit 32c73c2

Browse files
authored
Rollup merge of #111854 - notriddle:notriddle/settings-css-cleanup, r=GuillaumeGomez
rustdoc: clean up `settings.css` An identical CSS rule was merged for settings-check, and an unneeded `position: relative` removed.
2 parents 6583025 + 24913bd commit 32c73c2

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/librustdoc/html/static/css/settings.css

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.setting-line {
22
margin: 1.2em 0.6em;
3-
position: relative;
43
}
54

65
.setting-radio input, .setting-check input {
@@ -15,11 +14,6 @@
1514
.setting-radio input {
1615
border-radius: 50%;
1716
}
18-
.setting-check input:checked {
19-
content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40">\
20-
<path d="M7,25L17,32L33,12" fill="none" stroke="black" stroke-width="5"/>\
21-
<path d="M7,23L17,30L33,10" fill="none" stroke="white" stroke-width="5"/></svg>');
22-
}
2317

2418
.setting-radio span, .setting-check span {
2519
padding-bottom: 1px;
@@ -52,6 +46,9 @@
5246
.setting-check input:checked {
5347
background-color: var(--settings-input-color);
5448
border-width: 1px;
49+
content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40">\
50+
<path d="M7,25L17,32L33,12" fill="none" stroke="black" stroke-width="5"/>\
51+
<path d="M7,23L17,30L33,10" fill="none" stroke="white" stroke-width="5"/></svg>');
5552
}
5653
.setting-radio input:focus, .setting-check input:focus {
5754
box-shadow: 0 0 1px 1px var(--settings-input-color);

tests/rustdoc-gui/settings.goml

+2-2
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ wait-for-css: ("#help-button .popover", {"display": "block"})
301301
// Now we go to the settings page to check that the CSS is loaded as expected.
302302
go-to: "file://" + |DOC_PATH| + "/settings.html"
303303
wait-for: "#settings"
304-
assert-css: (".setting-line", {"position": "relative"})
304+
assert-css: (".setting-radio", {"cursor": "pointer"})
305305

306306
assert-attribute-false: ("#settings", {"class": "popover"}, CONTAINS)
307307
compare-elements-position: (".sub form", "#settings", ("x"))
@@ -322,4 +322,4 @@ reload:
322322
set-window-size: (300, 1000)
323323
click: "#settings-menu"
324324
wait-for: "#settings"
325-
assert-css: (".setting-line", {"position": "relative"})
325+
assert-css: (".setting-radio", {"cursor": "pointer"})

0 commit comments

Comments
 (0)