discussions-and-proposals icon indicating copy to clipboard operation
discussions-and-proposals copied to clipboard

Gap functionality

Open stijnvanderlaan opened this issue 4 years ago • 0 comments

Introduction

In the new version of CSS gap now also works for flexbox: https://coryrylan.com/blog/css-gap-space-with-flexbox

This is a very welcome feature in css, but it would also be a very convenient feature in react native. Using gap's instead of margin's makes a lot of sense, because the layout keeps working when element hide/appear.

Details

I would suggest to copy the spec from css and add gap, rowGap and columnGap. You can set gap which works in multiple directions, and use the other to set/override a specific direction. I would suggest to implement it for the basic View but also for something like a FlatList (other components missing here?).

stijnvanderlaan avatar Sep 16 '21 09:09 stijnvanderlaan