Avoid image caption shifting on load

This commit is contained in:
Cotes Chung 2022-01-13 01:07:47 +08:00
parent f8f4dd889e
commit a6c73e8f4f
2 changed files with 15 additions and 7 deletions

View file

@ -192,6 +192,8 @@ img[data-src] {
&.shadow { &.shadow {
filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.08)); filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.08));
} }
@extend %img-caption;
} }
/* --- Panels --- */ /* --- Panels --- */
@ -439,13 +441,8 @@ img[data-src] {
} }
} }
&.img-link + em { &.img-link {
display: block; @extend %img-caption;
text-align: center;
font-style: normal;
font-size: 80%;
padding: 0;
color: #6d6c6c;
} }
} }

View file

@ -93,6 +93,17 @@
font-style: normal; font-style: normal;
} }
%img-caption {
+ em {
display: block;
text-align: center;
font-style: normal;
font-size: 80%;
padding: 0;
color: #6d6c6c;
}
}
/* ---------- scss mixin --------- */ /* ---------- scss mixin --------- */
@mixin no-text-decoration { @mixin no-text-decoration {