Re: [csswg-drafts] [css-grid] making percentage grid-gaps zero for the purpose of intrinsic sizing doesn't make sense

Reply to @mrego:
I think you misunderstand how percentages contributes to intrinsic
sizing.  If you have:

```
  grid: 100px 100px / 200px 200px;
  grid-gap: 10%;

```
then the intrinsic size is ~444.44px.
The grid-gap can't be 40px (10% of 200+200) because that would make
the size 440px and 10% of 440px is 44px, not 40px.
The way to calculate it is as I described above:
size = sum_of_coords / (1.0 - sum_of_percentages)

(i.e. 400 / (1.0 - 0.1) for the example above)


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

Received on Wednesday, 14 September 2016 14:01:17 UTC