use height instead of max-height to control img size on parent div

this change happens on both image-size-control and figure-img-size
This commit is contained in:
Reorx 2022-08-11 01:18:18 +08:00
parent 61452c190b
commit d88771adee
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
<figure class="center align-center">
<div class="image-size-control" style="
{{- with $width }}max-width: {{ . }};{{ end -}}
{{- with $height }}max-height: {{ . }};{{ end -}}
{{- with $height }}height: {{ . }};{{ end -}}
">
{{ .Page.RenderString .Inner }}
</div>

View File

@ -1,6 +1,6 @@
<div class="image-size-control" style="
{{- with (.Get "width") }}max-width: {{ . }};{{ end -}}
{{- with (.Get "height") }}max-height: {{ . }};{{ end -}}
{{- with (.Get "height") }}height: {{ . }};{{ end -}}
">
{{ .Page.RenderString .Inner }}
</div>