fixed images display on smaller screens master
authordanix <danix@danix.xyz>
Fri, 17 Mar 2023 14:32:24 +0000 (15:32 +0100)
committerdanix <danix@danix.xyz>
Fri, 17 Mar 2023 14:32:24 +0000 (15:32 +0100)
assets/sass/components/_image.scss
layouts/shortcodes/img.html

index 67f156c..ed82f28 100644 (file)
 \r
                        img {\r
                                width: 100%;\r
+                               height: auto;\r
                        }\r
                        div.picture {\r
+                               width: 100%;\r
                                max-width: 100%;\r
-                               height: auto;\r
                        }\r
                }\r
 \r
 \r
                        img {\r
                                width: 100%;\r
+                               height: auto;\r
                                max-width: 100%;\r
                        }\r
                        div.picture {\r
+                               width: 100%;\r
                                max-width: 100%;\r
-                               height: auto;\r
                        }\r
 \r
                        @include breakpoint('<=small') {\r
index f5f29ca..9f537cf 100644 (file)
@@ -27,7 +27,7 @@
     $CFPstyle is for use in styling
     the div's background, as you'll see shortly.
 */}}
-{{- $CFPstyle := printf "%s%s%s%v%s%v%s" "background: url(data:image/jpeg;base64," $LQIP_b64 "); background-size: cover; background-repeat: no-repeat; width: " $source.Width "px; height: " $source.Height "px;" -}}
+{{- $CFPstyle := printf "%s%s%s%v%s" "background: url(data:image/jpeg;base64," $LQIP_b64 "); background-size: cover; background-repeat: no-repeat; width: " $source.Width "px;" -}}
 {{/*
     Then, we create a 640-pixel-wide JPG
     of the image. This will serve as the