raisincss icon indicating copy to clipboard operation
raisincss copied to clipboard

Mismatch between grid and flex for align-items

Open kelunik opened this issue 4 years ago • 3 comments

Flex uses items-center [1] [2] while Grid uses align-items-center [3]. I think both should use align-items- as prefix, because just items- doesn't make it clear whether it's align-items or justify-items.

We stumbled upon this while using align-items-center and changing it to align-items-baseline, because align-items-baseline doesn't exist in the Grid version, just as items-baseline from Flex.

Additionally, the Grid version should probably use a variable map instead of hardcoding start, end, center, stretch like Flex does.

kelunik avatar Mar 05 '20 20:03 kelunik

Kind of breaking change if we change that.. let me think how can we avoid it to break sites using the lib

tretapey avatar Mar 09 '20 01:03 tretapey

@tretapey The grid can use the same variable and expose all variants while flex offers the old and new variant. The usage of the old variant is then documented as deprecated. There's no need to immediately remove the old variant.

kelunik avatar Mar 09 '20 06:03 kelunik

@kelunik would you propose with a PR?

tretapey avatar Mar 12 '20 14:03 tretapey