- From: Syntactic: Jim Wilkinson <syntactic@btinternet.com>
- Date: Sun, 10 Oct 2004 18:41:44 +0100
- To: "www-style@w3.org" <www-style@w3.org>
I joined the list recently to report two possible errors in CSS2.1 and
CSS3. The first thread (re @media) is ongoing. I've now re-read the W3C
site and see that the timetable for the CSS2.1 CR to move to PR status is
November 2004. I've no wish to hold up CSS2.1 unless there is real cause.
I'm raising the second issue straight away in case there is substance to
it.
At a practical level, it concerns the ability of content authors to
inhibit the splitting of table rows across printed pages. The issue arose
recently on CSS Discuss and concerned a data table, where the requirement
is, I suggest, often very desirable. [Digression: the ability would also
apply to rows in tables used for layout, where there might be
print-rendering problems since such rows are more likely to have a height
greater than that of the page box. CSS does not, of course, distinguish
between these two uses of table.]
CSS2.1 Section 13.3.3 says that page breaks occur in the vertical margin
between block boxes and between line boxes inside a block box.
CSS2.1 Section 13.3.1 says that the 3 page-break properties apply to
block-level elements. Section 9.2.1 defines "block-level element" as one
in which the value of the "display" property is block, list-item, compact,
run-in and table. Actually, the wording is not that precise: it does not
state that these are the *only* values that make an element block-level.
For the HTML <tr> element UAs override the initial value of "display"
(viz. "inline") with "table-row" (see Section 9.2.5).
Digression: Section 9.2.5 also says that "These values [e.g. display:
table-row] cause an element to behave like a table element ..." I take
that to mean elements within a table such as tr and td, not literally just
the <table> element. The whole of Section 9.2, despite its first
paragraph, does not define whether (for example) a <tr> element with
display: table-row generates a block box or some other kind of box.
Section 9.4.1 *does* say that "... table-cells ... establish new block
formatting contexts". But none of this helps with the above problem.
Therefore, it is unclear, from the lack of precision noted above, whether
the following rule is valid:-
tr {page-break-inside: avoid;}
where it is explicitly stated that tr {display: table-row} or where this
is implicit in the UA. This is because it is unclear whether such a <tr>
element is block-level (and so generates a block box to which the property
can then be applied by the UA in its rendering).
My very limited testing shows that the rule is honoured by Opera 7.54 but
not by NS7.1 (Moz1.4), Moz1.7.1, FF0.9.2 (Gecko 1.7) or IE6. The CSS2
validator accepts the rule.
I'm not an expert in formal grammars so, if I've missed something, I will
appreciate a CSS2.1 reference. If I'm right, may I ask for an
acknowledgement from a WG member?
Acknowledgments to Adam Kuehn for his original comments.
--
Jim Wilkinson
Opera e-mail client: http://www.opera.com/m2/
Received on Sunday, 10 October 2004 17:42:44 UTC