0

I'm building an Angularjs app using yeoman angular generator, with libsass instead of compass, and it works great on local server.

But after build, some of my css properties changes from px to pc, and that's causes errors and styling issues.

Before Build [Not Minified]: background-position:-468px -11px

After Build [Minified]: background-position:-468px -11pc

cimmanon
  • 67,211
  • 17
  • 165
  • 171
  • This has nothing to do with Angular, Sass, Compass, *or* Libsass. – cimmanon Sep 11 '15 at 16:52
  • I'm not saying that it has, I'm just explaining what I'm using. – Mohammed Rabay'a Sep 12 '15 at 18:31
  • My point is that you've added a bunch of tags that are completely irrelevant to the problem (is an expert on Angular going to be able to help you solve your problem?). There is not enough information here to reproduce anything. – cimmanon Sep 12 '15 at 18:35

1 Answers1

1

We experienced the same issue on several of our projects, and tracked down a recent change in an internal dependency as the source of the issue.

The grunt-contrib-cssmin module has an internal dependency on the clean-css module. Starting with version 3.4.1, the clean-css module turns on unit conversions by default, which then bubbles up into the behavior of grunt-contrib-cssmin. The clean-css module released version 3.4.2 which changes the default back to turn off unit conversions, based on community feedback. Version 0.14.0 of grunt-contrib-cssmin has been updated to use version 3.4.2 of clean-css.

We were able to resolve this issue by updating to use version 0.14.0 of grunt-contrib-cssmin in our project's package.json file. Make sure to clear your node-modules folder or run 'npm update' to ensure it's actually getting the latest versions.