Skip to content

Commit c32d449

Browse files
authored
Fix OpenAPI path display (#3743)
1 parent 1dcf4df commit c32d449

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.changeset/solid-things-own.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 path display

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,10 @@
454454
@apply flex items-center font-mono text-[0.813rem] gap-1 h-fit *:truncate overflow-x-auto min-w-0 max-w-full font-normal text-tint-strong;
455455
}
456456

457+
.openapi-codesample-header-content .openapi-path-title {
458+
@apply block;
459+
}
460+
457461
.openapi-codesample-header-content .openapi-path .openapi-path-variable {
458462
@apply text-[0.813rem];
459463
}
@@ -486,7 +490,7 @@
486490
}
487491

488492
.openapi-path-title {
489-
@apply flex-1 relative font-normal text-left overflow-x-auto font-mono text-tint-strong/10;
493+
@apply flex-1 relative font-normal items-center gap-y-1 flex flex-wrap text-left overflow-x-auto font-mono text-tint-strong/10;
490494
@apply whitespace-nowrap md:whitespace-normal;
491495
scrollbar-width: none;
492496
-ms-overflow-style: none;
@@ -606,7 +610,7 @@ body:has(.openapi-select-popover) {
606610
}
607611

608612
.openapi-select-unstyled > button {
609-
@apply p-1;
613+
@apply p-1 *:truncate max-w-full;
610614
}
611615

612616
.openapi-select > button[data-focused="true"] {
@@ -998,7 +1002,7 @@ body:has(.openapi-select-popover) {
9981002
}
9991003

10001004
.openapi-path-copy-button-icon {
1001-
@apply size-6 flex opacity-0 transition-all;
1005+
@apply size-6 opacity-0 transition-all hidden sm:flex;
10021006
}
10031007

10041008
.openapi-path:hover .openapi-path-copy-button-icon {

0 commit comments

Comments
 (0)