Re: [csswg-drafts] [cssom] Table row resolved width and height. (#4444)

I see that this is open for discussion later today. I should be able to make the call, but even if not here are a few thoughts:

- border-width should return `10px` because border-width is not a property that returns its used value for getComputedStyle; 
- height however should return its used value. So basically, you want to return 42px here, because the used value of border is 0px, and the full row height is 42px so 42px - 0px = 42px. 
- I would thus argue Firefox 70 is correct. The problem is that this kind of correct is also unpractical for authors, because they will inevitably try to compute the full height by adding the border-width and the height, unknowing of the fact that the border was actually ignored in the first place. Chrome avoids that pitfall by subtracting from 42px the 2*10px from the border they report but actually do not use.

So, well, this isn't great, but I don't think there is any behaviour here that makes a lot of sense. Firefox 70 is compliant with the specs as they are today, but that behavior is annoying for web developers because unpredictable. Ideally, all browsers would adopt Firefox 68's behaviour (then we need to change CSSOM to enable reporting the used value of border-width on elements which cannot draw borders) but otherwise we might have to specify Chrome's behavior (height return its used value minus the computed value of border-*-width, regardless of the used value of border-*-width).

A final option would be to make a change to css-tables and specify that the computed value of border-*-width on table-track elements in separate mode is forced to 0px. That would make Firefox 68's behavior valid per spec again, for different reasons.

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

Received on Wednesday, 30 October 2019 09:28:41 UTC