<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>270046</bug_id>
          
          <creation_ts>2024-02-24 20:02:56 -0800</creation_ts>
          <short_desc>Add UA Stylesheet rules for `img` with `sizes=auto`</short_desc>
          <delta_ts>2024-02-25 07:57:53 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>253143</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>WPTImpact</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ahmad Saleem">ahmad.saleem792</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>annevk</cc>
    
    <cc>ntim</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2016670</commentid>
    <comment_count>0</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-02-24 20:02:56 -0800</bug_when>
    <thetext>Hi Team,

While going through HTML Spec, I noticed that we are missing following UA stylesheet rule:

https://html.spec.whatwg.org/#images-3

img:is([sizes=&quot;auto&quot; i], [sizes^=&quot;auto,&quot; i]) {
  contain: size !important;
  contain-intrinsic-size: 300px 150px;
}

___

It seems that we have WPT tests as well: https://wpt.fyi/results/html/rendering/replaced-elements/images/img-sizes-auto.html?label=master&amp;label=experimental&amp;aligned=

I think above will progress first two tests.

Although every browser is failing so it might be new standard or standard behind flag.

I can find this in our standard-position: https://github.com/WebKit/standards-positions/issues/9

but it seems to be for &apos;lazy loaded&apos; images.

Appreciate if someone can confirm if it is safe to add or we have to do something before.

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2016702</commentid>
    <comment_count>1</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2024-02-25 07:57:53 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 253143 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>