For example
input{margin:0}body{margin:0;background:white}
would be shorter written like this
input,body{margin:0}body{back
Yes, there is. The YUI Compressor does this for you. I was wrong, the YUI Compressor is only a minifier, but indeed very useful. What and how they minify is presented here.
This is a .jar package that you'll have to download and then run through the terminal, if you're on Unix or Linux (I don't know about Windows, so someone fill this gap!), with the following syntax:
$ java -jar /path/to/yuicompressor-x.y.z.jar myfile.css -o myfile-min.css
The -o option declares what file you wish to write your minified content to.