Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A Script to Eliminate Vendor Prefixes in CSS [closed]

Is there a script out there that I can just include on my site that will automatically throw in the vendor prefixes to CSS? I'd like to just write standard CSS so in a few years I don't have to go back and strip out the vendor prefixes.

like image 628
JacobTheDev Avatar asked Aug 16 '11 00:08

JacobTheDev


4 Answers

Just found this, it looks perfect: http://leaverou.github.com/prefixfree/

like image 81
JacobTheDev Avatar answered Nov 04 '22 23:11

JacobTheDev


I dont know of a script to do this specifically but ive been writing everything in LESS instead of straight CSS. This way you can put things like gradients in mixins (kinda like functions) and then you only have to change one small set of declarations. instead of doing it over multiple files. Of course mixins in general lead to a lot of reuse not jsut for vendor declarations but for lots of things (for example i typically define a color palette and icon sets as well as grid mixins based on 960.gs).

On dynamic sites i usually set things up to compile on the server side and cache. On static sites i just use a shell script to compile the less down to css directly before i deploy.

like image 37
prodigitalson Avatar answered Nov 04 '22 23:11

prodigitalson


I wrote just such a script, used in production and without dependencies: http://imsky.github.com/cssFx/

like image 2
imsky Avatar answered Nov 04 '22 23:11

imsky


Given the cascading nature of CSS you could include two stylesheets, the firstsecond of which follows official CSS3, and the secondfirst one of which overrides certain settings to do the vendor specific stuff you need to make it actually work. Then in future you (obviously) just remove the secondfirst stylesheet...

like image 1
nnnnnn Avatar answered Nov 04 '22 23:11

nnnnnn