Skip to content

Commit a242a2c

Browse files
committed
rustdoc: add test cases for settings radio button layout
1 parent 54089e6 commit a242a2c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/rustdoc-gui/settings.goml

+27
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,33 @@ assert-css: (
105105
"box-shadow": "rgb(33, 150, 243) 0px 0px 1px 1px",
106106
},
107107
)
108+
// Now we check the setting-name for radio buttons is on a different line than the label.
109+
compare-elements-position-near: (
110+
"#theme .setting-name",
111+
"#theme .choices",
112+
{"x": 1}
113+
)
114+
compare-elements-position-near-false: (
115+
"#theme .setting-name",
116+
"#theme .choices",
117+
{"y": 1}
118+
)
119+
// Now we check that the label positions are all on the same line.
120+
compare-elements-position-near: (
121+
"#theme .choices #theme-light",
122+
"#theme .choices #theme-dark",
123+
{"y": 1}
124+
)
125+
compare-elements-position-near: (
126+
"#theme .choices #theme-dark",
127+
"#theme .choices #theme-ayu",
128+
{"y": 1}
129+
)
130+
compare-elements-position-near: (
131+
"#theme .choices #theme-ayu",
132+
"#theme .choices #theme-system-preference",
133+
{"y": 1}
134+
)
108135

109136
// First we check the "default" display for toggles.
110137
assert-css: (

0 commit comments

Comments
 (0)