Re: [CSS21] Issues with inline formatting model (particularly 10.8)

Anton Prowse wrote:
> I have identified some issues with the specification of the inline
> formatting model in CSS21.  Most are editorial, but a couple are more
> serious.

A couple more!


9.4.2 Inline formatting context
(http://www.w3.org/TR/CSS2/visuren.html#inline-formatting) :

   # Line boxes that contain no text, no preserved white space, no
   # inline elements with non-zero margins, padding, or borders, and no
   # other in-flow content (such as images, inline blocks or inline
   # tables), and do not end with a line feed must be treated as
   # zero-height line boxes. For the purposes of margin collapsing, this
   # line box must be ignored.


Issue 20a:  If a line box contains no preserved white space then it
can't end with a line feed.  So that clause in the first sentence is
superfluous.


Issue 20b:  Line boxes never contain text; they contain inline-level
boxes (which may contain text).  The first sentence needs reformulating,
along the lines of the following:

   | Line boxes which contain only empty inline-level boxes having
   | zero-width padding, borders and margins must be treated as
   | zero-height line boxes.


Issue 20c:  Assuming that we *want* zero-height line boxes in some of
the cases listed (Issue 199; [1]) then, if a line box contains only an
(empty) inline box with zero padding and border area but some non-zero
margin, is it reasonable to want the line box to have non-zero height,
and if so, why?  And what about negative margin?

(There's currently no interop here – although that seems to be due to
bad handling of margin on empty inline boxes in general in all browsers
other than Safari:
 <!DOCTYPE html>
 <body><div>
  <span style="margin-right: 500px;"></span>
  <span style="margin-right: 500px;"></span>
  <span style="margin-right: 500px;"></span>
  text
 </div>
 </body>
Sf5 follows the current spec; Op10.6 and IE8 don't find any line
breaking opportunities; and Fx3.6 treats the margins as having no
influence on the inline boxes which follow.)


Issue 20d:  The second sentence is currently needed because 8.3.1 does
not regard margins separated by line boxes to be adjacent.  I'm not sure
I like this editorial approach though.  (IMO secret overrides are
undesirable in the core text.)  Can we link 8.3.1 back to this sentence
where appropriate?


[1] http://wiki.csswg.org/spec/css2.1#issue-199

Cheers,
Anton Prowse
http://dev.moonhenge.net

Received on Wednesday, 1 September 2010 21:13:36 UTC