A tool that rewrites your CSS files, adding vendor-prefixed versions of (popular) CSS3 rules. It also can combine and minify your stylesheets. Keep your styles clean!
It supports many CSS3 stuff including keyframe animations, Flexbox and gradients.
For example, this
#wrapper {
border-radius: 1em;
transform: rotate(45deg)
}
becomes this:
#wrapper {
-moz-border-radius: 1em;
-webkit-border-radius: 1em;
border-radius: 1em;
-o-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
transform: rotate(45deg)
}
Requires cssutils.
$ sudo pip install cssprefixer
$ git clone git://github.com/myfreeweb/cssprefixer.git
$ cd cssprefixer
$ sudo pip install cssutils
$ sudo python setup.py install
Like this:
cssprefixer my1.css my2.css --minify > result.css
import cssprefixer
cssprefixer.process(open('my.css').read(), debug=False, minify=True)
or any other Python web framework — latest git version of webassets has a filter for cssprefixer.