1
Fork 0

Rollup merge of #104928 - notriddle:notriddle/sidebar-toggle-flexbox, r=GuillaumeGomez

rustdoc: use flexbox CSS to align sidebar button instead of position

This accomplishes the same thing with significantly less code.

Preview: https://notriddle.com/notriddle-rustdoc-demos/sidebar-toggle-flexbox/src/test_dingus/lib.rs.html
This commit is contained in:
Guillaume Gomez 2022-11-26 17:47:25 +01:00 committed by GitHub
commit d99201c381
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1327,8 +1327,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 {
@ -1356,13 +1356,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;