Skip to content

Commit 8293204

Browse files
committed
style: stretch homepage example panel
1 parent a8808c5 commit 8293204

2 files changed

Lines changed: 24 additions & 4 deletions

File tree

website-docusaurus/src/pages/index.module.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@
137137
display: flex;
138138
flex-direction: column;
139139
gap: 0.5rem;
140+
min-height: 0;
140141
padding: 0.7rem;
141142
background: var(--home-panel-soft);
142143
}
@@ -177,7 +178,11 @@
177178
}
178179

179180
.examplePanel {
181+
display: flex;
182+
flex-direction: column;
180183
min-width: 0;
184+
min-height: 0;
185+
overflow: hidden;
181186
background: var(--home-terminal);
182187
}
183188

@@ -213,8 +218,8 @@
213218
}
214219

215220
.examplePanel pre {
216-
min-height: 268px;
217-
max-height: min(52vh, 420px);
221+
flex: 1 1 auto;
222+
min-height: 0;
218223
margin: 0;
219224
padding: clamp(1rem, 2vw, 1.35rem);
220225
overflow: auto;

website/src/pages/index.astro

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ const examples = [
524524
display: flex;
525525
flex-direction: column;
526526
gap: 8px;
527+
min-height: 0;
527528
padding: 12px;
528529
background: rgba(248, 250, 252, 0.9);
529530
}
@@ -562,10 +563,24 @@ const examples = [
562563
}
563564

564565
.example-panels {
566+
display: flex;
565567
min-width: 0;
568+
min-height: 0;
569+
overflow: hidden;
566570
background: #111827;
567571
}
568572

573+
.example-panel:not([hidden]) {
574+
display: flex;
575+
width: 100%;
576+
min-height: 0;
577+
flex-direction: column;
578+
}
579+
580+
.example-panel[hidden] {
581+
display: none;
582+
}
583+
569584
.example-panel-bar {
570585
display: flex;
571586
align-items: center;
@@ -598,8 +613,8 @@ const examples = [
598613
}
599614

600615
.example-panel pre {
601-
min-height: 268px;
602-
max-height: min(52vh, 420px);
616+
flex: 1 1 auto;
617+
min-height: 0;
603618
margin: 0;
604619
padding: clamp(18px, 2.4vw, 28px);
605620
overflow: auto;

0 commit comments

Comments
 (0)