Skip to content

Commit

Permalink
Only add vertical rythm to image class, not to img element.
Browse files Browse the repository at this point in the history
  • Loading branch information
frjo committed Nov 25, 2023
1 parent d95bf6d commit 6bee338
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions assets/sass/base/images/_images.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

figure,
img {
// Add vertical rhythm margins.
@include margin-block(0 1);

&.image {
--image-padding: .75rem;

Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -81,3 +73,10 @@ figure {
}
}
}

img {
&.image {
// Add vertical rhythm margins.
@include margin-block(0 1);
}
}

0 comments on commit 6bee338

Please sign in to comment.