From 6bee338b96490fcca4ec6e081feda20f0e077c55 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Sat, 25 Nov 2023 23:07:13 +0100 Subject: [PATCH] Only add vertical rythm to image class, not to img element. --- assets/sass/base/images/_images.scss | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/assets/sass/base/images/_images.scss b/assets/sass/base/images/_images.scss index 52d67c1..bb7c570 100644 --- a/assets/sass/base/images/_images.scss +++ b/assets/sass/base/images/_images.scss @@ -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); + } +}