Skip to content

Commit 525f040

Browse files
Allow left column of syntax cards to take full width when there is no right column
1 parent ecdab59 commit 525f040

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/components/syntaxes/SyntaxBadge.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ const { badgeProps, entries, wrap, description }: Props = Astro.props;
4545
}
4646
p[data-wrap="true"] {
4747
display: grid;
48-
grid-template-columns: 1fr 3fr;
48+
grid-template-columns: 8rem auto;
4949
}
5050
</style>

src/components/syntaxes/cards/DocumentationCard.astro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ const isNew = documentation.since && documentation.since.join().includes(current
123123
grid-column: 2;
124124
grid-row: 1 / 3;
125125
}
126+
.documentation-card:not(:has(> .right > *)) { /* when right column is empty, display left as one */
127+
grid-template-columns: 1fr;
128+
}
126129
.bottom {
127130
grid-column: 1;
128131
grid-row: 2;

0 commit comments

Comments
 (0)