legend should only create a block formatting context if it is the "rendered legend"

Issue #12174566 • Assigned to Bogdan B.

Details

Author
Simon P.
Created
May 30, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
15
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Demo (also [1] if the URL stops working):
http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=5207

In EdgeHTML all legends create a block formatting context; they contain their floats. The proposal is to only do this for the “rendered legend” (https://html.spec.whatwg.org/#rendered-legend ) to make legend in general have less magic.

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

[1]

<!DOCTYPE html>
<style>
.float {
  float: left;
  width: 30px;
  height: 60px;
  background-color: lightsalmon;
}

legend {
  background-color: lightblue;
}
</style>
<fieldset>       
 <legend> <div class="float"></div> Is the rendered legend a BFC? (rendered legend)</legend>
 <legend> <div class="float"></div> Is the rendered legend a BFC? (child of fieldset)</legend>
 <div><legend> <div class="float"></div> Is the rendered legend a BFC? (descendant of fieldset)</legend></div>
</fieldset>
<div>       
 <legend> <div class="float"></div> Is the rendered legend a BFC? (outside fieldset)</legend>
</div>

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Steven K.”

      Changed Assigned To to “Bogdan B.”

    You need to sign in to your Microsoft account to add a comment.

    Sign in