Skip to content

Commit 38a8055

Browse files
Fix function/structure data overflow
1 parent 172a6bf commit 38a8055

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/components/syntaxes/cards/DocumentationCard.astro

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,18 @@ const isNew = documentation.since && documentation.since.join().includes(current
193193
</style>
194194

195195
<style is:global>
196-
.right > * {
196+
.right > :not(.show-all) {
197197
max-height: 10lh;
198198
}
199199
@supports (-webkit-app-region: inherit) { /* chromium only */
200200
/* TODO figure out how to support this on all browsers... */
201201
.right > * {
202202
flex: 1 1 10lh;
203203
min-height: 0;
204-
max-height: max-content;
204+
max-height: max-content !important;
205+
}
206+
.right > .show-all {
207+
min-height: max-content;
205208
}
206209
}
207210
</style>

src/components/syntaxes/cards/FunctionCard.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const { defaultProps, func }: Props = Astro.props;
2424
</Fragment>
2525
<Fragment slot="right-column">
2626
{func.parameters && (
27-
<div class="code-card">
27+
<div class="code-card show-all">
2828
<span class="title">Function Parameters</span>
2929
{Object.values(func.parameters).map(parameter => {
3030
let description = changeSingular(parameter.type.name, parameter.plural);

src/components/syntaxes/cards/StructureCard.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const { defaultProps, structure }: Props = Astro.props;
1515
<SyntaxCard defaultProps={defaultProps} syntax={structure}>
1616
<Fragment slot="right-column">
1717
{structure.entries && (
18-
<div class="code-card">
18+
<div class="code-card show-all">
1919
<span class="title">Structure Entries</span>
2020
{Object.values(structure.entries).map(entry => {
2121
let description = entry.optional ? "optional" : "required";

0 commit comments

Comments
 (0)