Commit e0b0fad1 authored by minseok.park's avatar minseok.park

test scrollItemToMidpoint fn -- scrollTop

parent b9516866
Pipeline #19705 passed with stages
in 3 minutes and 20 seconds
...@@ -227,10 +227,6 @@ ...@@ -227,10 +227,6 @@
transform: rotate(90deg); transform: rotate(90deg);
} }
.nav-item.is-current-page > .nav-menu-toggle {
background-image: url(../img/caret_white.svg);
}
.is-current-page > .nav-link, .is-current-page > .nav-link,
.is-current-page > .nav-text { .is-current-page > .nav-text {
font-weight: var(--body-font-weight-bold); font-weight: var(--body-font-weight-bold);
......
...@@ -159,8 +159,8 @@ ...@@ -159,8 +159,8 @@
function scrollItemToMidpoint (panel, el) { function scrollItemToMidpoint (panel, el) {
var rect = panel.getBoundingClientRect() var rect = panel.getBoundingClientRect()
var effectiveHeight = rect.height var effectiveHeight = rect.height
var navStyle = window.getComputedStyle(nav) // var navStyle = window.getComputedStyle(nav)
if (navStyle.position === 'sticky') effectiveHeight -= rect.top - parseFloat(navStyle.top) // if (navStyle.position === 'sticky') effectiveHeight -= rect.top - parseFloat(navStyle.top)
panel.scrollTop = Math.max(0, (el.getBoundingClientRect().height - effectiveHeight) * 0.5 + el.offsetTop) panel.scrollTop = Math.max(0, (el.getBoundingClientRect().height - effectiveHeight) * 0.5 + el.offsetTop)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment