Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 4574217

Browse files
committed
Only put title over example on large screens
1 parent acd70e6 commit 4574217

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

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

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,6 +1815,19 @@ in storage.js
18151815
}
18161816
}
18171817

1818+
/* Should have min-width: (N + 1)px where N is the mobile breakpoint above. */
1819+
@media (min-width: 701px) {
1820+
.scraped-example-title {
1821+
position: absolute;
1822+
z-index: 1000;
1823+
background: var(--main-background-color);
1824+
bottom: 8px;
1825+
right: 5px;
1826+
padding: 2px 4px;
1827+
box-shadow: 0 0 4px var(--main-background-color);
1828+
}
1829+
}
1830+
18181831
@media print {
18191832
nav.sidebar, nav.sub, .out-of-band, a.srclink, #copy-path,
18201833
details.rustdoc-toggle[open] > summary::before, details.rustdoc-toggle > summary::before,
@@ -1913,16 +1926,6 @@ in storage.js
19131926
width: 100%;
19141927
}
19151928

1916-
.scraped-example-title {
1917-
position: absolute;
1918-
z-index: 1000;
1919-
background: white;
1920-
bottom: 8px;
1921-
right: 5px;
1922-
padding: 2px 4px;
1923-
box-shadow: 0 0 4px white;
1924-
}
1925-
19261929
.scraped-example:not(.expanded) .code-wrapper {
19271930
max-height: 120px;
19281931
}

0 commit comments

Comments
 (0)