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

View file

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