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:
parent
2145111b06
commit
5edc8a488a
1 changed files with 20 additions and 0 deletions
|
@ -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 {
|
.navbar {
|
||||||
color: $white;
|
color: $white;
|
||||||
background-color: $dark;
|
background-color: $dark;
|
||||||
|
|
Loading…
Reference in a new issue