Finetune scrolling header navigation
This commit is contained in:
parent
f85e6385fb
commit
3dcd63e9b5
|
|
@ -1,7 +1,7 @@
|
||||||
document.documentElement.classList.replace('no-js', 'js');
|
document.documentElement.classList.replace('no-js', 'js');
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
rootMargin: '0px 0px -50% 0px'
|
rootMargin: '0px 0px -60% 0px'
|
||||||
};
|
};
|
||||||
const observer = new IntersectionObserver(entries => {
|
const observer = new IntersectionObserver(entries => {
|
||||||
entries.forEach(entry => {
|
entries.forEach(entry => {
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,13 @@
|
||||||
@use './components/button';
|
@use './components/button';
|
||||||
@use './components/skip-link';
|
@use './components/skip-link';
|
||||||
|
|
||||||
:target:before {
|
html {
|
||||||
content: "";
|
scroll-padding-top: 2rem;
|
||||||
display: block;
|
|
||||||
height: 80px;
|
|
||||||
margin: -80px 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@media screen and (max-width: 767px) {
|
||||||
|
scroll-padding-top: 8rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
body {
|
body {
|
||||||
--start: var(--primary-light);
|
--start: var(--primary-light);
|
||||||
--end: var(--secondary);
|
--end: var(--secondary);
|
||||||
|
|
@ -180,8 +180,10 @@ i {
|
||||||
|
|
||||||
.about-section,
|
.about-section,
|
||||||
.projects-section,
|
.projects-section,
|
||||||
.experiences-section {
|
.experiences-section,
|
||||||
|
.download-section {
|
||||||
padding-block: 2rem;
|
padding-block: 2rem;
|
||||||
|
margin-block: 3.5rem;
|
||||||
}
|
}
|
||||||
.about {
|
.about {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -278,7 +280,6 @@ i {
|
||||||
|
|
||||||
.download-section {
|
.download-section {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-block: 3.5rem;
|
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
color: var(--secondary-light);
|
color: var(--secondary-light);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue