Skip to content

Commit a170c6e

Browse files
authored
Fix width issues with Redocly + incorrect render of footer on redoc pages (#326)
* Redocly: Fix width issues * Redoc: Fix auto scroll issue
1 parent 727cf3f commit a170c6e

File tree

5 files changed

+10923
-16
lines changed

5 files changed

+10923
-16
lines changed

assets/css/v2/style.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,17 @@ h6,
320320
}
321321

322322
html {
323-
scroll-behavior: smooth;
323+
scroll-behavior: smooth; /* Breaks for redocly */
324324
font-optical-sizing: auto;
325325
font-weight: 300;
326326
font-style: normal;
327327
}
328328

329+
html:has(api-container) {
330+
/* Fixes scroll for redocly but loses smooth scroll */
331+
scroll-behavior: auto;
332+
}
333+
329334
h1,
330335
h2,
331336
h3,
@@ -919,8 +924,8 @@ nav {
919924

920925
/* Allow redocly to fill the entire container */
921926
&.content__redocly {
922-
justify-self: unset;
923-
max-width: 100%;
927+
min-width: 100%;
928+
margin: 0;
924929

925930
#api-component {
926931
z-index: 0;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
description: Live example of Redocly usage
3+
title: Live example
4+
weight: 200
5+
type: redoc
6+
tags:
7+
- api
8+
doctypes:
9+
- reference
10+
---
11+
{{< openapi spec="./api/one.json" >}}

0 commit comments

Comments
 (0)