Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions assets/sass/_theme/blocks/features.sass
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,33 @@
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
figure
width: columns(2)
flex-shrink: 0
margin-right: var(--grid-gutter)
&.media--icon
picture.is-png
img
margin: auto

Expand Down
5 changes: 2 additions & 3 deletions layouts/partials/blocks/templates/features.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
{{- $block_class := partial "GetBlockClass" .block -}}

{{- with .block.data -}}
{{ $features := .elements }}
{{ $options := .options }}
{{- $features := .elements }}
<div class="{{ $block_class }}">
<div class="container">
<div class="block-content">
Expand All @@ -30,7 +29,7 @@
</div>
{{ end }}
{{- if .image -}}
<figure class="media {{- if $options.icons }} media--icon {{- end -}}" {{- with or .alt .credit }} role="figure" aria-label="{{ . | plainify }}" {{ end }}>
<figure {{- with or .alt .credit }} role="figure" aria-label="{{ . | plainify }}" {{ end }}>
{{- partial "commons/image.html"
(dict
"image" .image
Expand Down