Re: [csswg-drafts] [css-tables] Fixup collapsible whitespace

The issue says that 2.1 "stated to keep the whitespace" and that Gecko
 does this, but that there is a change needed from 2.1?  That's a bit 
confusing.  Which part is wrong?

In terms of the actual behavior on https://jsfiddle.net/nbh4r9u8/1/ it
 looks to me like the 2.1 algorithm is wrong per what we were _trying_
 to write down.  I'm not sure where in the numerous rewrites and 
attempted simplifications it went awry.

The simplest testcase that demonstrates the problem with what CSS 2.1 
has written down right now is this:

    <span style="display: table-row; white-space: pre; background: 
red">        </span>

Per CSS 2.1 as written there should be a red box here, right?  
Actually, now I can't tell whether the "if any" in 
https://www.w3.org/TR/CSS21/tables.html#anonymous-boxes step 1 substep
 3 means that if there aren't any the text is dropped or whether it 
means it gets kept.  This really needs to be reworded to be clear 
about what it's trying to say.  I _think_the intent is that the text 
is dropped unless it has a sibling that satisfies certain criteria; 
more on the criteria below.

I'm trying to recall what the "proper table descendants" bit of 
https://www.w3.org/TR/CSS21/tables.html#anonymous-boxes step 1 substep
 3 was meant to do.  @fantasai do you recall why that was needed?  
Because simply removing it would address the issue here, as far as I 
can tell; the whitespace in  https://jsfiddle.net/nbh4r9u8/1/ would 
then get removed by that step.

Another testcase worth considering:

    <span style="display: table-row; white-space: pre; background: 
red">
      <span style="display: table-row-group; background: 
yellow">group</span> 
      <span style="display: table-cell; background: green">cell</span>
   </span>

Should there be any red there?  I believe there would be if CSS2.1 
were implemented as written even with the change from 
https://logs.csswg.org/irc.w3.org/css/2016-09-19/#e720481 that was 
resolved yesterday, but is that the case in any browsers?

-- 
GitHub Notification of comment by bzbarsky
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/467#issuecomment-248255241 
using your GitHub account

Received on Tuesday, 20 September 2016 09:49:16 UTC