summaryrefslogtreecommitdiff
path: root/searx/static/themes/simple/src
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2021-12-01 18:05:25 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2021-12-15 10:39:55 +0100
commitc4164649496d3b1b3ffa8b6b01b750903a0edffd (patch)
tree7bdabef8bd9ceec00a92026104af88b1c985a702 /searx/static/themes/simple/src
parentda1f970eb50e9a48a25e9cb240585f8d81a5459a (diff)
downloadsearxng-c4164649496d3b1b3ffa8b6b01b750903a0edffd.tar.gz
searxng-c4164649496d3b1b3ffa8b6b01b750903a0edffd.zip
[fix] lazy loading of <img> tags
Images should include dimension attributes. Without `width` and `height` specified, image dimensions are 0×0 pixels at first. ... In this case the browser determines that all of them are visible to the user and decides to load everything [1]. In CSS the `width` is set to a value and the `height` is unsed to scale the image proportional in both dimensions. [1] https://web.dev/browser-level-image-lazy-loading/#images-should-include-dimension-attributes [2] https://caniuse.com/loading-lazy-attr Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/static/themes/simple/src')
-rw-r--r--searx/static/themes/simple/src/less/style.less1
1 files changed, 1 insertions, 0 deletions
diff --git a/searx/static/themes/simple/src/less/style.less b/searx/static/themes/simple/src/less/style.less
index 5e015579c..bb983838b 100644
--- a/searx/static/themes/simple/src/less/style.less
+++ b/searx/static/themes/simple/src/less/style.less
@@ -267,6 +267,7 @@ article[data-vim-selected].category-social {
float: left;
padding: 0.6rem 1rem 0 0;
width: 20rem;
+ height: unset; // remove heigth value that was needed for lazy loading
}
&.image {