Merge pull request #68 from robrobinbin/master

Absolutly no jumping when images (fail to) load
This commit is contained in:
Spike
2021-01-21 23:32:59 +00:00
committed by GitHub
6 changed files with 78 additions and 25 deletions

View File

@ -523,13 +523,20 @@ a.search_subreddit:hover {
.post_media {
max-width: calc(100% - 40px);
height: auto;
align-self: center;
margin-top: 15px;
margin: 5px auto;
height: auto;
grid-area: post_media;
background-color: var(--highlighted);
display: table;
background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 100 100' width='100' height='100' xmlns='http://www.w3.org/2000/svg'><path d='M15,20 h70 a10,10 0 0 1 10,10 v45 a10,10 0 0 1 -10,10 h-70 a10,10 0 0 1 -10,-10 v-45 a10,10 0 0 1 10,-10 z' fill='none' stroke='rgba(128,128,128,0.5)' stroke-width='3' /><path d='M15,75 l25,-35 l15,20 l10,-10 l20, 25 z' stroke='none' fill='rgba(128,128,128,0.5)' /><circle cx='75' cy='35' r='7' stroke='none' fill='rgba(128,128,128,0.5)'/></svg>");
background-position: 50%;
background-repeat: no-repeat;
}
.post_media.short {
max-height: 512px;
width: auto;
}
#post_url {
@ -579,7 +586,7 @@ a.search_subreddit:hover {
margin: 5px;
}
.post_thumbnail img {
.post_thumbnail svg {
grid-area: 1 / 1 / 2 / 2;
width: 100%;
height: auto;
@ -592,7 +599,7 @@ a.search_subreddit:hover {
background-color: var(--highlighted);
}
.post_thumbnail svg {
.post_thumbnail.no_thumbnail svg {
grid-area: 1 / 1 / 2 / 2;
align-self: center;
justify-self: center;