Skip to content

Commit be7a501

Browse files
Merge pull request #1798 from matrix-org/anoa/sticky_headers_fix
Fix sticky headers so they don't hide behind header bar on desktop
2 parents 576aa22 + b7b9683 commit be7a501

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

scripts/css/basic.css

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -465,11 +465,23 @@ dl.glossary dt {
465465
/* -- proposals page -------------------------------------------------------- */
466466

467467
#tables-of-tracked-proposals h2 {
468-
margin-top: 7px;
469-
padding-left: 10px;
470-
position: -webkit-sticky;
471-
position: sticky;
472-
top: 0px;
468+
padding-left: 10px;
469+
position: -webkit-sticky;
470+
position: sticky;
471+
}
472+
473+
/* Move sticky headers below header bar on desktop */
474+
@media all and (min-width:980px) {
475+
#tables-of-tracked-proposals h2 {
476+
top: 52px;
477+
}
478+
}
479+
480+
/* Sticky headers stick to the top on mobile */
481+
@media all and (min-width:0px) and (max-width: 980px) {
482+
#tables-of-tracked-proposals h2 {
483+
top: 0px;
484+
}
473485
}
474486

475487
/* -- code displays --------------------------------------------------------- */

0 commit comments

Comments
 (0)