Skip to content

Commit 6c15d83

Browse files
authored
Update OpenAPI border radius (#4323)
1 parent 6c967c9 commit 6c15d83

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ body {
272272
}
273273
.scalar-activate-button {
274274
@apply flex gap-2 items-center;
275-
@apply bg-primary-original text-contrast-primary-original hover:bg-primary-solid-hover hover:text-contrast-primary-solid-hover contrast-more:ring-1 rounded-md straight-corners:rounded-none circular-corners:rounded-full circular-corners:px-3 place-self-start;
275+
@apply bg-primary-original text-contrast-primary-original hover:bg-primary-solid-hover hover:text-contrast-primary-solid-hover contrast-more:ring-1 rounded-lg straight-corners:rounded-none circular-corners:rounded-full circular-corners:px-3 place-self-start;
276276
@apply depth-subtle:shadow-xs hover:depth-subtle:shadow-md focus-visible:depth-subtle:shadow-md active:depth-subtle:shadow-xs;
277277
@apply contrast-more:ring-tint-12 contrast-more:hover:ring-2 contrast-more:hover:ring-tint-12;
278278
@apply hover:depth-subtle:-translate-y-px focus-visible:depth-subtle:-translate-y-px active:depth-subtle:translate-y-0 transition-all;

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

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
.openapi-deprecated,
4242
.openapi-stability {
43-
@apply py-0.5 px-1.5 min-w-[1.625rem] font-normal w-fit justify-center items-center ring-1 ring-inset ring-tint bg-tint rounded straight-corners:rounded-none circular-corners:rounded-sm text-sm leading-[calc(max(1.20em,1.25rem))] before:content-none! after:!content-none;
43+
@apply py-0.5 px-1.5 min-w-[1.625rem] font-normal w-fit justify-center items-center ring-1 ring-inset ring-tint bg-tint rounded-md straight-corners:rounded-none circular-corners:rounded-lg text-sm leading-[calc(max(1.20em,1.25rem))] before:content-none! after:!content-none;
4444
}
4545

4646
.openapi-stability-alpha {
@@ -78,7 +78,7 @@
7878
}
7979

8080
.openapi-markdown code {
81-
@apply py-px px-1 min-w-[1.625rem] font-normal w-fit justify-center items-center ring-1 ring-inset ring-tint bg-tint rounded straight-corners:rounded-none circular-corners:rounded-md text-sm leading-[calc(max(1.20em,1.25rem))] before:content-none! after:!content-none;
81+
@apply py-px px-1 min-w-[1.625rem] font-normal w-fit justify-center items-center ring-1 ring-inset ring-tint bg-tint rounded-md straight-corners:rounded-none circular-corners:rounded-lg text-sm leading-[calc(max(1.20em,1.25rem))] before:content-none! after:!content-none;
8282
}
8383

8484
.openapi-markdown pre code {
@@ -101,7 +101,7 @@
101101
/* Method Tags */
102102
.openapi-method,
103103
.openapi-statuscode {
104-
@apply rounded straight-corners:rounded-none circular-corners:rounded-md uppercase font-mono items-center shrink-0 font-semibold text-[0.813rem] px-1 py-0.5 mr-2 text-tint-12/8 leading-tight align-middle inline-flex ring-1 ring-inset ring-tint-12/1 dark:ring-tint-1/1 whitespace-nowrap;
104+
@apply rounded-md straight-corners:rounded-none circular-corners:rounded-lg uppercase font-mono items-center shrink-0 font-semibold text-[0.813rem] px-1 py-0.5 mr-2 text-tint-12/8 leading-tight align-middle inline-flex ring-1 ring-inset ring-tint-12/1 dark:ring-tint-1/1 whitespace-nowrap;
105105
}
106106

107107
.openapi-method-get,
@@ -149,7 +149,7 @@
149149
}
150150

151151
.openapi-column-preview {
152-
@apply flex flex-col flex-1 xl:max-2xl:pt-20 lg:pt-6 sticky self-start max-h-[calc(100vh-var(--toc-top-offset))] top-(--toc-top-offset);
152+
@apply flex flex-col flex-1 sticky self-start max-h-[calc(100vh-var(--toc-top-offset))] scroll-mt-4 top-[calc(var(--toc-top-offset)+1.5rem)];
153153
}
154154

155155
.openapi-column-preview-body {
@@ -276,11 +276,11 @@
276276
}
277277

278278
.openapi-schema-enum-value:first-child {
279-
@apply rounded-l straight-corners:rounded-none circular-corners:rounded-l-md ml-0;
279+
@apply rounded-l-md straight-corners:rounded-none circular-corners:rounded-l-lg ml-0;
280280
}
281281

282282
.openapi-schema-enum-value:last-child {
283-
@apply rounded-r straight-corners:rounded-none circular-corners:rounded-r-md;
283+
@apply rounded-r-md straight-corners:rounded-none circular-corners:rounded-r-lg;
284284
}
285285

286286
/* Schema Description */
@@ -314,7 +314,7 @@
314314
.openapi-schema-pattern code,
315315
.openapi-schema-enum-value code,
316316
.openapi-schema-default code {
317-
@apply py-px px-1 min-w-[1.625rem] text-tint-strong font-normal w-fit justify-center items-center ring-1 ring-inset ring-tint-subtle bg-tint rounded straight-corners:rounded-none circular-corners:rounded-md text-xs leading-[calc(max(1.20em,1.25rem))] before:content-none! after:!content-none;
317+
@apply py-px px-1 min-w-[1.625rem] text-tint-strong font-normal w-fit justify-center items-center ring-1 ring-inset ring-tint-subtle bg-tint rounded-md straight-corners:rounded-none circular-corners:rounded-lg text-xs leading-[calc(max(1.20em,1.25rem))] before:content-none! after:!content-none;
318318
}
319319

320320
/* Authentication */
@@ -344,7 +344,7 @@
344344
}
345345

346346
.openapi-securities-url {
347-
@apply ml-0.5 px-0.5 rounded straight-corners:rounded-none circular-corners:rounded-md hover:bg-tint dark:hover:bg-tint-hover transition-colors;
347+
@apply ml-0.5 px-0.5 rounded-md straight-corners:rounded-none circular-corners:rounded-lg hover:bg-tint dark:hover:bg-tint-hover transition-colors;
348348
}
349349

350350
.openapi-securities-body {
@@ -486,7 +486,7 @@
486486
}
487487

488488
.openapi-path-variable {
489-
@apply p-px min-w-[1.625rem] text-tint-strong font-normal w-fit justify-center items-center ring-1 ring-inset ring-tint bg-tint rounded straight-corners:rounded-none circular-corners:rounded-md text-sm leading-none before:content-none! after:!content-none;
489+
@apply p-px min-w-[1.625rem] text-tint-strong font-normal w-fit justify-center items-center ring-1 ring-inset ring-tint bg-tint rounded-md straight-corners:rounded-none circular-corners:rounded-lg text-sm leading-none before:content-none! after:!content-none;
490490
}
491491

492492
.openapi-path-server {
@@ -532,7 +532,7 @@
532532
.openapi-panel,
533533
.openapi-codesample,
534534
.openapi-response-examples {
535-
@apply border shrink min-h-32 overflow-hidden rounded-lg straight-corners:rounded-none circular-corners:rounded-xl bg-tint-subtle theme-muted:bg-tint-base theme-bold-tint:bg-tint-base border-tint-subtle depth-subtle:shadow-sm;
535+
@apply border shrink min-h-32 overflow-hidden rounded-corners:rounded-xl circular-corners:rounded-2xl straight-corners:rounded-xs bg-tint-subtle theme-muted:bg-tint-base theme-bold-tint:bg-tint-base border-tint-subtle depth-subtle:shadow-sm;
536536
}
537537

538538
.openapi-response-examples-panel {
@@ -611,7 +611,7 @@ body:has(.openapi-select-popover) {
611611
}
612612

613613
.openapi-select > button {
614-
@apply flex items-center font-normal cursor-pointer *:truncate gap-1.5 p-1.5 border border-tint-subtle text-tint-strong rounded straight-corners:rounded-none circular-corners:rounded-md leading-none;
614+
@apply flex items-center font-normal cursor-pointer *:truncate gap-1.5 p-1.5 border border-tint-subtle text-tint-strong rounded-md straight-corners:rounded-none circular-corners:rounded-lg leading-none;
615615
@apply hover:bg-tint dark:hover:bg-tint-hover transition-all;
616616
}
617617

@@ -644,7 +644,7 @@ body:has(.openapi-select-popover) {
644644
}
645645

646646
.openapi-select-popover {
647-
@apply min-w-32 z-10 max-w-[max(20rem,var(--trigger-width))] overflow-x-hidden max-h-52 overflow-y-auto p-1.5 border border-tint-subtle bg-tint-base backdrop-blur-xl rounded-md straight-corners:rounded-none circular-corners:rounded-xl;
647+
@apply min-w-32 z-10 max-w-[max(20rem,var(--trigger-width))] overflow-x-hidden max-h-52 overflow-y-auto p-1.5 border border-tint-subtle bg-tint-base backdrop-blur-xl rounded-corners:rounded-md circular-corners:rounded-xl straight-corners:rounded-none;
648648
@apply shadow-md shadow-tint-12/1 dark:shadow-tint-1/1;
649649
}
650650

@@ -657,7 +657,7 @@ body:has(.openapi-select-popover) {
657657
}
658658

659659
.openapi-select-item {
660-
@apply text-sm flex items-center cursor-pointer px-1.5 overflow-hidden py-1 text-tint ring-0 border-none rounded straight-corners:rounded-none circular-corners:rounded-md !outline-none;
660+
@apply text-sm flex items-center cursor-pointer px-1.5 overflow-hidden py-1 text-tint ring-0 border-none rounded-md straight-corners:rounded-none circular-corners:rounded-lg !outline-none;
661661
@apply hover:bg-tint-hover hover:theme-gradient:bg-tint-12/1 hover:text-tint-strong contrast-more:hover:ring-1 contrast-more:hover:ring-inset contrast-more:hover:ring-current;
662662
}
663663

@@ -753,7 +753,7 @@ body:has(.openapi-select-popover) {
753753
}
754754

755755
.openapi-tabs-tab {
756-
@apply hover:bg-primary-hover whitespace-nowrap font-mono font-normal tabular-nums hover:text-primary cursor-pointer transition-all relative text-[0.813rem] text-tint px-1 border border-transparent rounded straight-corners:rounded-none circular-corners:rounded-md;
756+
@apply hover:bg-primary-hover whitespace-nowrap font-mono font-normal tabular-nums hover:text-primary cursor-pointer transition-all relative text-[0.813rem] text-tint px-1 border border-transparent rounded-md straight-corners:rounded-none circular-corners:rounded-lg;
757757
}
758758

759759
.openapi-tabs-tab[aria-selected="true"] {
@@ -767,7 +767,7 @@ body:has(.openapi-select-popover) {
767767

768768
/* Disclosure group */
769769
.openapi-disclosure-group {
770-
@apply border-tint-subtle transition-all border-b border-x overflow-auto last:rounded-b-md straight-corners:last:rounded-none circular-corners:last:rounded-b-xl first:rounded-t-md straight-corners:first:rounded-none circular-corners:first:rounded-t-xl first:border-t relative;
770+
@apply border-tint-subtle transition-all border-b border-x overflow-auto rounded-corners:last:rounded-b-xl circular-corners:last:rounded-b-2xl straight-corners:last:rounded-b-xs rounded-corners:first:rounded-t-xl circular-corners:first:rounded-t-2xl straight-corners:first:rounded-t-xs first:border-t relative;
771771
}
772772

773773
.openapi-disclosure-group:has(.openapi-disclosure-group-trigger:hover) {
@@ -820,7 +820,7 @@ body:has(.openapi-select-popover) {
820820

821821
/* Disclosure */
822822
.openapi-schemas-disclosure {
823-
@apply border-t border-x last:border-b border-tint-subtle !ring-0 first:!rounded-t-xl last:!rounded-b-xl !rounded-none;
823+
@apply border-t border-x last:border-b border-tint-subtle !ring-0 rounded-corners:first:!rounded-t-xl rounded-corners:last:!rounded-b-xl circular-corners:first:!rounded-t-2xl circular-corners:last:!rounded-b-2xl straight-corners:first:!rounded-t-xs straight-corners:last:!rounded-b-xs !rounded-none;
824824
}
825825

826826
.openapi-schemas-disclosure > .openapi-disclosure-trigger {
@@ -865,7 +865,7 @@ body:has(.openapi-select-popover) {
865865
.openapi-schema-alternatives .openapi-disclosure,
866866
.openapi-schemas-disclosure .openapi-schema.openapi-disclosure
867867
) {
868-
@apply rounded-md circular-corners:rounded-xl straight-corners:rounded-none;
868+
@apply rounded-corners:rounded-md circular-corners:rounded-xl straight-corners:rounded-none;
869869
}
870870

871871
.openapi-disclosure .openapi-schemas-disclosure .openapi-schema.openapi-disclosure {
@@ -888,7 +888,7 @@ body:has(.openapi-select-popover) {
888888
}
889889

890890
.openapi-disclosure-trigger-label {
891-
@apply absolute right-3 font-sans! mr-px px-2 h-5 justify-end shrink-0 ring-tint-subtle truncate text-tint duration-300 transition-all rounded straight-corners:rounded-none circular-corners:rounded-xl flex flex-row gap-1 items-center text-xs;
891+
@apply absolute right-3 font-sans! mr-px px-2 h-5 justify-end shrink-0 ring-tint-subtle truncate text-tint duration-300 transition-all rounded-md straight-corners:rounded-none circular-corners:rounded-xl flex flex-row gap-1 items-center text-xs;
892892
}
893893

894894
.openapi-disclosure-trigger-label span {
@@ -951,7 +951,7 @@ body:has(.openapi-select-popover) {
951951
}
952952

953953
.openapi-tooltip {
954-
@apply flex items-center gap-1 bg-tint-base border border-tint-subtle text-tint-strong rounded-md straight-corners:rounded-none circular-corners:rounded-lg font-medium px-1.5 py-0.5 shadow-sm text-[13px];
954+
@apply flex items-center gap-1 bg-tint-base border border-tint-subtle text-tint-strong rounded-corners:rounded-md circular-corners:rounded-xl straight-corners:rounded-none font-medium px-1.5 py-0.5 shadow-sm text-[13px];
955955
}
956956

957957
.openapi-tooltip svg {
@@ -1015,7 +1015,7 @@ body:has(.openapi-select-popover) {
10151015
}
10161016

10171017
.openapi-path-copy-button {
1018-
@apply p-1 flex rounded-md straight-corners:rounded-none;
1018+
@apply p-1 flex rounded-lg straight-corners:rounded-none;
10191019
@apply hover:bg-tint dark:hover:bg-tint-hover;
10201020
}
10211021

@@ -1032,7 +1032,7 @@ body:has(.openapi-select-popover) {
10321032
}
10331033

10341034
.openapi-required-scopes {
1035-
@apply border text-base rounded-md straight-corners:rounded-none circular-corners:rounded-md font-medium mx-0;
1035+
@apply border text-base rounded-corners:rounded-md circular-corners:rounded-xl straight-corners:rounded-none font-medium mx-0;
10361036
}
10371037

10381038
.openapi-required-scopes .openapi-required-scopes-header {

0 commit comments

Comments
 (0)