Closed Bug 1368723 Opened 7 years ago Closed 2 years ago

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

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1683748

People

(Reporter: zcorpan, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: testcase)

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

In Gecko both <legend>s that are children of <fieldset> 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>
Priority: -- → P3
PASS with the WIP patch in bug 1483787.
Assignee: nobody → mats
Depends on: 1483787
Keywords: testcase
OS: Unspecified → All
Hardware: Unspecified → All

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: MatsPalmgren_bugz → nobody
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.