New issue
Advanced search Search tips

Issue 727378 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Sep 14
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 874753



Sign in to add a comment

Non-rendered LEGEND should not establish a block formatting context

Reported by msten...@opera.com, May 29 2017

Issue description

It's not good that LEGEND elements that aren't even inside a FIELDSET exhibit magic like this. The spec says that FIELDSET should establish a new BFC, while LEGEND should not.

https://html.spec.whatwg.org/multipage/rendering.html#the-fieldset-and-legend-elements

It should probably also be possible to avoid creating a BFC also when the LEGEND is the rendered legend of a FIELDSET.

See discussion: https://github.com/whatwg/html/issues/2519

Demo: http://jsbin.com/kocubixuzu/edit?html,css,output
 

Comment 1 by e...@chromium.org, May 30 2017

Status: Available (was: Untriaged)

Comment 2 by msten...@opera.com, Jun 14 2017

Cc: sim...@opera.com
Summary: Non-rendered LEGEND should not establish a block formatting context (was: LEGEND should not establish a block formatting context)
This has now been resolved in the spec: https://github.com/whatwg/html/pull/2718

Rendered legends [1] should establish a new block formatting context and shrink to fit. No other LEGEND elements should do this automatically.

In other words, our current behavior for rendered legends is correct, while for non-rendered legends it's not.

[1] https://html.spec.whatwg.org/multipage/rendering.html#rendered-legend

Comment 3 by sim...@opera.com, Sep 14 2017

Cc: -sim...@opera.com zcorpan@gmail.com
Blocking: 874753
Status: Fixed (was: Available)
This got fixed June last year, by https://chromium-review.googlesource.com/535595

Tested by wpt/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-formatting-context.html

Sign in to add a comment