Skip to content

Commit

Permalink
Make the help button look more like the rest
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle committed Aug 25, 2024
1 parent 624e4b5 commit 8370987
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/librustdoc/html/sources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,5 +346,7 @@ pub(crate) fn print_src(
} else {
None
},
}.render_into(&mut writer).unwrap();
}
.render_into(&mut writer)
.unwrap();
}
7 changes: 4 additions & 3 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -1754,6 +1754,7 @@ a.tooltip:hover::after {
width: 80px;
}
#sidebar-button > a {
background-color: var(--button-background-color);
border-color: var(--border-color);
width: 33px;
}
Expand Down Expand Up @@ -1800,7 +1801,7 @@ button#toggle-all-docs:before {
/* Question mark with circle */
content: url('data:image/svg+xml,<svg width="18" height="18" viewBox="0 0 12 12" \
enable-background="new 0 0 12 12" xmlns="http://www.w3.org/2000/svg" fill="none">\
<circle r="5.5" cx="6" cy="6" stroke-width="1" stroke="black"/>\
<circle r="5.25" cx="6" cy="6" stroke-width="1.25" stroke="black"/>\
<text x="4.25" y="9" style="font:8px sans-serif;font-weight:1000" fill="black">?</text></svg>');
width: 18px;
height: 18px;
Expand Down Expand Up @@ -1833,7 +1834,7 @@ rustdoc-toolbar span.label {
/* sidebar resizer image */
content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22" \
fill="none" stroke="black">\
<rect x="1" y="1" width="20" height="20" ry="1.5" stroke-width="1.5"/>\
<rect x="1" y="1" width="20" height="20" ry="1.5" stroke-width="1.5" stroke="%23777"/>\
<circle cx="4.375" cy="4.375" r="1" stroke-width=".75"/>\
<path d="m7.6121 3v16 M5.375 7.625h-2 m2 3h-2 m2 3h-2" stroke-width="1.25"/></svg>');
width: 22px;
Expand Down Expand Up @@ -2232,7 +2233,7 @@ in src-script.js and main.js
#sidebar-button > a:before {
content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" \
viewBox="0 0 22 22" fill="none" stroke="black">\
<rect x="1" y="1" width="20" height="20" ry="1.5" stroke-width="1.5"/>\
<rect x="1" y="1" width="20" height="20" ry="1.5" stroke-width="1.5" stroke="%23777"/>\
<circle cx="4.375" cy="4.375" r="1" stroke-width=".75"/>\
<path d="m3 7.375h16m0-3h-4" stroke-width="1.25"/></svg>');
width: 22px;
Expand Down
3 changes: 2 additions & 1 deletion src/librustdoc/html/static/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -2817,7 +2817,8 @@ ${item.displayPath}<span class="${type}">${name}</span>\
crates += "</select></div>";
}

let output = `<div class="main-heading"><h1 class="search-results-title">Results${crates}</h1></div>`;
let output = `<div class="main-heading">\
<h1 class="search-results-title">Results${crates}</h1></div>`;
if (results.query.error !== null) {
const error = results.query.error;
error.forEach((value, index) => {
Expand Down

0 comments on commit 8370987

Please sign in to comment.