Skip to content

Commit e12c6b2

Browse files
Rollup merge of #107045 - notriddle:notriddle/settings-css-setting-line, r=GuillaumeGomez
rustdoc: remove redundant CSS rule `#settings .setting-line` Since the current version of settings.js always nests things below a div with ID `settings`, this rule always overrode the one above.
2 parents 6595127 + 34d595d commit e12c6b2

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

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

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.setting-line {
2-
margin: 0.6em 0 0.6em 0.3em;
2+
margin: 1.2em 0.6em;
33
position: relative;
44
}
55

@@ -55,10 +55,6 @@
5555
cursor: pointer;
5656
}
5757

58-
#settings .setting-line {
59-
margin: 1.2em 0.6em;
60-
}
61-
6258
.setting-line .radio-line input:checked {
6359
box-shadow: inset 0 0 0 3px var(--main-background-color);
6460
background-color: var(--settings-input-color);

tests/rustdoc-gui/settings.goml

+7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ assert-false: "#settings"
88
click: "#settings-menu"
99
wait-for: "#settings"
1010
assert-css: ("#settings", {"display": "block"})
11+
12+
// Store the line margin to compare with the settings.html later.
13+
store-css: (setting_line_margin, ".setting-line", "margin")
14+
1115
// Let's close it by clicking on the same button.
1216
click: "#settings-menu"
1317
wait-for-css: ("#settings", {"display": "none"})
@@ -230,6 +234,9 @@ assert-css: (".setting-line", {"position": "relative"})
230234
assert-attribute-false: ("#settings", {"class": "popover"}, CONTAINS)
231235
compare-elements-position: (".sub form", "#settings", ("x"))
232236

237+
// Check that setting-line has the same margin in this mode as in the popover.
238+
assert-css: (".setting-line", {"margin": |setting_line_margin|})
239+
233240
// We now check the display with JS disabled.
234241
assert-false: "noscript section"
235242
javascript: false

0 commit comments

Comments
 (0)