File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
src/librustdoc/html/static Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1817,9 +1817,12 @@ in storage.js
1817
1817
1818
1818
/* Should have min-width: (N + 1)px where N is the mobile breakpoint above. */
1819
1819
@media (min-width : 701px ) {
1820
+ /* Places file-link for a scraped example on top of the example to save space.
1821
+ We only do this on large screens so the file-link doesn't overlap too much
1822
+ with the example's content. */
1820
1823
.scraped-example-title {
1821
1824
position : absolute;
1822
- z-index : 1000 ;
1825
+ z-index : 10 ;
1823
1826
background : var (--main-background-color );
1824
1827
bottom : 8px ;
1825
1828
right : 5px ;
@@ -1915,6 +1918,7 @@ in storage.js
1915
1918
}
1916
1919
1917
1920
.scraped-example {
1921
+ /* So .scraped-example-title can be positioned absolutely */
1918
1922
position : relative;
1919
1923
}
1920
1924
Original file line number Diff line number Diff line change 3
3
"use strict" ;
4
4
5
5
( function ( ) {
6
- // Number of lines shown when code viewer is not expanded
6
+ // Number of lines shown when code viewer is not expanded.
7
+ // DEFAULT is the first example shown by default, while HIDDEN is
8
+ // the examples hidden beneath the "More examples" toggle.
7
9
const DEFAULT_MAX_LINES = 5 ;
8
10
const HIDDEN_MAX_LINES = 10 ;
9
11
You can’t perform that action at this time.
0 commit comments