From b7b96833d0ea436191be36ead1a98a353c9e0ae9 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Fri, 11 Jan 2019 16:15:06 +0000 Subject: [PATCH] Fix sticky headers so they don't hide behind header bar on desktop --- scripts/css/basic.css | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/scripts/css/basic.css b/scripts/css/basic.css index 8d99f6da..fdf2980d 100644 --- a/scripts/css/basic.css +++ b/scripts/css/basic.css @@ -465,11 +465,23 @@ dl.glossary dt { /* -- proposals page -------------------------------------------------------- */ #tables-of-tracked-proposals h2 { - margin-top: 7px; - padding-left: 10px; - position: -webkit-sticky; - position: sticky; - top: 0px; + padding-left: 10px; + position: -webkit-sticky; + position: sticky; +} + +/* Move sticky headers below header bar on desktop */ +@media all and (min-width:980px) { + #tables-of-tracked-proposals h2 { + top: 52px; + } +} + +/* Sticky headers stick to the top on mobile */ +@media all and (min-width:0px) and (max-width: 980px) { + #tables-of-tracked-proposals h2 { + top: 0px; + } } /* -- code displays --------------------------------------------------------- */