Skip to content

Commit bee8a27

Browse files
committed
docs: prevent initial loading flicker
1 parent 10b110b commit bee8a27

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

guide/theme/pagetoc.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
#content > main {
2+
display: none;
3+
}
4+
5+
#content > main.wrapped {
6+
display: revert;
7+
}
8+
19
:root {
210
--toc-width: 270px;
311
--center-content-toc-shift: calc(-1 * var(--toc-width) / 2);

guide/theme/pagetoc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ function autoCreatePagetoc() {
2020
content.append(...main.childNodes);
2121

2222
main.appendChild(content);
23+
main.classList.add("wrapped");
2324

2425
main.insertAdjacentHTML("beforeend", `
2526
<div class="sidetoc">

0 commit comments

Comments
 (0)