Only add vertical rythm to image class, not to img element.

This commit is contained in:
Fredrik Jonsson 2023-11-25 23:07:13 +01:00
commit 6bee338b96

View file

@ -2,9 +2,6 @@
figure, figure,
img { img {
// Add vertical rhythm margins.
@include margin-block(0 1);
&.image { &.image {
--image-padding: .75rem; --image-padding: .75rem;
@ -33,13 +30,8 @@ img {
} }
figure { figure {
// Remove defult inline margins. // Add vertical rhythm margins.
@include margin-inline(0); @include margin-block(0 1);
// Remove margin from img inside figure.
img {
margin: 0;
}
&.image { &.image {
figcaption { figcaption {
@ -81,3 +73,10 @@ figure {
} }
} }
} }
img {
&.image {
// Add vertical rhythm margins.
@include margin-block(0 1);
}
}