1

I am new to GULP sass build structure and I am facing an issue. When I run my gulp process The final css that is generated has the following things 0 is getting removed before the decimal and line breaks are coming.

Some people are using PC and some are using MAC. In MAC this change is not happening. So every time when we do a git diff the mac code and windows code are different.

padding: 0.3em is converted to padding: .3em;

.element, .element2 is converted to 
.element,
.element 2

Any reason why this is happening?

karthick
  • 11,998
  • 6
  • 56
  • 88
  • `0.3em` and `.3em` are the same, and `\n' was added, to make code easier to read – Andrew Evt Nov 04 '15 at 19:43
  • Yes. But the mac gulp process isn't generating the code like this – karthick Nov 04 '15 at 19:44
  • maybe MAC and PC are not the same things? Maybe gulp have different properties there :) – Andrew Evt Nov 04 '15 at 19:45
  • Hmm..Yes can you guide me like where I can configure these properties? – karthick Nov 04 '15 at 19:46
  • Try running `npm update` on both operating systems, see if any new updates to packages came out. That could cause issues like this. – SeinopSys Nov 04 '15 at 19:47
  • no, i don't use sass and gulp, but you can read about it on gulps website, I think you will find some unswer there :) – Andrew Evt Nov 04 '15 at 19:47
  • Ok thanks guys.. I will check it out and Update If i find any new things – karthick Nov 04 '15 at 19:53
  • Sass isn't a node package so `npm update` won't help. You want to do `gem update sass` on all build machines. The `0` is dropped to reduce file size. The `\n` is added because gulp defaults sass to development environment. There should be no space added between the `2` and `.element`. Did you make a mistake in your example? – Reactgular Nov 04 '15 at 21:06
  • Sass has an option `--precision` to control decimal places. The default is **5** but that doesn't change the `0` being dropped. – Reactgular Nov 04 '15 at 21:07
  • This seems like something that should be raised on the appropriate bug tracker. – cimmanon Nov 04 '15 at 21:15
  • 1
    It sounds like you're committing compiled files to your repository which is a no-no. Generally you only want to commit source files. Committing build files is duplicating content and creating unnecessarily busy diffs/commits/pull requests. – graygilmore Nov 04 '15 at 22:30
  • @ThinkingMedia: Yes that was a typo – karthick Nov 04 '15 at 23:36
  • @graygilmore: Yes exactly. Thats what I am trying to tell my team. Build file is something that shouldn't be checked in. I am new to the team so it will take some time for me to convince them I guess – karthick Nov 04 '15 at 23:42

0 Answers0