From 0908d7e7089bf4e6dd721362a3e55af3fbff1a01 Mon Sep 17 00:00:00 2001 From: Simon Pieters Date: Mon, 8 Aug 2022 15:46:43 +0200 Subject: [PATCH] Replace the 0px rendered width check with a computed value check for 'width' and 'min-width' --- source | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/source b/source index 9e88494153c..8e222001595 100644 --- a/source +++ b/source @@ -29016,8 +29016,9 @@ was an English <a href="/wiki/Music_hall">music hall</a> singer, ...The keyword auto means the rendered width of the img element that initiated the image loading (with the update the image data or react to environment changes - algorithms), if any, in CSS pixels, if that is not 0px, and that img element is being rendered, and the + algorithms), if any, in CSS pixels, if that img element is + being rendered, and the element's computed value of the + 'width' and 'min-width' properties are not both 'auto', and the img element's loading attribute is in the Lazy state; otherwise, 100vw.

@@ -29039,6 +29040,11 @@ was an English <a href="/wiki/Music_hall">music hall</a> singer, ...Lazy state.

+

In addition, it is strongly encouraged to specify dimensions using the width and height attributes + or with CSS. Without specified dimensions, the auto + keyword is equivalent to 100vw.

+

The <source-size-value> gives the intended layout width of the image. The author can specify different widths for different environments with <media-condition>s.

@@ -30343,8 +30349,9 @@ was an English <a href="/wiki/Music_hall">music hall</a> singer, ...

If img is null, or img's loading attribute is not in the Lazy state, or img is not being - rendered, or img's rendered width in CSS pixels is - 0px, then return 100vw.

+ rendered, or img's computed value of the 'width' and + 'min-width' properties are both 'auto', then return 100vw.

  • Return the rendered width of img, in CSS pixels.