Prevent image caption shifting

Before the image tag modified by JS, the caption will shift
This commit is contained in:
Cotes Chung 2021-07-02 19:13:47 +08:00
parent fd97067ec3
commit 65dbea9d3b
1 changed files with 14 additions and 8 deletions

View File

@ -364,6 +364,17 @@ footer {
overflow-wrap: break-word;
word-wrap: break-word;
@mixin caption {
+ em {
display: block;
text-align: center;
font-style: normal;
font-size: 80%;
padding: 0;
color: #6d6c6c;
}
}
img[data-src] {
margin: 0.5rem 0;
@ -381,6 +392,8 @@ footer {
filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.08));
}
@include caption;
}
a {
@ -405,14 +418,7 @@ footer {
}
&.img-link {
+ em {
display: block;
text-align: center;
font-style: normal;
font-size: 80%;
padding: 0;
color: #6d6c6c;
}
@include caption;
}
} // a