Skip to content

Commit 5150e78

Browse files
committed
fix blog card tag list overflow
1 parent c6e354c commit 5150e78

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

components/containers/Card.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default function Card({
3131
</h2>
3232
{tagList && tagList.length > 0 ? (
3333
<div className={styles.tagListContainer}>
34-
{tagList.map((tag, i) => (
34+
{tagList.slice(0, 8).map((tag, i) => (
3535
<Tag key={i} text={tag} />
3636
))}
3737
</div>

styles/Card.module.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@
131131

132132
.tagListContainer {
133133
display: flex;
134+
flex-wrap: wrap;
135+
max-height: 12rem;
136+
overflow: hidden;
134137
gap: 0.5rem;
135138
margin-bottom: -1rem;
136139
}

0 commit comments

Comments
 (0)