Re: [csswg-drafts] [css-grid] I think the gutter math behind cell sizes is broken

I don't think this math corresponds to how Grid resolves <flex> sizes:
width: calc(100% * 1/12 - (30px - 30px / 6));
width: calc(100% * 7/12 - (30px - 30px / 6));

Grid calculates the <flex> sizes based on the content size subtracted
by the grid-gaps.  So it's more like:
width: calc((100% - 5*30px) * 1/12);
width: calc((100% - 5*30px) * 7/12);

But CSS doesn't understand that, so you have to do something like 
this:
width: calc(100% * 1/12 - 150px * 1/12);
width: calc(100% * 7/12 - 150px * 7/12);


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

Received on Tuesday, 4 October 2016 00:20:08 UTC