@@ -366,22 +366,12 @@ img {
366
366
max-width : 100% ;
367
367
}
368
368
369
- .sub-logo-container , . logo-container {
369
+ .logo-container {
370
370
/* zero text boxes so that computed line height = image height exactly */
371
371
line-height : 0 ;
372
372
display : block;
373
373
}
374
374
375
- .sub-logo-container {
376
- margin-right : 32px ;
377
- }
378
-
379
- .sub-logo-container > img {
380
- height : 60px ;
381
- width : 60px ;
382
- object-fit : contain;
383
- }
384
-
385
375
.rust-logo {
386
376
filter : var (--rust-logo-filter );
387
377
}
@@ -424,14 +414,14 @@ img {
424
414
}
425
415
426
416
.rustdoc .src .sidebar-resizer {
427
- /* when closed, place resizer glow on top of the normal src sidebar border (no need to worry
428
- about sidebar) */
429
- left : 49px ;
417
+ /* src pages have separate closed flag */
418
+ display : none;
430
419
}
431
420
432
- .src-sidebar-expanded .rustdoc . src .sidebar-resizer {
421
+ .src-sidebar-expanded .src .sidebar-resizer {
433
422
/* for src sidebar, gap is already provided by 1px border on sidebar itself, so place resizer
434
423
to right of it */
424
+ display : block;
435
425
left : var (--src-sidebar-width );
436
426
}
437
427
@@ -447,7 +437,7 @@ img {
447
437
}
448
438
449
439
.sidebar-resizing .sidebar {
450
- position : fixed;
440
+ position : fixed !important ;
451
441
z-index : 100 ;
452
442
}
453
443
.sidebar-resizing > body {
@@ -497,28 +487,25 @@ img {
497
487
}
498
488
499
489
.sidebar , .mobile-topbar , .sidebar-menu-toggle ,
500
- # src-sidebar-toggle , # src-sidebar {
490
+ # src-sidebar {
501
491
background-color : var (--sidebar-background-color );
502
492
}
503
493
504
- # src-sidebar-toggle > button : hover , # src-sidebar-toggle > button : focus {
505
- background-color : var (--sidebar-background-color-hover );
506
- }
507
-
508
- .src .sidebar > * : not (# src-sidebar-toggle ) {
509
- visibility : hidden;
494
+ .src .sidebar {
495
+ position : absolute;
496
+ top : 0 ;
497
+ bottom : 0 ;
498
+ left : -1000px ;
510
499
}
511
500
512
501
.src-sidebar-expanded .src .sidebar {
502
+ position : sticky;
503
+ left : 0 ;
513
504
overflow-y : auto;
514
505
flex-basis : var (--src-sidebar-width );
515
506
width : var (--src-sidebar-width );
516
507
}
517
508
518
- .src-sidebar-expanded .src .sidebar > * : not (# src-sidebar-toggle ) {
519
- visibility : visible;
520
- }
521
-
522
509
# all-types {
523
510
margin-top : 1em ;
524
511
}
@@ -1528,18 +1515,6 @@ a.tooltip:hover::after {
1528
1515
font-weight : normal;
1529
1516
}
1530
1517
1531
- # src-sidebar-toggle {
1532
- position : sticky;
1533
- top : 0 ;
1534
- left : 0 ;
1535
- font-size : 1.25rem ;
1536
- border-bottom : 1px solid;
1537
- display : flex;
1538
- height : 40px ;
1539
- justify-content : stretch;
1540
- align-items : stretch;
1541
- z-index : 10 ;
1542
- }
1543
1518
# src-sidebar {
1544
1519
width : 100% ;
1545
1520
overflow : auto;
@@ -1557,18 +1532,14 @@ a.tooltip:hover::after {
1557
1532
# src-sidebar div .files > a .selected {
1558
1533
background-color : var (--src-sidebar-background-selected );
1559
1534
}
1560
- # src-sidebar-toggle > button {
1561
- font-size : inherit;
1562
- font-weight : bold;
1563
- background : none;
1564
- color : inherit;
1565
- text-align : center;
1566
- border : none;
1567
- outline : none;
1568
- flex : 1 1 ;
1569
- /* iOS button gradient: https://stackoverflow.com/q/5438567 */
1570
- -webkit-appearance : none;
1571
- opacity : 1 ;
1535
+
1536
+ .src-sidebar-title {
1537
+ position : sticky;
1538
+ top : 0 ;
1539
+ display : flex;
1540
+ padding : 8px ;
1541
+ padding-left : 48px ;
1542
+ background : var (--sidebar-background-color );
1572
1543
}
1573
1544
1574
1545
# settings-menu , # help-button {
@@ -1578,7 +1549,8 @@ a.tooltip:hover::after {
1578
1549
# sidebar-button {
1579
1550
display : none;
1580
1551
}
1581
- .hide-sidebar # sidebar-button {
1552
+ .hide-sidebar # sidebar-button ,
1553
+ .src # sidebar-button {
1582
1554
display : flex;
1583
1555
margin-right : 4px ;
1584
1556
position : fixed;
@@ -1588,6 +1560,16 @@ a.tooltip:hover::after {
1588
1560
background-color : var (--main-background-color );
1589
1561
z-index : 1 ;
1590
1562
}
1563
+ .src # sidebar-button {
1564
+ left : 12px ;
1565
+ z-index : 101 ;
1566
+ }
1567
+ .src .search-form {
1568
+ margin-left : 40px ;
1569
+ }
1570
+ .src-sidebar-expanded .src .search-form {
1571
+ margin-left : 0 ;
1572
+ }
1591
1573
# settings-menu > a , # help-button > a , # sidebar-button > a {
1592
1574
display : flex;
1593
1575
align-items : center;
@@ -1843,10 +1825,6 @@ in src-script.js and main.js
1843
1825
scroll-margin-top : 45px ;
1844
1826
}
1845
1827
1846
- .hide-sidebar # sidebar-button {
1847
- position : static;
1848
- }
1849
-
1850
1828
.rustdoc {
1851
1829
/* Sidebar should overlay main content, rather than pushing main content to the right.
1852
1830
Turn off `display: flex` on the body element. */
@@ -1974,31 +1952,6 @@ in src-script.js and main.js
1974
1952
left : -11px ;
1975
1953
}
1976
1954
1977
- # src-sidebar-toggle {
1978
- position : fixed;
1979
- left : 1px ;
1980
- top : 100px ;
1981
- width : 30px ;
1982
- font-size : 1.5rem ;
1983
- padding : 0 ;
1984
- z-index : 10 ;
1985
- border-top-right-radius : 3px ;
1986
- border-bottom-right-radius : 3px ;
1987
- border : 1px solid;
1988
- border-left : 0 ;
1989
- }
1990
-
1991
- .src-sidebar-expanded # src-sidebar-toggle {
1992
- left : unset;
1993
- top : unset;
1994
- width : unset;
1995
- border-top-right-radius : unset;
1996
- border-bottom-right-radius : unset;
1997
- position : sticky;
1998
- border : 0 ;
1999
- border-bottom : 1px solid;
2000
- }
2001
-
2002
1955
/* We don't display these buttons on mobile devices. */
2003
1956
# copy-path , # help-button {
2004
1957
display : none;
@@ -2015,6 +1968,14 @@ in src-script.js and main.js
2015
1968
height : 22px ;
2016
1969
}
2017
1970
1971
+ /* src sidebar button opens modal
1972
+ use hamburger button */
1973
+ .src # sidebar-button > a : before {
1974
+ content : url ('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" \
1975
+ viewBox= "0 0 22 22" fill="none" stroke="black">\
1976
+ <path d= "M3,5h16M3,11h16M3,17h16" stroke-width="3"/></svg>');
1977
+ }
1978
+
2018
1979
/* Display an alternating layout on tablets and phones */
2019
1980
.item-table , .item-row , .item-table > li , .item-table > li > div ,
2020
1981
.search-results > a , .search-results > a > div {
@@ -2040,9 +2001,19 @@ in src-script.js and main.js
2040
2001
}
2041
2002
2042
2003
.src-sidebar-expanded .src .sidebar {
2004
+ position : fixed;
2043
2005
max-width : 100vw ;
2044
2006
width : 100vw ;
2045
2007
}
2008
+ .src .src-sidebar-title {
2009
+ padding-top : 0 ;
2010
+ }
2011
+ .hide-sidebar # sidebar-button {
2012
+ position : static;
2013
+ }
2014
+ .src # sidebar-button {
2015
+ position : fixed;
2016
+ }
2046
2017
2047
2018
/* Position of the "[-]" element. */
2048
2019
details .toggle : not (.top-doc ) > summary {
@@ -2114,12 +2085,6 @@ in src-script.js and main.js
2114
2085
.search-form {
2115
2086
align-self : stretch;
2116
2087
}
2117
-
2118
- .sub-logo-container > img {
2119
- height : 35px ;
2120
- width : 35px ;
2121
- margin-bottom : var (--nav-sub-mobile-padding );
2122
- }
2123
2088
}
2124
2089
2125
2090
.variant ,
0 commit comments