mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
Tweak style
This commit is contained in:
parent
d971948f10
commit
458e262a26
@ -48,7 +48,7 @@ export function scrollActiveSidebar () {
|
||||
|
||||
li.classList.add('active')
|
||||
active = li
|
||||
!hoveredOverSidebar && sticky.isSticky && active.scrollIntoView()
|
||||
!hoveredOverSidebar && !sticky.noSticky && active.scrollIntoView()
|
||||
}
|
||||
|
||||
window.removeEventListener('scroll', highlight)
|
||||
@ -125,10 +125,10 @@ export function sticky () {
|
||||
return (function () {
|
||||
if (window.pageYOffset >= coverHeight || dom.classList.contains('hidden')) {
|
||||
document.body.classList.add('sticky')
|
||||
sticky.isSticky = true
|
||||
sticky.noSticky = false
|
||||
} else {
|
||||
document.body.classList.remove('sticky')
|
||||
sticky.isSticky = false
|
||||
sticky.noSticky = true
|
||||
}
|
||||
})()
|
||||
}
|
||||
|
||||
@ -96,6 +96,7 @@ nav {
|
||||
display: inline-block;
|
||||
|
||||
ul {
|
||||
border-radius: 2px;
|
||||
background-color: rgba($color-bg, .6);
|
||||
border: 1px solid $color-primary;
|
||||
opacity: 0;
|
||||
@ -160,6 +161,7 @@ nav {
|
||||
|
||||
/* main */
|
||||
main {
|
||||
display: block;
|
||||
size: 100vw 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user