<?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>245402</bug_id>
          
          <creation_ts>2022-09-19 16:38:02 -0700</creation_ts>
          <short_desc>fieldset with legend as flex item of form height inconsistency</short_desc>
          <delta_ts>2024-12-06 07:04:39 -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>Layout and Rendering</component>
          <version>Safari 15</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=220793</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>chrstntdd</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>john</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1899680</commentid>
    <comment_count>0</comment_count>
    <who name="">chrstntdd</who>
    <bug_when>2022-09-19 16:38:02 -0700</bug_when>
    <thetext>From the readme in the repro case for the bug:

&quot;There appears to be a rendering inconsistency in Safari on both desktop and iOS. I also encountered this issue in safari 15 as well on all platforms. At a high level there is some additional space that is being preserved on the &lt;fieldset&gt; element. Strangely, this behavior can be &quot;corrected&quot; on the fly by triggering a repaint on the whole viewport such as resizing the browser window on desktop or an orientation change on iOS.&quot;


Repo: https://github.com/chrstntdd/fieldset-flex-bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1900248</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-21 15:43:08 -0700</bug_when>
    <thetext>Can you try to use:

fieldset {
min-inline-size: min-content !important;
}

and confirm whether it works?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1900274</commentid>
    <comment_count>2</comment_count>
    <who name="">chrstntdd</who>
    <bug_when>2022-09-21 18:42:35 -0700</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #1)
&gt; Can you try to use:
&gt; 
&gt; fieldset {
&gt; min-inline-size: min-content !important;
&gt; }
&gt; 
&gt; and confirm whether it works?

I have added that declaration on the main branch of the repo and the bug is still present.

https://github.com/chrstntdd/fieldset-flex-bug/commit/cd794541472ccf9932bc4952b5ea406f6f56546e</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1900615</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-23 06:00:07 -0700</bug_when>
    <thetext>It might be duplicate of bug 220793 and this is not just limited to &quot;flex&quot; but &quot;grid&quot; layout as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1901335</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-09-26 16:38:17 -0700</bug_when>
    <thetext>&lt;rdar://problem/100433635&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1919319</commentid>
    <comment_count>5</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-12-14 14:45:12 -0800</bug_when>
    <thetext>@Reporter - Can you try now with Safari Technology Preview 160, it does have fixes for Legend respecting other than display types like flex etc.?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2079625</commentid>
    <comment_count>6</comment_count>
    <who name="">john</who>
    <bug_when>2024-12-06 05:54:56 -0800</bug_when>
    <thetext>I am able to reproduce this issue as well, you can see the behavior here:

https://play.tailwindcss.com/9px06uS1Cn

As the original poster says, the bug seems to disappear when clicking into the input element.

Grid does not seem to have this issue.

https://play.tailwindcss.com/3ZEZlXMENR</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2079639</commentid>
    <comment_count>7</comment_count>
    <who name="">john</who>
    <bug_when>2024-12-06 07:00:37 -0800</bug_when>
    <thetext>The other weird thing with this is that it doesn&apos;t happen when the legend doesn&apos;t render, so you can have flex and flex-direction: column on the form element and the fieldset renders fine until you add a legend, after which it adds the padding as seen above in my comment.

https://play.tailwindcss.com/vHxn6CJIHD</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2079640</commentid>
    <comment_count>8</comment_count>
    <who name="">john</who>
    <bug_when>2024-12-06 07:04:39 -0800</bug_when>
    <thetext>(In reply to john from comment #6)
&gt; I am able to reproduce this issue as well, you can see the behavior here:
&gt; 
&gt; https://play.tailwindcss.com/9px06uS1Cn
&gt; 
&gt; As the original poster says, the bug seems to disappear when clicking into
&gt; the input element.
&gt; 
&gt; Grid does not seem to have this issue.
&gt; 
&gt; https://play.tailwindcss.com/3ZEZlXMENR

This is one MacOS 15.1.1 and Safari Version 18.1.1 (20619.2.8.11.12)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>