- From: w.szukalski <szukw000@students.uni-mainz.de>
- Date: Sun, 24 Apr 2005 06:19:35 +0000
- To: <www-style@w3.org>
I feel, the specification has some weaknesses. Weakness number one: ==================== Section 17.4 states: "In both cases, the table element generates an anonymous box that contains the table box itself and the caption's box (if present). The table and caption boxes retain their own content, padding, margin and border areas, and the dimensions of the rectangular anonymous box are the smallest required to contain both. Test e.g.: <table style="width:200px; margin:50px;"> <caption style="width:400px:">Caption text</caption> <tr><td>cell ONE</td></tr> </table> The anonymous box has no alignment: the caption's text is centered by default. The table (possibly) is left aligned within the anonymous box. The caption's text is 50px distant from the table, although the margin of an element should generate a free area between the element itself and the environment. Which means: the caption belongs to the environment, not to the table. But: the width of the caption may decide where the table is placed. One could write: <table style="width:200px; margin-bottom:50px;margin-left:50px; margin-right:50px;"> <caption style="width: 200px; margin-left:50px; margin-right:50px; margin-top:50px;">Caption text</caption> <tr><td>cell ONE</td></tr> </table> Changing 'align=top' to 'align=bottom' is not simple: the user has to change two margins too. This discourages the user to change the alignment. And what happens when the table width is dynamic ? 'caption of table' becomes 'table of caption'. A better solution would have been: The anonymous box gets the alignment and the margin of the table. Then the user only has to change the caption's alignment value. ===== /* Annotation: I have made a test by using a wrapper table as an anoymous box. align=top <table><tr><td>CAPTION TABLE</td></tr></table> align=bottom <table><tr><td>TABLE CAPTION</td></tr></table> align=left <table><tr><td>CAPTION</td><td>TABLE</td></tr></table> align=right <table><tr><td>TABLE</td><td>CAPTION</td></tr></table> The wrapper table has no border, no padding, no spacing. The wrapper table gets the margin, the alignment, and the width of the original table. If the original table has a relative width, the original table gets a width of 100 %. I can switch between the four alignments simply by changing the alignment value of the caption element in the document. */ === Weakness number two: ==================== Section 9.5, paragraph 4, lines 4ff. : Any content in the current line before a floated box is reflowed in the first available line on the other side of the float. The user can always force this behaviour, writing: <img align=left> The image to the left shows ... But when the user wants to write: The image below <img align=left> shows ... then the image actually is not below only because the specification states: User, not I have to serve you, but you have to serve me. Weakness number three ===================== Section 10.8 baseline 'baseline of box' : 'baseline of parent box' middle 'vertical midpoint of box' : 'baseline of parent box' sub 'baseline of box' super 'baseline of box' text-top 'top of box' : 'top of font' text-bottom 'bottom of box' : 'bottom of font' 'text-top' and 'text-bottom' are undefined because a 'top of box' resp. 'bottom of box' does not exist. A box is defined by edges (or lines) in Section 8. Top of font (baseline - ascent) and bottom of font (baseline + descent) are well know. One could define a 'topmost edge': the top margin edge for margin-top >= 0, otherwise the top border edge. 'top' is defined only as the 'top' property. 'top', 'bottom', 'right', 'left' are directions: below, above, left oft, right of (Section 9.3.2). Last not least ============== o I want to point to the drawing of section 17.6.1 : the 'table width' does not include the border of of the table, but the cellspacing only. The first drawing in 17.6.2 shows correctly: the table width is the row width plus half the border-left value plus half the border-right value, i.e. includes the vertical borders. o Section 16.3 shows an image which does not show the reader how the implicit inheritance for the property text-decoration must work. A better solution is: <blockquote> <p> <span>Blue text with blue underline. <em>Blue text without underline.</em> <cite>Fuchsia text with blue underline</cite> </span> </p> </blockquote> o The definition of properties of the collapsing border model resp. the separated border model is imprecise. Section 17.6.1, paragraph 5, last line: Rows, row columns, row groups, and column groups cannot have borders ... 'cannot' is not a keyword of Section 3.1 . You must either use 'must not have borders' or explain why a row 'cannot' have borders. In fact, a row 'can' have borders in the separated border model: if the row does not surround another row or is not surrounded with another row. 'Padding' for a row is not mentioned at all. I propose the following clarification: 0: MUST NOT 1: MAY ?: Specification pulls my leg separated model collapsed model -------------------------------------------------- table margin 1 1 table border 1 1 table padding 1 0 row border ? 1 row padding ? 0 cell spacing 1 0 cell border 1 1 cell padding 1 1 --------------------------------------------------- winfried
Received on Sunday, 24 April 2005 20:02:00 UTC