Skip to content

Commit 8b001b4

Browse files
committed
rustdoc: use flexbox CSS to align sidebar button instead of position
This accomplishes the same thing with significantly less code.
1 parent aff003b commit 8b001b4

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/librustdoc/html/static/css/rustdoc.css

+3-9
Original file line numberDiff line numberDiff line change
@@ -1328,8 +1328,8 @@ a.test-arrow:hover {
13281328
border-bottom: 1px solid;
13291329
display: flex;
13301330
height: 40px;
1331-
justify-content: center;
1332-
align-items: center;
1331+
justify-content: stretch;
1332+
align-items: stretch;
13331333
z-index: 10;
13341334
}
13351335
#source-sidebar {
@@ -1357,13 +1357,7 @@ a.test-arrow:hover {
13571357
text-align: center;
13581358
border: none;
13591359
outline: none;
1360-
position: absolute;
1361-
top: 0;
1362-
bottom: 0;
1363-
left: 0;
1364-
right: 0;
1365-
/* work around button layout strangeness: https://stackoverflow.com/q/7271561 */
1366-
width: 100%;
1360+
flex: 1 1;
13671361
/* iOS button gradient: https://stackoverflow.com/q/5438567 */
13681362
-webkit-appearance: none;
13691363
opacity: 1;

0 commit comments

Comments
 (0)