What Is The Difference Between Place-items And Align-items?
Solution 1:
The CSS
place-items
shorthand property sets thealign-items
andjustify-items
properties, respectively. If the second value is not set, the first value is also used for it.
So no, they are not the same.
And from the specification:
This shorthand property sets both the align-items and justify-items properties in a single declaration. The first value is assigned to align-items. The second value is assigned to justify-items; if omitted, it is copied from the first value.
Even if in the actual Flexbox iteration justify-items
is not defined and will have no effect, you should not consider them the same because things may change in the future.
justify-items
This property specifies the default justify-self for all of the child boxes (including anonymous boxes) participating in this box’s formatting context. Values have the following meanings
And
justify-self
Justifies the box (as the alignment subject) within its containing block (as the alignment container) along the inline/row/main axis of the alignment container
and
6.1.4. Flex Items
This property does not apply to flex items, because there is more than one item in the main axis. See flex for stretching and justify-content for main-axis alignment. [CSS-FLEXBOX-1]
Post a Comment for "What Is The Difference Between Place-items And Align-items?"