When I use -x with the less compiler to produce a minified CSS file:
lessc -x style.less > style.css
decimals lower than 1 are kept without the zero (.3 is kept as .3)
However, if I use --clean-css:
lessc --clean-css style.less > style.css
suddenly .3 changes to 0.3 int the output CSS file.
I have Less v1.7.4. I also have v0.10.30 of node.js which I installed following this guide since I am on Ubuntu 12.04. My clean-css version is 2.1.8, so I think I have already the last version of everything.
** UPDATE **
I installed less following the guide in the less webpage. It made a node_modules directory inside the less directory, with a clean-css directory inside it. I guess this would be the local, but I only have two node modules installed: npm and less, so that would be the only clean-css installation that I have.
This is the tree structure for the clean-css folder:
├── bin
│   └── cleancss
├── History.md
├── index.js
├── lib
│   ├── clean.js
│   ├── colors
│   │   ├── hsl-to-hex.js
│   │   ├── long-to-short-hex.js
│   │   ├── rgb-to-hex.js
│   │   └── shortener.js
│   ├── images
│   │   ├── url-rebase.js
│   │   └── url-rewriter.js
│   ├── imports
│   │   └── inliner.js
│   ├── properties
│   │   ├── optimizer.js
│   │   └── shorthand-notations.js
│   ├── selectors
│   │   ├── empty-removal.js
│   │   ├── optimizer.js
│   │   └── tokenizer.js
│   └── text
│       ├── comments.js
│       ├── escape-store.js
│       ├── expressions.js
│       ├── free.js
│       └── urls.js
├── LICENSE
├── node_modules
│   └── commander
│       ├── index.js
│       ├── package.json
│       └── Readme.md
├── package.json
└── README.md
I tried to run the cssclean binary inside the bin folder, following the suggestion of @seven-phases-max:
. cleancss -o styles.css styles.min.css
And it throws the following errors:
bash: /bin: Is a directory
bash: cleancss: line 5: syntax error near unexpected token `('
bash: cleancss: line 5: `var util = require('util');'
It doesn't throw any of these errors when I run it with the lessc command.
Can you reproduce this, and do you know if there is some file that I can edit to change this behaviour? Cheers
