跳到主要内容
版本:0.17.0+

flex

Why are there no justify-items and justify-self properties?

This is a good question not only me but also some other one do wonder like In CSS Flexbox, why are there no "justify-items" and "justify-self" properties? - Stack Overflow.

It concerns with some design concept about flex, the behind consideration is far beyond my shallow thought.

Thanks to this question, as well as the answer provided by Methods for Aligning Flex Items along the Main Axis.

Finally, what I wanna realize is an item separate from the constraint of father container picture 6 , and which can be easily solved out by using the key margin: auto(m-auto in tailwindcss).

Hence, it behaves what I was expected to: picture 7

Thanks!

reference: