Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ impl Setting {
description,
),
Setting::Select { js_data_name, description, default_value, ref options } => format!(
"<div class=\"setting-line\"><div class=\"radio-line\" id=\"{}\"><span class=\"setting-name\">{}</span>{}</div></div>",
"<div class=\"setting-line\"><div class=\"radio-line\" id=\"{}\"><span class=\"setting-name\">{}</span><div class=\"choices\">{}</div></div></div>",
js_data_name,
description,
options
Expand Down
16 changes: 9 additions & 7 deletions src/librustdoc/html/static/css/settings.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.setting-line {
padding: 5px;
margin: 0.6em 0 0.6em 0.3em;
position: relative;
}

Expand All @@ -17,17 +17,16 @@
border-bottom: 1px solid;
}

.setting-line .radio-line {
.setting-line .radio-line,
.setting-line .choices {
display: flex;
flex-wrap: wrap;
}

.setting-line .radio-line > * {
padding: 0.3em;
}

.setting-line .radio-line .setting-name {
flex-grow: 1;
margin-top: auto;
margin-bottom: auto;
}

.setting-line .radio-line input {
Expand All @@ -38,7 +37,10 @@
border-radius: 0.1em;
border: 1px solid;
margin-left: 0.5em;
min-width: 3.5em;
margin-top: 0.1em;
margin-bottom: 0.1em;
min-width: 3.8em;
padding: 0.3em;
}

.toggle {
Expand Down
6 changes: 6 additions & 0 deletions src/test/rustdoc-gui/mobile.goml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ assert-css: (".content .out-of-band .since::before", { "content": "\"Since \"" }

size: (1000, 1000)
assert-css-false: (".content .out-of-band .since::before", { "content": "\"Since \"" })

// On the settings page, the theme buttons should not line-wrap. Instead, they should
// all be placed as a group on a line below the setting name "Theme."
goto: file://|DOC_PATH|/settings.html
size: (400, 600)
compare-elements-position-near-false: ("#preferred-light-theme .setting-name", "#preferred-light-theme .choice", {"y": 16})