Skip to content

Commit ae6e40f

Browse files
committed
Redoc: Fix auto scroll issue
1 parent 9e4b1b9 commit ae6e40f

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

assets/css/v2/style.css

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,7 @@ textarea:not([rows]) {
132132
:root {
133133
/* webfonts */
134134
font-family: var(--font-family);
135-
font-feature-settings:
136-
"liga" on,
137-
"calt" on;
135+
font-feature-settings: "liga" on, "calt" on;
138136

139137
/* fallback to slightly thinner font on browsers without variable 'wght' support */
140138
font-weight: 350;
@@ -144,9 +142,9 @@ textarea:not([rows]) {
144142

145143
/* MARK: Variables
146144
*/
147-
--font-family:
148-
"Inter var", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
149-
Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
145+
--font-family: "Inter var", system-ui, -apple-system, BlinkMacSystemFont,
146+
"Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
147+
sans-serif;
150148
--color-brand: 56.6% 0.194 147.7;
151149
--color-brand-300: 0.84 0.0699 157.51;
152150
--color-brand-200: 0.91 0.0406 157.72;
@@ -292,10 +290,9 @@ textarea:not([rows]) {
292290

293291
@supports (font-variation-settings: normal) {
294292
:root {
295-
--font-family:
296-
InterVariable, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
297-
Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
298-
sans-serif;
293+
--font-family: InterVariable, system-ui, -apple-system, BlinkMacSystemFont,
294+
"Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
295+
"Helvetica Neue", sans-serif;
299296
}
300297

301298
h1,
@@ -320,12 +317,17 @@ h6,
320317
}
321318

322319
html {
323-
scroll-behavior: smooth;
320+
scroll-behavior: smooth; /* Breaks for redocly */
324321
font-optical-sizing: auto;
325322
font-weight: 300;
326323
font-style: normal;
327324
}
328325

326+
html:has(api-container) {
327+
/* Fixes scroll for redocly but loses smooth scroll */
328+
scroll-behavior: auto;
329+
}
330+
329331
h1,
330332
h2,
331333
h3,
@@ -1252,9 +1254,7 @@ nav.sidebar.sidebar__mobile-open {
12521254
border-radius: 5px 0 0 5px;
12531255
color: oklch(0 0 0 / 0.75);
12541256
text-decoration: none;
1255-
transition:
1256-
background-color 0.2s ease,
1257-
color 0.2s ease;
1257+
transition: background-color 0.2s ease, color 0.2s ease;
12581258

12591259
&:hover {
12601260
background-color: oklch(var(--color-brand) / 0.08);

0 commit comments

Comments
 (0)