- From: Simon Sapin <simon.sapin@kozea.fr>
- Date: Thu, 10 Nov 2011 11:39:47 +0100
- To: "www-style@w3.org list" <www-style@w3.org>
Hi,
Currently implementing CSS 2.1 tables in WeasyPrint, I am not sure I
understand the spec.
In section 17.2.1 "Anonymous table object", steps 1.3 and 1.4 say:
1.3. If a child C of a tabular container P is an anonymous inline
box that contains only white space, and its immediately preceding and
following siblings, if any, are proper table descendants of P and are
either 'table-caption' or internal table boxes, then it is treated as if
it had 'display: none'. A box D is a proper table descendant of A if D
can be a descendant of A without causing the generation of any
intervening 'table' or 'inline-table' boxes.
1.4. If a box B is an anonymous inline containing only white space,
and is between two immediate siblings each of which is either an
internal table box or a 'table-caption' box then B is treated as if it
had 'display: none'.
First, is "treat a box as if it had 'display: none"' the same as "remove
it" or is there a reason to keep the longer phrasing?
Is it correct that every box removed in 1.3 would also be removed in 1.4
*unless* it is the first or last child of its parent? (This may simplify
the implementation.)
About "proper table descendant". This only apply to a sibling S of a
child C of P. So S is also a child of P. Is it correct that the only way
for a direct child (at this step) not to be a proper table descendant is
if it is misparented? (As defined in step 3.2)
Later:
3.1 For each 'table-cell' box C in a sequence of consecutive
internal table and 'table-caption' siblings, if C's parent is not a
'table-row' then generate an anonymous 'table-row' box around C and all
consecutive siblings of C that are 'table-cell' boxes.
This seems to be only about cells being in rows. Why is "a sequence of
consecutive internal table and 'table-caption' siblings" mentioned?
Thanks,
--
Simon Sapin
Received on Thursday, 10 November 2011 10:40:37 UTC