Skip to content

Commit 40e52e8

Browse files
authored
Remove white line on top of the menu in personal header (#640)
1 parent 3dfaae8 commit 40e52e8

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

assets/js/frontend.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ const observer = new IntersectionObserver(
88
stickyElement.classList.toggle( 'stuck', ! e.isIntersecting );
99
},
1010
{
11-
root: null,
1211
rootMargin: '0px',
13-
threshold: [ 0, 1 ],
12+
threshold: [ 0.1 ],
1413
}
1514
);
1615

sass/_header.scss

+27-1
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ body {
261261
&.sunflower-logo {
262262
background-color: $secondary;
263263
}
264+
264265
margin-right: 0.25rem;
265266
height: 95px;
266267
width: 95px;
@@ -313,5 +314,30 @@ body {
313314

314315
#navbar-sticky-detector.header-personal {
315316
height: 1px;
316-
background: $white;
317+
margin-top: -1px;
318+
}
319+
320+
.stuck ~ #content {
321+
margin-top: 95px;
322+
323+
// to scroll to correct position with sticky header
324+
// while destination is an anchor
325+
.entry-content {
326+
327+
h1,
328+
h2,
329+
h3,
330+
h4,
331+
h5,
332+
h6 {
333+
334+
&[id]::before {
335+
content: "";
336+
display: block;
337+
height: 95px;
338+
margin-top: -45px;
339+
visibility: hidden;
340+
}
341+
}
342+
}
317343
}

0 commit comments

Comments
 (0)