Skip to content

rustdoc: clean up help and settings button CSS #105155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
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
29 changes: 10 additions & 19 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,7 @@ so that we can apply CSS-filters to change the arrow color in themes */

.popover {
position: absolute;
top: 100%;
right: 0;
z-index: 2;
display: block;
Expand Down Expand Up @@ -1360,22 +1361,24 @@ a.test-arrow:hover {
}
#settings-menu, #help-button {
margin-left: 4px;
outline: none;
display: flex;
}

#settings-menu > a, #help-button > a, #copy-path {
width: 33px;
line-height: 1.5;
}

#settings-menu > a, #help-button > a {
padding: 5px;
height: 100%;
display: block;
display: flex;
align-items: center;
justify-content: center;
background-color: var(--button-background-color);
border: 1px solid var(--border-color);
border-radius: 2px;
color: var(--settings-button-color);
/* Rare exception to specifying font sizes in rem. Since this is acting
as an icon, it's okay to specify their sizes in pixels. */
font-size: 20px;
}

#settings-menu > a:hover, #settings-menu > a:focus,
Expand Down Expand Up @@ -1411,14 +1414,6 @@ a.test-arrow:hover {
animation: rotating 2s linear infinite;
}

#help-button > a {
text-align: center;
/* Rare exception to specifying font sizes in rem. Since this is acting
as an icon, it's okay to specify their sizes in pixels. */
font-size: 20px;
padding-top: 2px;
}

kbd {
display: inline-block;
padding: 3px 5px;
Expand Down Expand Up @@ -1660,10 +1655,6 @@ in storage.js
content: "Since ";
}

#copy-path {
display: none;
}

/* Hide the logo and item name from the sidebar. Those are displayed
in the mobile-topbar instead. */
.sidebar .sidebar-logo,
Expand Down Expand Up @@ -1797,8 +1788,8 @@ in storage.js
border-bottom: 1px solid;
}

/* We don't display the help button on mobile devices. */
#help-button {
/* We don't display these buttons on mobile devices. */
#copy-path, #help-button {
display: none;
}

Expand Down