@brillout/docpress 0.16.47-commit-e262d2a → 0.16.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Layout.tsx +2 -2
- package/css/heading.css +1 -1
- package/package.json +1 -1
package/Layout.tsx
CHANGED
|
@@ -87,7 +87,7 @@ function Layout({ children }: { children: React.ReactNode }) {
|
|
|
87
87
|
['--block-margin']: `${blockMargin}px`,
|
|
88
88
|
// ['--nav-head-height']: `${isLandingPage ? 70 : 63}px`,
|
|
89
89
|
['--nav-head-height']: `63px`,
|
|
90
|
-
//
|
|
90
|
+
// Offset for elements sitting below the sticky top nav
|
|
91
91
|
['--nav-head-sticky-offset']: isTopNavSticky ? 'var(--nav-head-height)' : '0px',
|
|
92
92
|
['--main-view-padding']: `${mainViewPadding}px`,
|
|
93
93
|
// We don't add `container` to `body` nor `html` beacuse in Firefox it breaks the `position: fixed` of <MenuModal>
|
|
@@ -226,7 +226,7 @@ function NavLeft() {
|
|
|
226
226
|
<div
|
|
227
227
|
style={{
|
|
228
228
|
position: 'sticky',
|
|
229
|
-
// Sit below the sticky top nav (or at the very top when the top nav
|
|
229
|
+
// Sit below the sticky top nav (or at the very top when the top nav isn't sticky)
|
|
230
230
|
top: 'var(--nav-head-sticky-offset)',
|
|
231
231
|
}}
|
|
232
232
|
>
|
package/css/heading.css
CHANGED
|
@@ -13,7 +13,7 @@ h3 {
|
|
|
13
13
|
margin-bottom: 20px;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
/* Offset headings below the sticky top nav (no offset
|
|
16
|
+
/* Offset headings below the sticky top nav (no offset if top nav isn't sticky). */
|
|
17
17
|
.doc-page :is(h1, h2, h3, h4, h5, h6) {
|
|
18
18
|
scroll-margin-top: calc(var(--nav-head-sticky-offset) + 16px);
|
|
19
19
|
}
|