Skip to content

Commit

Permalink
Reduce padding below the year headings in the ElectionList
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamoss committed Aug 12, 2024
1 parent 26092ad commit cb866b5
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ export default function ElectionsList(props: Props) {
position: 'relative',
overflow: 'auto',
'& ul': { padding: 0 },
// The first subheading doesn't need any top padding
'& li.MuiListSubheader-root:not(:first-of-type)': { paddingTop: 2 },
'& li.MuiListSubheader-root': { paddingTop: 0, zIndex: 2 },
// This was when the "scroll and keep the subheading pinned" code was working. Left for posterity in case we ever revisti to fix that.
'& li.MuiListSubheader-root': { zIndex: 2 },
// The first election in each year doesn't need any top padding either
'& li.MuiListSubheader-root + li.MuiListItem-root': { paddingTop: 0 },
}}
>
{Object.keys(electionsByYear)
Expand Down

0 comments on commit cb866b5

Please sign in to comment.