- From: <bugzilla@jessica.w3.org>
- Date: Sat, 25 Feb 2012 20:43:07 +0000
- To: public-css-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16119
Summary: [9.5.1 Floats] How nested floats with one zero-height
margin box should be rendered
Product: CSS
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: CSS Level 2
AssignedTo: bert@w3.org
ReportedBy: info@gtalbot.org
QAContact: public-css-bugzilla@w3.org
Test and demo pages
-------------------
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/float-non-replaced-width-013.html
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/float-non-replaced-width-014.html
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/float-non-replaced-width-015.html
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/float-non-replaced-width-016.html
Thread
------
[CSS21] Nested floats and zero-height margin box
http://lists.w3.org/Archives/Public/www-style/2012Feb/0852.html
in particular the objection from Øyvind Stenhaug
http://lists.w3.org/Archives/Public/www-style/2012Feb/1064.html
which is
{
First of all, the outermost floats here are all auto-width, in which
case "CSS 2.1 does not define the exact algorithm" for finding preferred
width and preferred minimum width.
Second of all, what does it mean for a right-floating box to be "next
to" a left-floating box? This doesn't seem to be properly defined.
Perhaps it should be similar to the case of lineboxes "next to" floats,
where floats with zero outer height are not supposed to shorten
lineboxes. Then, for e.g. float-non-replaced-width-014 it would be
perfectly fine to put #floated-left-child in the top left and
#floated-right-child "below" it - #floated-right-child would still be
"as high as possible".
}
Excerpts of current spec
------------------------
"
The right outer edge of a left-floating box may not be
to the right of the left outer edge of any right-floating box
that is next to it.
(...)
A left-floating box must be put as far to the left as possible, a right-
floating box as far to the right as possible.
"
9.5.1 Positioning the float
http://www.w3.org/TR/CSS21/visuren.html#float-rules
"
If 'width' is computed as 'auto', the used value is the "shrink-to-fit" width.
Calculation of the shrink-to-fit width is similar to calculating the width of a
table cell using the automatic table layout algorithm. Roughly: calculate the
preferred width by formatting the content without breaking lines other than
where explicit line breaks occur, and also calculate the preferred minimum
width, e.g., by trying all possible line breaks. CSS 2.1 does not define the
exact algorithm. Thirdly, find the available width: in this case, this is the
width of the containing block minus the used values of 'margin-left',
'border-left-width', 'padding-left', 'padding-right', 'border-right-width',
'margin-right', and the widths of any relevant scroll bars.
Then the shrink-to-fit width is: min(max(preferred minimum width, available
width), preferred width).
"
10.3.5 Floating, non-replaced elements
http://www.w3.org/TR/CSS21/visudet.html#float-width
Expected result
---------------
The CSS2.1 spec should indicate expected result for the 4 tests, in particular
- float-non-replaced-width-014.html
- float-non-replaced-width-016.html
regards, Gérard
--
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 Saturday, 25 February 2012 20:43:09 UTC