We center the block contents, not the block itself, by using the text alignment classes.
We remove the selfAlignX prop, though is a breaking change because-despite no functional changes-this may result in compilation errors in TypeScript codebases and may require a major version bump (to 1.X).
Note that in horizontal grids (.grid-y aka <Grid horizontal>) the X and Y axes are technically swapped but since this is not respected for the alignX and alignY props, I see no need to respect it for selfAlignX and selfAlignY.
In addition, this fixes a bug where the flexOrderSmall, flexOrderMedium and flexOrderLarge props would set the class name based on the flexOrder value.
Finally, this fixes the test (which previously did nothing) so it now actually tests the class names.
Currently, the flexbox props
selfAlignX
andselfAlignY
are not implemented. This PR implements these props.selfAlignX
does not make sense on flexbox children, see "There is no justify-self in Flexbox" on MDN. I see two solutions. This PR implements 1 but I am open to 2 as well.selfAlignX
prop, though is a breaking change because-despite no functional changes-this may result in compilation errors in TypeScript codebases and may require a major version bump (to 1.X).selfAlignY
can easily be implemented using the.align-self-*
classes.Note that in horizontal grids (
.grid-y
aka<Grid horizontal>
) the X and Y axes are technically swapped but since this is not respected for thealignX
andalignY
props, I see no need to respect it forselfAlignX
andselfAlignY
.In addition, this fixes a bug where the
flexOrderSmall
,flexOrderMedium
andflexOrderLarge
props would set the class name based on theflexOrder
value.Finally, this fixes the test (which previously did nothing) so it now actually tests the class names.