How to offset flex item?
Asked Answered
E

0

8

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 [email protected]? 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.

Engelhart answered 30/5, 2017 at 1:23 Comment(4)
Flexbox itself does not have properties of its own for offset. A tip would be to check how Bootstrap did with their flexbox version.Ellyellyn
Btw, there is no such display value as display: flex-itemEllyellyn
Margin it is css-tricks.com/forums/topic/…Ellyellyn
@LGSon Nice catch about display—thanks :)Engelhart

© 2022 - 2024 — McMap. All rights reserved.