RE: [css-grid] Why only <length>s in *-gap?



> -----Original Message-----
> From: Francois Remy [mailto:francois.remy.dev@outlook.com]
> Sent: Friday, March 25, 2016 2:14 PM
> To: 'Alan Stearns' <stearns@adobe.com>; www-style@w3.org
> Subject: RE: [css-grid] Why only <length>s in *-gap?
> 
> Just making sure, how would you resolve percentages when columns are set
> to "auto" and the grid has no explicit width? Actually, the issue is more glaring
> when you think about a grid that has "height: auto" and implicit rows.
> 
> I guess the use case for percentages is when the grid has a definite size for
> the grid-gap axis, right?

This then brings up the potential for confusion though, if you set a definite size then it will work as the author expected, if you don't then it won't which will make the feature unintuitive. I suggest, at least initially, keeping it as specified to avoid the additional layout pass to resolve the %s. And what are grid gaps but another word for margin/padding at the grid track level, and we've seen what that's gotten us in the flex spec ;)

With that said, I'm not too passionate at the moment on this, if someone has a compelling enough use case where a definite length would completely make it fail, then let's reconsider - until that point I suggest we leave it out.

Greg

Received on Friday, 25 March 2016 21:48:13 UTC