Skip to content

Commit 12a455d

Browse files
authored
Fix OpenAPI layout issues (#3242)
1 parent d00dc8c commit 12a455d

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.changeset/strong-eggs-glow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'gitbook': patch
3+
---
4+
5+
Fix OpenAPI layout issues

packages/gitbook/src/components/DocumentView/OpenAPI/style.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
}
146146

147147
.openapi-column-preview-body {
148-
@apply flex flex-col gap-4 sticky top-4 site-header:top-20 site-header-sections:top-32 page-api-block:xl:max-2xl:top-32 print-mode:static;
148+
@apply flex flex-col gap-4 sticky top-4 site-header:top-20 site-header:xl:max-2xl:top-32 site-header-sections:top-32 site-header-sections:xl:max-2xl:top-44 print-mode:static;
149149
}
150150

151151
.openapi-column-preview pre {
@@ -770,18 +770,18 @@ body:has(.openapi-select-popover) {
770770
}
771771

772772
.openapi-disclosure:has(> .openapi-disclosure-trigger:hover) {
773-
@apply bg-tint-subtle;
773+
@apply bg-tint-subtle overflow-hidden;
774774
}
775775

776776
.openapi-disclosure:has(> .openapi-disclosure-trigger:hover),
777777
.openapi-disclosure[data-expanded="true"] {
778778
@apply ring-1 shadow-sm;
779779
}
780780

781-
.openapi-disclosure[data-expanded="true"]:not(:first-child) {
781+
.openapi-disclosure[data-expanded="true"]:not(.openapi-schemas-disclosure):not(:first-child) {
782782
@apply mt-2;
783783
}
784-
.openapi-disclosure[data-expanded="true"]:not(:last-child) {
784+
.openapi-disclosure[data-expanded="true"]:not(.openapi-schemas-disclosure):not(:last-child) {
785785
@apply mb-2;
786786
}
787787

packages/gitbook/src/components/PageAside/PageAside.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export function PageAside(props: {
8787
'page-api-block:xl:max-2xl:dark:hover:shadow-tint-1/1',
8888
'page-api-block:xl:max-2xl:rounded-md',
8989
'page-api-block:xl:max-2xl:h-auto',
90-
'page-api-block:xl:max-2xl:my-8',
90+
'page-api-block:xl:max-2xl:my-4',
9191
'page-api-block:p-2'
9292
)}
9393
>

0 commit comments

Comments
 (0)