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