Skip to content

Commit fd4ed79

Browse files
authored
feat(theme): add sticky positioning to API Explorer right panel (#1288)
Keep the right panel visible when scrolling long API documentation pages. The panel sticks below the navbar and allows internal scrolling when content exceeds viewport height.
1 parent 6ebffbb commit fd4ed79

File tree

1 file changed

+10
-0
lines changed
  • packages/docusaurus-theme-openapi-docs/src/theme

1 file changed

+10
-0
lines changed

packages/docusaurus-theme-openapi-docs/src/theme/styles.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,16 @@
166166
border-right: thin solid var(--ifm-toc-border-color);
167167
}
168168

169+
@media (min-width: 997px) {
170+
.openapi-right-panel__container {
171+
position: sticky;
172+
top: calc(var(--ifm-navbar-height) + 1rem);
173+
max-height: calc(100vh - var(--ifm-navbar-height) - 2rem);
174+
overflow-y: auto;
175+
align-self: flex-start;
176+
}
177+
}
178+
169179
@media (max-width: 997px) {
170180
.schema {
171181
margin-bottom: 1rem;

0 commit comments

Comments
 (0)