Attempt to keep anchor targets below the fixed header

Largely using the CSS technique from https://stackoverflow.com/a/28824157/1028376
This commit is contained in:
benjamin melançon 2018-12-26 10:07:32 -05:00
parent 2145111b06
commit 5edc8a488a

View file

@ -28,6 +28,26 @@
}
}
// Attempt to keep anchor targets below the fixed header rather than having its
// associated content hidden behind the header; hence the height and negative
// margin here match the fixed header height at different breakpoints.
:target::before {
content: "";
display: block;
height: 3.3125em;
margin: -3.3125em 0 0;
@include desktop {
height: 5.875em;
margin: -5.875em 0 0;
}
}
a:target,
a:target:hover {
padding: 0;
margin: 0;
}
.navbar {
color: $white;
background-color: $dark;