Skip to content

Commit aeb08e2

Browse files
committed
ui: fix blog card title truncation and spacing
Signed-off-by: Ansh Sharma <anshsharma161105@gmail.com>
1 parent 0a52db8 commit aeb08e2

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/components/Card/Card.style.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ export const CardWrapper = styled.div`
7575
7676
.post-content-block {
7777
padding: 1rem 2rem;
78-
height: 8rem;
78+
padding-bottom: 1.5rem;
79+
height: auto;
80+
min-height: 9rem;
81+
display: flex;
82+
flex-direction: column;
83+
justify-content: space-between;
7984
}
8085
8186
@media screen and (max-width: 1200px) and (min-width: 992px) {
@@ -103,6 +108,11 @@ export const CardWrapper = styled.div`
103108
.post-title {
104109
font-size: 1.4rem;
105110
font-weight: 400;
111+
margin: 0 -1rem 0.5rem -1rem;
112+
padding: 0 1rem;
113+
display: -webkit-box;
114+
-webkit-line-clamp: 2;
115+
-webkit-box-orient: vertical;
106116
white-space: nowrap;
107117
overflow: hidden;
108118
text-overflow: ellipsis;
@@ -112,9 +122,14 @@ export const CardWrapper = styled.div`
112122
height: auto;
113123
display: flex;
114124
margin-bottom: 0.5rem;
125+
white-space: nowrap;
126+
overflow: hidden;
127+
text-overflow: ellipsis;
115128
116129
.author {
117130
text-align: end;
131+
overflow: hidden;
132+
text-overflow: ellipsis;
118133
}
119134
.author,
120135
p {
@@ -123,6 +138,9 @@ export const CardWrapper = styled.div`
123138
font-weight: 400;
124139
flex: auto;
125140
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
141+
white-space: nowrap;
142+
overflow: hidden;
143+
text-overflow: ellipsis;
126144
}
127145
.type {
128146
text-align: end;

0 commit comments

Comments
 (0)