I'm developing a pure flexbox grid framework called flexboxes. I'm looking to implement a way to offset flex items by a particular number of grid columns in any flex-direction
. This is possible with percentage margin but can it be done in a simpler way using flex properties? With what's available in flexboxes@0.4.0? I'd rather not implement margin classes this way because doing to would seemingly require adding classes for all 4 directions to accommodate all flex-direction
values.
Asked
Active
Viewed 2.3k times
8

ryanve
- 50,076
- 30
- 102
- 137
-
2Flexbox itself does not have properties of its own for offset. A tip would be to check how Bootstrap did with their flexbox version. – Asons May 30 '17 at 06:50
-
1Btw, there is no such display value as `display: flex-item` – Asons May 30 '17 at 06:57
-
2Margin it is https://css-tricks.com/forums/topic/flexbox-justified-and-offsetstaggered/ – Asons May 30 '17 at 07:06
-
1@LGSon Nice catch about display—thanks :) – ryanve May 30 '17 at 19:32