Skip to content

Commit d5379d9

Browse files
committed
refactor: optimize article list style
1 parent a64b03f commit d5379d9

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

client/src/components/ArticleList/index.module.scss

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@
110110
color: var(--main-text-color);
111111
text-overflow: ellipsis;
112112
font-synthesis: style;
113+
114+
display: -webkit-box;
115+
-webkit-box-orient: vertical;
116+
-webkit-line-clamp: 2;
117+
overflow: hidden;
118+
text-overflow: ellipsis;
119+
line-height: 1.2em;
120+
max-height: 2.4em;
113121
}
114122

115123
.time,
@@ -155,14 +163,17 @@
155163
justify-content: space-between;
156164

157165
.desc {
158-
display: flex;
159-
max-width: 100%;
166+
display: -webkit-box;
167+
-webkit-box-orient: vertical;
168+
-webkit-line-clamp: 2;
160169
overflow: hidden;
161170
font-size: 14px;
162171
color: var(--second-text-color);
163172
text-overflow: ellipsis;
164-
-webkit-line-clamp: 3;
165-
-webkit-box-orient: vertical;
173+
line-height: 1.2em;
174+
max-height: 2.4em;
175+
max-width: 100%;
176+
width: calc(100% - 24px);
166177
}
167178

168179
.meta {
@@ -212,16 +223,6 @@
212223
flex-direction: column;
213224
align-items: flex-start;
214225

215-
.title {
216-
display: -webkit-box;
217-
-webkit-box-orient: vertical;
218-
-webkit-line-clamp: 2;
219-
overflow: hidden;
220-
text-overflow: ellipsis;
221-
line-height: 1.2em;
222-
max-height: 2.4em;
223-
}
224-
225226
.info {
226227
font-size: 0.8em;
227228

0 commit comments

Comments
 (0)