postcss-flexbugs-fixes icon indicating copy to clipboard operation
postcss-flexbugs-fixes copied to clipboard

ie11 not currently working with single flex value

Open dajomu opened this issue 6 years ago • 2 comments

Hi,

If I have some css with a value like flex: 1 we are currently outputting flex: 1 1. This isn't picked up by ie11, as it needs three values for flex in order to render properly (it basically doesn't treat this flex value at all, so messes up the styles).

Would it be possible (perhaps even preferable) to output flex as a combo of flex-grow, flex-shrink and flex-basis?

So we would have -

flex: 1;

=>

flex-grow: 1;

flex: 1 1;

=>

flex-grow: 1;
flex-shrink: 1;

etc...

This would solve the safari 0% issue and would also make this compatible with ie11. I'm up for putting in a pull request for this, but wanted to check whether you think it's worthwhile before I get started... Let me know what you think.

dajomu avatar Jun 01 '18 12:06 dajomu

@luisrudge I have the same problem, if I use flex: 1 1 IE11 will break but I can fix it to flex: 1 1 auto or add flex-basis: auto.

lh0x00 avatar Apr 17 '20 03:04 lh0x00

@lamhieu-vk the fix makes a lot of sense (expanding flex to flex-{shrink|grow}). Do you want to take a shot at it?

luisrudge avatar Apr 17 '20 14:04 luisrudge