<?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>172718</bug_id>
          
          <creation_ts>2017-05-30 08:24:34 -0700</creation_ts>
          <short_desc>legend should only create a block formatting context if it is the &quot;rendered legend&quot;</short_desc>
          <delta_ts>2026-09-08 20:28:30 -0700</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 Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=323711</see_also>
          <bug_file_loc>https://wpt.fyi/results/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend.html?label=master&amp;label=experimental&amp;aligned&amp;view=subtest&amp;q=legend.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>FromImplementor, WPTImpact</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Pieters (:zcorpan)">zcorpan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1313722</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters (:zcorpan)">zcorpan</who>
    <bug_when>2017-05-30 08:24:34 -0700</bug_when>
    <thetext>&lt;legend&gt; in WebKit avoids floats but otherwise does not create a block formatting context (like in Chromium). This is weird, and not a behavior supported by CSS, and is not interoperable with Gecko or EdgeHTML. The proposal is to make only the &quot;rendered legend&quot; (https://html.spec.whatwg.org/#rendered-legend ) create an actual block formatting context, to make &lt;legend&gt; in general have less magic.

This issue in Chromium:
https://bugs.chromium.org/p/chromium/issues/detail?id=727378

Discussion:
https://github.com/whatwg/html/issues/2519

Proposed spec change:
https://github.com/whatwg/html/pull/2718

In-progress CL for Chromium:
https://chromium-review.googlesource.com/c/512824/

web-platform-tests: none yet

Please raise any concerns in https://github.com/whatwg/html/issues/2519</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1912564</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-11-15 04:24:26 -0800</bug_when>
    <thetext>Fixed in - https://chromium-review.googlesource.com/c/chromium/src/+/535595</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1935843</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-02-22 08:43:44 -0800</bug_when>
    <thetext>* Subtests:

in-body: width
in-fieldset-second-child: width	
in-fieldset-descendant: width</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>