-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define how margin-top on fieldset's legend works #3929
Comments
Pages in httparchive with non-zero margin on legend https://gist.github.com/zcorpan/85e8a646fdeb15f0580e37a92de3709f |
http://www.umassonline.net/ is a page that renders differently between browsers. Firefox has more space above the fieldset/legend ("Step 1: Your Contact Details") compared to Safari and Chrome. Edge has as much space as Firefox, but the fieldset background is shown above the legend. |
I've looked at the first 60. Although I filtered the list for pages that contain a This suggests to me that, web compat-wise, ignoring margin in the block-flow direction should be OK. |
@MatsPalmgren are you ok with ignoring block margins? |
@MatsPalmgren ping |
I tend to think that block-axis margins are useful also on a rendered legend. Ignoring them introduces an exception and exceptions are bad in general. @tabatkins @mstensho WDYT? |
Interop for margins is horrible at the moment, so we're free to spec whatever. :) But I agree that margins could be useful. But then let's specify that they don't collapse with anything on the outside (It's already implicit that they don't collapse with anything on the inside the legend, since legends establish a BFC). We also need to spec how this affects alignment with the fieldset border. Are we still going to use the legend border box for alignment? I guess so? And the margins contribute to the size of the size of the block-start border area of the fieldset (just like the remaining parts (border box) of the legend), right? |
OK I changed the spec in 16d86e5 |
Yes. This is like Edge. Doing it like Firefox appears buggy since the legend ends up "floating" somewhere if you have different margins on each side. |
Sounds reasonable to me. (I filed bug 1490747 to fix the alignment.) |
Properly define the rendering of the fieldset and legend elements. The layout model used is most similar to Gecko, which uses an anonymous box to hold the fieldset's contents. Fixes #3955, fixes #3930, fixes #3929, fixes #3928, fixes #3927, fixes #3915, fixes #3913, fixes #3660, fixes #3331, fixes #2756, fixes #4013. Tests: https://github.com/web-platform-tests/wpt/tree/master/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements https://github.com/web-platform-tests/wpt/tree/master/html/semantics/forms/the-fieldset-element
…egend, a=testonly Automatic update from web-platform-testsHTML: test inline margin on fieldset's legend See whatwg/html#3929 -- wpt-commits: c033091462612c88abe00a81162e230ce2069b24 wpt-pr: 12569
…egend, a=testonly Automatic update from web-platform-testsHTML: test inline margin on fieldset's legend See whatwg/html#3929 -- wpt-commits: c033091462612c88abe00a81162e230ce2069b24 wpt-pr: 12569
Properly define the rendering of the fieldset and legend elements. The layout model used is most similar to Gecko, which uses an anonymous box to hold the fieldset's contents. Fixes whatwg#3955, fixes whatwg#3930, fixes whatwg#3929, fixes whatwg#3928, fixes whatwg#3927, fixes whatwg#3915, fixes whatwg#3913, fixes whatwg#3660, fixes whatwg#3331, fixes whatwg#2756, fixes whatwg#4013. Tests: https://github.com/web-platform-tests/wpt/tree/master/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements https://github.com/web-platform-tests/wpt/tree/master/html/semantics/forms/the-fieldset-element
Properly define the rendering of the fieldset and legend elements. The layout model used is most similar to Gecko, which uses an anonymous box to hold the fieldset's contents. Fixes whatwg#3955, fixes whatwg#3930, fixes whatwg#3929, fixes whatwg#3928, fixes whatwg#3927, fixes whatwg#3915, fixes whatwg#3913, fixes whatwg#3660, fixes whatwg#3331, fixes whatwg#2756, fixes whatwg#4013. Tests: https://github.com/web-platform-tests/wpt/tree/master/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements https://github.com/web-platform-tests/wpt/tree/master/html/semantics/forms/the-fieldset-element
…egend, a=testonly Automatic update from web-platform-testsHTML: test inline margin on fieldset's legend See whatwg/html#3929 -- wpt-commits: c033091462612c88abe00a81162e230ce2069b24 wpt-pr: 12569 UltraBlame original commit: b7154d8d26baac54569116f93785057e6e38b2a7
…egend, a=testonly Automatic update from web-platform-testsHTML: test inline margin on fieldset's legend See whatwg/html#3929 -- wpt-commits: c033091462612c88abe00a81162e230ce2069b24 wpt-pr: 12569 UltraBlame original commit: b7154d8d26baac54569116f93785057e6e38b2a7
…egend, a=testonly Automatic update from web-platform-testsHTML: test inline margin on fieldset's legend See whatwg/html#3929 -- wpt-commits: c033091462612c88abe00a81162e230ce2069b24 wpt-pr: 12569 UltraBlame original commit: b7154d8d26baac54569116f93785057e6e38b2a7
See demos
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/6107
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/6108
WebKit/Chromium ignore the margin
EdgeHTML honors the margin. The fieldset's border is centered within the border edge of the legend.
Gecko honors the margin. The fieldset's border is centered within the margin edge of the legend.
The text was updated successfully, but these errors were encountered: