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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>24961</bug_id>
          
          <creation_ts>2014-03-06 19:10:22 +0000</creation_ts>
          <short_desc>Spec needs to make it clear that fieldsets are never narrower than kids</short_desc>
          <delta_ts>2014-04-15 02:53:36 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#the-fieldset-and-legend-elements</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>ian</cc>
    
    <cc>jackalmage</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>101999</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-03-06 19:10:22 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html
Multipage: http://www.whatwg.org/C#the-fieldset-and-legend-elements
Complete: http://www.whatwg.org/c#the-fieldset-and-legend-elements
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/

Comment:
Spec needs to make it clear that fieldsets are never narrower than kids

Posted from: 98.110.194.132 by bzbarsky@mit.edu
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:30.0) Gecko/20100101 Firefox/30.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102000</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-03-06 19:11:40 +0000</bug_when>
    <thetext>Simple testcase at http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2871 which every UA I can find renders with the fieldset wide enough for the div to fit.

This is kinda similar to what table-layout:auto table cells do, actually, but only in the horizontal direction.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102676</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-03-19 20:56:30 +0000</bug_when>
    <thetext>Is there some way to describe this in CSS?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102677</commentid>
    <comment_count>3</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2014-03-19 21:01:27 +0000</bug_when>
    <thetext>That is a super-weird behavior, and I didn&apos;t realize we all did that.

No, there&apos;s nothing in CSS that would do that.  A &quot;min-width: min-content !important;&quot; rule in the UA stylesheet would have the right effect, but would prevent authors from specifying their own &apos;min-width&apos;.  We&apos;d need something independent that accomplished the same thing.

Do we think that this is a necessary behavior, or just something weird and random that everyone inherited?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102680</commentid>
    <comment_count>4</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-03-19 22:10:30 +0000</bug_when>
    <thetext>&gt; No, there&apos;s nothing in CSS that would do that.

Short of &quot;display: table-cell&quot;, kinda.

&gt; Do we think that this is a necessary behavior

It&apos;s hard to tell.  This behavior in Gecko dates back to at least code added in https://bugzilla.mozilla.org/show_bug.cgi?id=23156 which was before my time (not often I get to say that!) and before people did sane things like decent commit comments and useful bug reports.  :(

Would be interesting to see whether other engines have a better idea of why the behavior is there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102684</commentid>
    <comment_count>5</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2014-03-19 23:40:46 +0000</bug_when>
    <thetext>Wait, I was thinking wrong.  If we okay with sanifying this sufficiently, so that an author setting &apos;min-width&apos; explicitly will change this behavior, then what I posed would do fine, just without the !important.

That is, just put a &quot;min-width: min-content;&quot; rule in the UA stylesheet.  Unless overridden (which is likely rare), that&apos;ll ensure that fieldsets never have less width than their widest child.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103843</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-04-14 23:21:47 +0000</bug_when>
    <thetext>Do &quot;reset.css&quot;-style style sheets reset that? Do pages that use &quot;reset.css&quot;-style sheets depend on it not being reset?

I&apos;ve added what Tab suggested. Let me know if it&apos;s not compatible enough.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103844</commentid>
    <comment_count>7</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-04-14 23:22:01 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8576.
Check-in comment: Try to be more compatible in &lt;fieldset&gt; rendering rules.
http://html5.org/tools/web-apps-tracker?from=8575&amp;to=8576</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103853</commentid>
    <comment_count>8</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-04-15 02:53:36 +0000</bug_when>
    <thetext>Eric Meyer&apos;s CSS reset doesn&apos;t seem to set min-width, nor do the other 4 at http://www.cssreset.com/.

But people doing &quot;all: initial&quot; would of course reset this property too....</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>