Skip to content

Commit 664df8a

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

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
@@ -102,19 +102,22 @@ export const CardWrapper = styled.div`
102102
}
103103
104104
.post-content-block {
105-
height: 10rem;
105+
height: auto;
106+
min-height: 10rem;
106107
}
107108
}
108109
109110
@media screen and (max-width: 670px) and (min-width: 560px) {
110111
.post-content-block {
111-
height: 10rem;
112+
height: auto;
113+
min-height: 10rem;
112114
}
113115
}
114116
115117
@media screen and (max-width: 350px) {
116118
.post-content-block {
117-
height: 10rem;
119+
height: auto;
120+
min-height: 10rem;
118121
}
119122
}
120123
@@ -123,10 +126,10 @@ export const CardWrapper = styled.div`
123126
font-weight: 400;
124127
margin: 0 -1rem 0.5rem -1rem;
125128
padding: 0 1rem;
129+
white-space: normal !important;
126130
display: -webkit-box;
127131
-webkit-line-clamp: 2;
128132
-webkit-box-orient: vertical;
129-
white-space: nowrap;
130133
overflow: hidden;
131134
text-overflow: ellipsis;
132135
}

0 commit comments

Comments
 (0)