Skip to content

Commit cc88490

Browse files
committed
style(article): change cover image aspect ratio to 16:9 for cards and detail page
1 parent 5039497 commit cc88490

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

vue/src/assets/blog.css

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,15 @@ body {
195195

196196
.article-cover {
197197
background: var(--placeholder-tint);
198-
height: 130px;
198+
aspect-ratio: 16 / 9;
199199
width: 100%;
200+
overflow: hidden;
201+
border-radius: 8px;
200202
}
201203

202204
@media (min-width: 561px) {
203205
.article-cover {
204-
height: 100%;
206+
aspect-ratio: 16 / 9;
205207
}
206208
}
207209

@@ -1464,14 +1466,14 @@ body {
14641466
border-radius: 10px;
14651467
overflow: hidden;
14661468
background: var(--placeholder-tint);
1469+
aspect-ratio: 16 / 9;
14671470
}
14681471

14691472
.article-reader-cover img {
14701473
width: 100%;
1474+
height: 100%;
14711475
display: block;
1472-
vertical-align: middle;
14731476
object-fit: cover;
1474-
max-height: min(52vh, 440px);
14751477
}
14761478

14771479
.article-markdown--body {

0 commit comments

Comments
 (0)