1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-08 15:05:26 +02:00

update offsets

This commit is contained in:
Taly 2022-07-25 16:28:42 +03:00
parent 8bc5ae06ed
commit 65020cee65
2 changed files with 6 additions and 4 deletions

View file

@ -122,10 +122,12 @@ export default class TableOfContent {
const contentTopOffset = this.getScrollPadding();
/**
* Treat section as active if it reaches the 1/5 of viewport from top
* For example, for a window with 1006px height it will be 219px
* Additional offset for correct calculation of active section
*
* Cause opening page with anchor could scroll almost
* near to the target section and we need to add 1px to calculations
*/
const activationOffset = window.innerHeight / 5;
const activationOffset = 1;
const detectSection = () => {
/**

View file

@ -1,5 +1,5 @@
html {
scroll-padding-top: calc(var(--layout-height-header) + 5vh);
scroll-padding-top: calc(var(--layout-height-header) + 10vh);
}
.docs-header {