Skip to content

Commit a631cf3

Browse files
authored
Merge pull request #305 from 1chooo/feature/#303
feat(blog): limit blog post summary to two lines with ellipsis (#303)
2 parents 12db95f + 81633cd commit a631cf3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

apps/web/src/app/globals.css

+10
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,16 @@ main {
12631263
font-size: var(--fs-6);
12641264
font-weight: var(--fw-300);
12651265
line-height: 1.6;
1266+
display: -webkit-box;
1267+
display: box;
1268+
-webkit-line-clamp: 2;
1269+
-moz-line-clamp: 2;
1270+
line-clamp: 2;
1271+
-webkit-box-orient: vertical;
1272+
box-orient: vertical;
1273+
overflow: hidden;
1274+
text-overflow: ellipsis;
1275+
max-height: 3.2em; /* 2 lines * 1.6 line-height */
12661276
}
12671277

12681278
/*-----------------------------------*\

0 commit comments

Comments
 (0)