Skip to content
This repository has been archived by the owner on Mar 22, 2019. It is now read-only.

Option to preserve % sign on min-width (needed for correct IE10/11 behaviour) #89

Closed
oilvier opened this issue Feb 8, 2018 · 2 comments · Fixed by #90
Closed

Option to preserve % sign on min-width (needed for correct IE10/11 behaviour) #89

oilvier opened this issue Feb 8, 2018 · 2 comments · Fixed by #90

Comments

@oilvier
Copy link

oilvier commented Feb 8, 2018

Hi,

Is there any chance of getting an option to preserve the % sign on min-width ? This is to avoid a flexbox bug in IE 10/11.

The classic fix is to use unitless min-width:0; (cf: https://blog.goetter.fr/2016/11/09/flexbox-min-width-0-is-the-new-zoom-1/, in French) but it seems in IE 10/11 you need to add a % for the fix to work properly. (IE convert unitless 0 to 0px).

At present writing this:

min-width:0%;

Gets minified to:

min-width:0;

And this breaks IE10/11. Just need the % preserving on min-width:0%.

hail2u added a commit that referenced this issue Feb 8, 2018
`min-width:0%` is sometimes used for Flexbox and IE10/11 bug. Removing
unit from this declaration breaks this hack. But his seems CSS hack. So
it should be turned on only when `preserveHacks: true`.

This resolves #89.
@hail2u
Copy link
Owner

hail2u commented Feb 9, 2018

If I understand correctly, this seems a IE10/11 bug and solution is some sort of CSS hack. I preserve a percent unit only under the preserveHacks: true option. Is this OK?

hail2u added a commit that referenced this issue Feb 12, 2018
`min-width:0%` is sometimes used for Flexbox and IE10/11 bug. Removing
unit from this declaration breaks this hack. But his seems CSS hack. So
it should be turned on only when `preserveHacks: true`.

This resolves #89.
@oilvier
Copy link
Author

oilvier commented Feb 12, 2018

Yes, thank you !

@oilvier oilvier closed this as completed Feb 12, 2018
hail2u added a commit that referenced this issue Feb 13, 2018
`min-width:0%` is sometimes used for Flexbox and IE10/11 bug. Removing
unit from this declaration breaks this hack. But his seems CSS hack. So
it should be turned on only when `preserveHacks: true`.

This resolves #89.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants