Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display: -ms-flexbox being removed despite compatibility mode #666

Closed
viveleroi opened this issue Sep 10, 2015 · 3 comments
Closed

display: -ms-flexbox being removed despite compatibility mode #666

viveleroi opened this issue Sep 10, 2015 · 3 comments

Comments

@viveleroi
Copy link

node v0.12.7, Mac OS X
clean-css v3.4.1

We're using flexbox in IE10 which supports an older flex standard. However, it seems that display: -ms-flexbox is being stripped from our css, despite any of the possible settings for compatibility mode.

Our original CSS:

display: -ms-flexbox;
-ms-flex-flow: row;
-ms-flex-wrap: wrap;

The final css (broken into newlines for this report)

-ms-flex-flow:row;
-ms-flex-wrap:wrap;

Other vendor prefixes for display are left alone.

@jakubpawlowicz
Copy link
Collaborator

@viveleroi can you reopen it with a larger excerpt of your CSS file as I can't figure out the bug from what you've provided.

@viveleroi
Copy link
Author

You'll need to re-open this issue (I don't have access and would prefer not creating a new one).

I've trimmed our css down and am able to reproduce this issue with these exact steps:

test.css:

.columns {
  display: -ms-flexbox;
  -ms-flex-flow: row;
  -ms-flex-wrap: wrap;
  display: -webkit-flex;
  display: flex; }

Run cleancss -o test.min.css test.css

test.min.css:

.columns{-ms-flex-flow:row;-ms-flex-wrap:wrap;display:-webkit-flex;display:flex}

The display: -ms-flexbox; has gone missing.

One additional thing I've noticed, is that if I remove the two -ms-flex-* or the other two display attributes from the style block, the issue no longer presents. The output correctly contains display: -ms-flexbox;

@jakubpawlowicz
Copy link
Collaborator

So this is a duplicate of #290 - you need to use --skip-aggressive-merging switch for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants