diff --git a/assets/sass/_theme/blocks/features.sass b/assets/sass/_theme/blocks/features.sass index f7aa6af29..2470b9d0b 100644 --- a/assets/sass/_theme/blocks/features.sass +++ b/assets/sass/_theme/blocks/features.sass @@ -11,28 +11,25 @@ figure order: -1 margin-bottom: $spacing-3 - img - margin: auto + picture + img + margin: auto + picture:not(.is-png, .is-svg) + img + object-fit: cover + width: 100% + aspect-ratio: 16/9 figcaption @include meta margin-top: $spacing-2 text-align: right - - &:where(:not(.media--icon)) - img - aspect-ratio: 16/9 - object-fit: cover - width: 100% - - &.media--icon + picture.is-png padding-top: $spacing-3 img margin: initial max-width: $block-features-icon-max-width - @include media-breakpoint-down(desktop) margin-bottom: $spacing-2 - @include in-page-with-sidebar li flex-direction: row @@ -40,7 +37,7 @@ width: columns(2) flex-shrink: 0 margin-right: var(--grid-gutter) - &.media--icon + picture.is-png img margin: auto diff --git a/layouts/partials/blocks/templates/features.html b/layouts/partials/blocks/templates/features.html index a8f7abcbc..e70d5bb43 100644 --- a/layouts/partials/blocks/templates/features.html +++ b/layouts/partials/blocks/templates/features.html @@ -2,8 +2,7 @@ {{- $block_class := partial "GetBlockClass" .block -}} {{- with .block.data -}} - {{ $features := .elements }} - {{ $options := .options }} + {{- $features := .elements }}
@@ -30,7 +29,7 @@
{{ end }} {{- if .image -}} -
+
{{- partial "commons/image.html" (dict "image" .image