diff --git a/components/Docs/Docs.module.scss b/components/Docs/Docs.module.scss
index 761410bf..2c491153 100644
--- a/components/Docs/Docs.module.scss
+++ b/components/Docs/Docs.module.scss
@@ -45,7 +45,7 @@
flex-direction: column;
flex: 0 0 300px;
position: sticky;
- height: calc(100vh - 54px);
+ height: 100vh;
top: 0px;
z-index: 5;
max-width: 300px;
@@ -225,7 +225,6 @@
h4,
h5 {
scroll-margin-top: var(--size-large);
- margin: var(--size-large) 0 !important;
&:hover {
text-decoration: underline;
@@ -1009,7 +1008,7 @@ h5:hover .headingCopyIcon {
flex: 0 0 auto;
height: auto;
border-bottom: 1px solid var(--divider-on-dark);
- padding: var(--size-large) var(--size-large);
+ gap: 8px;
position: relative;
max-width: none;
top: 0;
@@ -1029,13 +1028,15 @@ h5:hover .headingCopyIcon {
}
.leftInner {
- padding: 0;
+ padding: 8px;
}
.tocMenu {
display: flex;
flex-direction: column;
align-items: flex-start;
+ padding: 8px;
+ margin: 0 8px;
.tocMenuLabel {
display: flex;
@@ -1092,10 +1093,6 @@ h5:hover .headingCopyIcon {
word-break: break-word;
}
- .leftSection {
- top: 0;
- }
-
.centerSection {
padding: var(--size-large) var(--size-medium) var(--size-4xLarge);
}
diff --git a/components/Docs/DocsTypographyRenderer/DocsTypographyRenderer.tsx b/components/Docs/DocsTypographyRenderer/DocsTypographyRenderer.tsx
index 0e654df0..cf0db92c 100644
--- a/components/Docs/DocsTypographyRenderer/DocsTypographyRenderer.tsx
+++ b/components/Docs/DocsTypographyRenderer/DocsTypographyRenderer.tsx
@@ -1,12 +1,12 @@
-import styles from '../Docs.module.scss'
+import classNames from 'classnames'
+import Link from 'next/link'
import { useRouter } from 'next/router'
+import { createElement } from 'react'
+import { BiLink } from 'react-icons/bi'
import { HeroVideo } from '../../Home/HeroVideo/HeroVideo'
import { Callout } from '../Callout/Callout'
+import styles from '../Docs.module.scss'
import { HighlightCodeBlock } from '../HighlightCodeBlock/HighlightCodeBlock'
-import Link from 'next/link'
-import { BiLink } from 'react-icons/bi'
-import { createElement } from 'react'
-import classNames from 'classnames'
const getIdFromHTMLHeaderProps = (props: any) => {
return props?.children
@@ -34,6 +34,7 @@ export const generateIdString = (str: string) => {
.trim()
.split(' ')
.join('-')
+ .toLowerCase()
}
const copyHeadingIcon = (index: number) => {
diff --git a/pages/docs/[[...doc]].tsx b/pages/docs/[[...doc]].tsx
index 98f0434c..9a921cc5 100644
--- a/pages/docs/[[...doc]].tsx
+++ b/pages/docs/[[...doc]].tsx
@@ -105,7 +105,7 @@ const useIntersectionObserver = (setActiveId: (s: string) => void) => {
}
const observer = new IntersectionObserver(callback, {
- rootMargin: '0px 0px -40% 0px',
+ rootMargin: '-45% 0px',
})
const headingElements = Array.from(document.querySelectorAll('h4, h5'))
@@ -435,7 +435,11 @@ const PageRightBar = ({ relativePath }: { title: string; relativePath: string })