Skip to content

Commit 01d6bff

Browse files
Merge pull request #163 from Web-Dev-Path/fix/blog-tags
Fix Card container tag list on blog page overflow when there are 3 or more tags
2 parents c6e354c + ca64546 commit 01d6bff

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
9393
- removed unused function in api/register.js
9494
- adjusted contact form message on mobile
9595
- blog container and title styling
96+
- blog card container tags overflowing

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)