summaryrefslogtreecommitdiff
path: root/layouts/shortcodes
diff options
context:
space:
mode:
authorReorx <novoreorx@gmail.com>2022-08-11 01:18:18 +0800
committerReorx <novoreorx@gmail.com>2022-08-11 01:18:18 +0800
commitd88771adeee6a1d8d30b27cd5d2e4d0c3810cbf9 (patch)
treed12fb1e1bc2ab4c5365673beb17d4f0b9af2dc89 /layouts/shortcodes
parent61452c190b57ed2c1246723e7fd1575ac4bf5a23 (diff)
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
Diffstat (limited to 'layouts/shortcodes')
-rw-r--r--layouts/shortcodes/figure-img-size.html2
-rw-r--r--layouts/shortcodes/image-size-control.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/layouts/shortcodes/figure-img-size.html b/layouts/shortcodes/figure-img-size.html
index 62c9f20..b20f17f 100644
--- a/layouts/shortcodes/figure-img-size.html
+++ b/layouts/shortcodes/figure-img-size.html
@@ -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>
diff --git a/layouts/shortcodes/image-size-control.html b/layouts/shortcodes/image-size-control.html
index 1bf374d..679aae7 100644
--- a/layouts/shortcodes/image-size-control.html
+++ b/layouts/shortcodes/image-size-control.html
@@ -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>