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

Removing duplicated code causes browser compatibility code broken #284

Closed
tiye opened this issue May 30, 2014 · 2 comments
Closed

Removing duplicated code causes browser compatibility code broken #284

tiye opened this issue May 30, 2014 · 2 comments

Comments

@tiye
Copy link

tiye commented May 30, 2014

Problem related here(but in Chinese): http://segmentfault.com/q/1010000000524331
In short:

.it-is-flex {
  display: -webkit-flex;
  -webkit-flex-direction: row;

  display: -ms-flexbox;
  -ms-flex-direction: row;

  display: flex;
  flex-direction: row;
}

After running cleancss in command line, I got a file containning only one display property.
While wrting that in another style works:

.it-is-flex {  
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;

  -webkit-flex-direction: row;
  -ms-flex-direction: row;
  flex-direction: row;
}

My demo can be found here:
http://repo.tiye.me/flexbox-bug/

While it's quite nice a strategy to rid code of duplicated properties, it may also result in confusion why compiled CSS is not working as expected.

@GoalSmashers
Copy link
Contributor

Please see discussion in #210.

@tiye
Copy link
Author

tiye commented May 31, 2014

So, named "property merging algorithm" #168

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