I've been struggling with fieldsets that have (percentual) paddings and width all of a sudden bleeding out their parent tags. A little test that exposes the issue may be found here:
1. Resize the browser window (the width of the viewport) form quite wide to fairly narrow in Chrome 30 or Safari 7.0.
-> You will see the fieldset bleeding out of it's parent element. In this case the body element.
2. Then remove the comments of CSS line 29 and try again.
-> It then behaves like trident and gecko or the old webkits.
It appears to be caused by the agent default style `min-width: -webkit-min-content`. Presumably it entered Webkit with this commit: http://trac.webkit.org/changeset/143479
This addition to the user agent default style sheet makes the behaviour of Webkit suddenly entirely different from Gecko and Trident. Six of my websites broke in Chrome and Safari this year that have looked perfectly well before. It took a while before I found out that the cause was not in my own stylesheet but in the agent's style sheet. Of course once it's known, it's easy to patch it by putting `min-width: 0` in the site's style sheet, but many people wouldn't get that idea and my suspicion is that many people who treat fieldset in a similar way have been struggling with their designs since a few months, not understanding what is going on.
Would it be an idea to take this styling out of the agent style sheet again and handle the default treatment of fieldsets in a different manner?
Confirming that I've run into this at http://jsfiddle.net/tde5p/10/ and https://github.com/twbs/bootstrap/issues/12359.
Parallel Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=504622
I believe that `min-width: min-content` emulates the default behavior of fieldset element in most browsers in typical use cases (with no circular dependencies between widths of container and content). It also follows HTML5 specs (https://html.spec.whatwg.org/multipage/rendering.html#the-fieldset-and-legend-elements and http://www.w3.org/html/wg/drafts/html/master/rendering.html#the-fieldset-and-legend-elements) and gives an easy way to change this behavior if necessary by chanaging the `min-width` property. So having `min-width: min-content` itself by default for fieldset is not a bug.
There could be a bug in the implementation of `min-content` algorithm (http://dev.w3.org/csswg/css-box/#min-content) for the case when the width of child element depends on the container width (or the spec changed since the implementation). I didn't test it.
I agree that this bug seems invalid given the referenced section of the HTML5 spec.
This bug is invalid and can be closed.
*** Bug 35622 has been marked as a duplicate of this bug. ***