Skip to content
Open
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: 13 additions & 10 deletions assets/sass/_theme/blocks/features.sass
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,36 @@
figure
order: -1
margin-bottom: $spacing-3
picture
img
margin: auto
picture:not(.is-png, .is-svg)
img
object-fit: cover
width: 100%
aspect-ratio: 16/9
img
margin: auto
figcaption
@include meta
margin-top: $spacing-2
text-align: right
picture.is-png

&:where(:not(.media--icon))
img
aspect-ratio: 16/9
object-fit: cover
width: 100%

&.media--icon
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)
picture.is-png
&.media--icon
img
margin: auto

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

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