Skip to content

Commit df8fe4a

Browse files
committed
fix: prevent unreleased version header overflow on mobile
Remove fixed height and use auto-sizing padding instead. On mobile (≤700px), switch from absolute to relative positioning so the banner flows naturally in rustdoc's block layout without overlapping the sticky topbar.
1 parent 83c78a4 commit df8fe4a

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

api-docs/styles.css

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
left: 0;
66
top: 0;
77
right: 0;
8-
height: 70px;
9-
padding-top: 10px;
10-
padding-bottom: 10px;
8+
padding: 10px 15px;
119
text-align: center;
1210
font-family: sans-serif;
1311
box-shadow: 0 0 5px 0 rgb(100, 100, 100);
@@ -21,5 +19,15 @@
2119
}
2220

2321
body {
24-
padding-top: 70px !important;
22+
padding-top: 70px;
23+
}
24+
25+
@media (max-width: 700px) {
26+
#unreleased-version-header {
27+
position: relative;
28+
}
29+
30+
body {
31+
padding-top: 0;
32+
}
2533
}

0 commit comments

Comments
 (0)