Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cuddly-singers-like.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nextjs-website": patch
---

Fix headers style for RapiDoc, remove blue separator lines
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ const ApiViewer: FC<ApiViewerProps> = ({ specURL }) => {
#api-info {
margin-left: 0 !important;
}
h1, h2, h3, h4, h5, #api-title, .title.tag {
margin: 0 !important;
color: ${palette.text.primary} !important;
padding-top: 24px !important;
}
.section-gap--read-mode {
border-top: 0 !important;
}
.nav-method {
border-radius: 4px !important;
min-width: 48px !important;
Expand All @@ -77,6 +85,41 @@ const ApiViewer: FC<ApiViewerProps> = ({ specURL }) => {
background-color: ${palette.info[100]} !important;
margin-right: 8px !important;
}

h1, #api-title {
font-size: 2.375rem !important;
font-weight: 700 !important;
line-height: 2.625rem !important;
padding-bottom: 24px !important;
}

h2, .title.tag {
font-size: 1.875rem !important;
font-weight: 600 !important;
line-height: 2.625rem !important;
padding-bottom: 8px !important;
}

h3 {
font-size: 1.5rem !important;
font-weight: 600 !important;
line-height: 1.5rem !important;
padding-bottom: 8px !important;
}

h4 {
font-size: 1.25rem !important;
font-weight: 600 !important;
line-height: 1.5rem !important;
padding-bottom: 8px !important;
}

h5 {
font-size: 1rem !important;
font-weight: 600 !important;
line-height: 1.5rem !important;
padding-bottom: 8px !important;
}
`;
rapidocEl.shadowRoot.appendChild(style);
}
Expand All @@ -93,7 +136,7 @@ const ApiViewer: FC<ApiViewerProps> = ({ specURL }) => {
return () => {
rapidocEl.removeEventListener('spec-loaded', injectStyles);
};
}, [palette.info]);
}, [palette.info, palette.text.primary]);

// Cast strict TS error for custom element
const RapiDoc = 'rapi-doc' as unknown as ElementType;
Expand Down