28
edits
(Add mockups & correct little things) |
|||
| Line 1: | Line 1: | ||
This page aims at discussing the move of BC borders painting from table to cells. [ | This page aims at discussing the move of BC borders painting from table to cells. [ Warning: It is long known that I am just a simple guy trying in vain to mimic geniuses and help them, so feel free to correct any blunder here. ] | ||
= Rationale = | = Rationale = | ||
| Line 20: | Line 20: | ||
== Positionned cells == | == Positionned cells == | ||
Discussion about the rendering of positionned cells is put here because possible implementations aren't equally adapted to each choice here. | Discussion about the rendering of positionned cells is put here because possible implementations aren't equally adapted to each choice here. | ||
The same example table will be used for each mockup below: every td has a <tt>4px solid black</tt> border and a <tt>silver</tt> background, except <b>B3</b>, <b>B4</b>, <b>C3</b> which have a <tt>10px solid red</tt> border, <b>D2</b> which has <tt>border: none</tt>, and <b>C2</b> which has a <tt>yellow</tt> background, a <tt>6px green</tt> top border, the usual <tt>4px black</tt> as right border, a <tt>border: none</tt> for bottom, and an <tt>hidden</tt> left border. | |||
expected rendering when <b>C2</b> is not positionned:<br> | |||
http://img295.imageshack.us/img295/6462/bcmockup04ow.png | |||
When a cell is positionned, it can | When a cell is positionned, it can | ||
# Leave adjacent borders where they are, and move without them | # Leave adjacent borders (and corners) where they are, and move without them<br>http://img69.imageshack.us/img69/9531/bcmockup18il.png | ||
# Move with its inner half of adjacent borders, leave the other half in place | # Move with its inner half of adjacent borders (and corners), leave the other half in place<br>http://img134.imageshack.us/img134/2449/bcmockup27mk.png | ||
# Take the whole adjacent borders with it | # Take the whole adjacent borders (and corners) with it (may be too strange and unexpected by webmasters)<br>http://img294.imageshack.us/img294/1244/bcmockup39nt.png | ||
# Leave borders, but draw a copy (or the inner half of the copy) of them around itself | # Leave borders/corners, but draw a copy (or the inner half of the copy) of them around itself<br>http://img294.imageshack.us/img294/9070/bcmockup49of.png | ||
# Behave as if it were alone in another table, that is in conflict resolution for the rest of the table, (asked for) borders of positionned cell are ignored, and the cell draws its (or the inner half of its) borders around itself | # Behave as if it were alone in another table, that is in conflict resolution for the rest of the table, (asked for) borders of positionned cell are ignored, and the cell draws its (or the inner half of its) borders around itself<br>http://img51.imageshack.us/img51/5827/bcmockup50zc.png | ||
# ... ? | |||
People in the know (e.g. roc, bernd, etc) seem to agree on those: | People in the know (e.g. roc, bernd, etc) seem to agree on those: | ||
| Line 32: | Line 38: | ||
* There shouldn't be any difference of rendering of the table (apart from what depends on the cell being a positionned ancestror) when the cell is in <tt>position: static</tt> and when it is in <tt>position: relative</tt> without any offset, even if borders are antialiased/transparent. That seems to rule out (4) and (5) for relative positionning. | * There shouldn't be any difference of rendering of the table (apart from what depends on the cell being a positionned ancestror) when the cell is in <tt>position: static</tt> and when it is in <tt>position: relative</tt> without any offset, even if borders are antialiased/transparent. That seems to rule out (4) and (5) for relative positionning. | ||
Since when does rel. positioning of cells work? Abs. and fixed cells will be wrapped by pseudos. (Bernd) | - Since when does rel. positioning of cells work? Abs. and fixed cells will be wrapped by pseudos. (Bernd) | ||
- The goal of this section is discussing of how we should render relatively positionned cells (the abs/fixed case seem already decided) (frnchfrgg) | |||
== Winning corners == | |||
Currently being authored | |||
== Who paints what == | == Who paints what == | ||
In the collapsed borders model, borders are shared among cells; thus there are several possibilities to consider for painting: | In the collapsed borders model, borders are shared among cells; thus there are several possibilities to consider for painting: | ||
# Each cell wholly paints each adjacent border (unless doesn't want to, for example if positionned and proposition 1 is choosen). Problems of overlapping to solve, especially with transparent borders. Probably slow, too. Adapted to any proposition but (2). (3) needs more work, because if the adjacent cell is positionned the border shouldn't be drawn. | # Each cell wholly paints each winning adjacent border/corner (unless doesn't want to, for example if positionned and proposition 1 is choosen). Problems of overlapping to solve, especially with transparent borders. Probably slow, too. Adapted to any proposition but (2). (3) needs more work, because if the adjacent cell is positionned the border shouldn't be drawn. | ||
# Each cell paints its inner half of each adjacent border. Clearly adapted to the (2)nth proposition above. Subject to the same difficulties as touching divs in an antialiased backend ? | # Each cell paints its inner half of each winning adjacent border/corner. Clearly adapted to the (2)nth proposition above. Subject to the same difficulties as touching divs in an antialiased backend ? | ||
# Each cell paints wholly the adjacent borders for which it is the winner, that is has the winner of conflict resolution as its own (asked for) border. Adapted to any proposition but (2). Edge cases: when the winner belongs to a positionned cell and proposition 1 or 4 is choosen, same if winner does not belong to the positionned cell and 3 or 4 is choosen. | # Each cell paints wholly the adjacent borders/corners for which it is the winner, that is has the winner of conflict resolution as its own (asked for) border. Adapted to any proposition but (2). Edge cases: when the winner belongs to a positionned cell and proposition 1 or 4 is choosen, same if winner does not belong to the positionned cell and 3 or 4 is choosen. | ||
# ... ? | |||
edits