<figcaptionclass="figure-caption {{ with $gap }} mt-{{ . }} {{ end }} text-{{ $horizontal }}"{{if$table}}style="caption-side: bottom; display: table-caption"{{end}}>{{ $caption }}</figcaption>
{{ end }}
{{ if $table }}
</div>
{{ end }}
{{ if and (not $float) $style }}
</div>
{{ end }}
<figureclass="{{ if $widthish }} d-flex {{ end }} {{ with $float }} float-{{ . }} {{ end }} {{ if $widthish }} justify-content-{{ $horizontal }} {{ end }} {{ if $compact }} mb-0 {{ end }} {{ if $float }} {{ $sidemargin }} {{ end }} paige-figure {{ if $numbered }} paige-figure-numbered {{ end }}">
<div{{ifor$heightish$widthish}}class="{{ if $height }} d-flex flex-column justify-content-{{ $vertical }} {{ end }} overflow-auto"{{end}}{{if$style}}style="{{ $style | safeCSS }}"{{end}}>