Skip to content

Commit 43855e1

Browse files
committed
ui: implement truncation logic and improve blog card spacing
Signed-off-by: Ansh Sharma <anshsharma161105@gmail.com>
1 parent aeb08e2 commit 43855e1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/components/Card/Card.style.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,22 @@ export const CardWrapper = styled.div`
8989
}
9090
9191
.post-content-block {
92-
height: 10rem;
92+
height: auto;
93+
min-height: 10rem;
9394
}
9495
}
9596
9697
@media screen and (max-width: 670px) and (min-width: 560px) {
9798
.post-content-block {
98-
height: 10rem;
99+
height: auto;
100+
min-height: 10rem;
99101
}
100102
}
101103
102104
@media screen and (max-width: 350px) {
103105
.post-content-block {
104-
height: 10rem;
106+
height: auto;
107+
min-height: 10rem;
105108
}
106109
}
107110
@@ -110,10 +113,10 @@ export const CardWrapper = styled.div`
110113
font-weight: 400;
111114
margin: 0 -1rem 0.5rem -1rem;
112115
padding: 0 1rem;
116+
white-space: normal !important;
113117
display: -webkit-box;
114118
-webkit-line-clamp: 2;
115119
-webkit-box-orient: vertical;
116-
white-space: nowrap;
117120
overflow: hidden;
118121
text-overflow: ellipsis;
119122
}

0 commit comments

Comments
 (0)