Skip to content

Commit

Permalink
rustdoc: use flexbox CSS to align sidebar button instead of position
Browse files Browse the repository at this point in the history
This accomplishes the same thing with significantly less code.
  • Loading branch information
notriddle committed Nov 26, 2022
1 parent aff003b commit 8b001b4
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -1328,8 +1328,8 @@ a.test-arrow:hover {
border-bottom: 1px solid;
display: flex;
height: 40px;
justify-content: center;
align-items: center;
justify-content: stretch;
align-items: stretch;
z-index: 10;
}
#source-sidebar {
Expand Down Expand Up @@ -1357,13 +1357,7 @@ a.test-arrow:hover {
text-align: center;
border: none;
outline: none;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
/* work around button layout strangeness: https://stackoverflow.com/q/7271561 */
width: 100%;
flex: 1 1;
/* iOS button gradient: https://stackoverflow.com/q/5438567 */
-webkit-appearance: none;
opacity: 1;
Expand Down

0 comments on commit 8b001b4

Please sign in to comment.