Offset anchor links while taking the fixed header into consideration

This commit is contained in:
TwinProduction
2021-08-25 18:03:54 -04:00
parent cc12aeb58f
commit 9cc98c21ee
+10 -1
View File
@@ -4,10 +4,19 @@ export const ContainerWrapper = styled.div`
--padding: 64px;
width: 650px;
max-width: calc(100% - var(--padding) * 2);
padding: 0px var(--padding);
padding: 0 var(--padding);
margin: 0 auto;
@media screen and (max-width: 767px) {
--padding: 32px;
}
// Offsets anchor links while taking the fixed header into consideration
[id]::before {
content: '';
display: block;
height: 80px;
margin-top: -80px;
visibility: hidden;
}
`