Okay. To sum up: In HTML, the following is valid:
<table border="1"> <colgroup> <col span="2" style="background-color:red"> <col style="background-color:yellow"> </colgroup> <tr> <th>ISBN</th> <th>Title</th> <th>Price</th> </tr> <tr> <td>3476896</td> <td>My first HTML</td> <td>$53</td> </tr> <tr> <td>5869207</td> <td>My first CSS</td> <td>$49</td> </tr> </table> As is this: <table border="1"> <thead> <tr> <th>Month</th> <th>Savings</th> </tr> </thead> <tfoot> <tr> <td>Sum</td> <td>$180</td> </tr> </tfoot> <tbody> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$80</td> </tr> </tbody> </table> As well as rowspan and colspan. I don't think cell splits are supported, but they are in DTP applications. I need some take-aways from this. 1) Do we care to style TLF tables after HTML so the above markup will render? If yes, we probably want table body, table header and table footer elements, as well as column groups. 2) Since I don't see any real reason not to make cells children of rows, and that's the way it's done in HTML, I'm going that direction. 3) As far as cell backgrounds go, that's more-or-less straightforward. (Cell settings override row, column and table.) I'm not sure how to handle rows vs. columns though. I'm thinking that row settings should override column settings. 4) I'm not sure how to handle border settings. What do I do if cell #1 has a 3 pixel border on the right, and cell #2 (to the right of that) has a 1 pixel border on the left? Do I draw a 3px line (higher number)? A 1px line (lower number)? A 2px line (the average)? or a 2px line ((higher/2) + (lower/2)? (I'm not sure there's any difference between the last two options.) On Dec 5, 2013, at 1:43 AM, Alex Harui wrote: > > > On 12/4/13 2:28 PM, "Harbs" <harbs.li...@gmail.com> wrote: > >> It does seem that the table elements were styled after html tables. >> That's where the column groups and table body elements come in: >> http://www.w3schools.com/tags/tag_colgroup.asp >> http://www.w3schools.com/tags/tag_tbody.asp >> >> I think too much effort was made to style TLF after htmlÅ > Maybe, but we heard lots of attempts to make TLF do HTML, so I'm not > surprised that the code reflects some of that. > > FWIW, back in the MX DataGrid days, I thought of trying to rowspan by > changing the z-order of the rows and cells so that a cell that spanned a > row was "above" everything else. > > -Alex > >> >> On Dec 5, 2013, at 12:20 AM, Harbs wrote: >> >>> >>> On Dec 4, 2013, at 7:29 PM, Alex Harui wrote: >>> >>>> >>>> >>>> On 12/4/13 6:40 AM, "Harbs" <harbs.li...@gmail.com> wrote: >>>> >>>>> I didn't explain myself very well here. >>>>> >>>>> My point is that TLF elements inherit from their parents and we'd get >>>>> that inheritance from the rows for free if cells are children of rows. >>>> Yup, so if you set background color on the row it should cover the >>>> margins >>>> and padding between cells of that row, right? >>> >>> Makes sense to me. Although, html table seem to not work like that. The >>> background color is only for the cell area. >>> >>>> I don't know how it is done in the browser. If you specify a row with >>>> a >>>> blue background and the next row has red background but a cell in the >>>> blue >>>> row has rowSpan=2 does the blue in that cell cover the red? >>> >>> Good question. I just tried and the red is replaced with blue. >>>> >>>>> >>>>> On Dec 4, 2013, at 4:38 PM, Harbs wrote: >>>>> >>>>>> If anything table/row/cell gives more flexibility. >>>>> >>>> >>> >> >