- From: <bugzilla@jessica.w3.org>
- Date: Thu, 22 Mar 2012 18:14:33 +0000
- To: public-css-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16483 Summary: Clarify why blocks inside of an inline [do|do not] get their own flexbox item) Product: CSS Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Flexbox AssignedTo: jackalmage@gmail.com ReportedBy: dholbert@mozilla.com QAContact: public-css-bugzilla@w3.org CC: dbaron@dbaron.org, alexmog@microsoft.com (I just mailed the list about this: http://lists.w3.org/Archives/Public/www-style/2012Mar/0528.html but afterwards I realized it might've been better to file a bug, so I'm doing that as well. Apologies if this is overkill. :)) I believe the flexbox spec is currently inconsistent / unclear on handling of situations with a block inside an inline, like "anonymous item 7.1" in Example 2. That example looks like this: <div style="display:flexbox"> <span id="item7.1"> text 7.2 <div id="not-an-item7.3">block</div> text 7.4 </span> </div> The prose at the bottom of the example say that not-an-item7.3 doesn't form its own flexbox item, because it's contained inside an inline element. (technically, the prose says not-an-item6.3 right now, but that's a typo, which I emailed about separately) However -- I think that prose disagrees with the normative spec text about what makes a flexbox item: "boxes that satisfy one of the following criteria... 1. Immediate block-level children of flexbox")[1]. Note that the normative text refers to _boxes_ there, not _elements_. And in the example above, the _box_ for "not-an-item7.3" IS an immediate child of the flexbox, even if its element is not. This is according to the inline/block interaction rules in CSS 2.1 section 9.2.1.1 [2]: [[ "When an inline box contains an in-flow block-level box, the inline box ...[is] broken around the block-level box... The line boxes before the break and after the break are enclosed in anonymous block boxes, and the block-level box becomes a sibling of those anonymous boxes ]] In other words: if we follow CSS2.1 on how blocks behave inside of an inline, then the box for "not-an-item7.3" becomes an immediate child of the flexbox, which means the Flexbox spec says it should get its own flexbox item, contrary to what the example says. I think this needs clarification in the flexbox spec. Maybe we need to use the element hierarchy instead of the box hierarchy for determining flexbox item eligibility? I'm not sure if that makes sense. [1] http://dev.w3.org/csswg/css3-flexbox/#flex-items [2] http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level -- Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Received on Thursday, 22 March 2012 18:14:38 UTC