A Script to eliminate provider prefixes in CSS

Is there a script there that I can simply include on my site that will automatically add provider prefixes to CSS? I would just like to write standard CSS, so after a few years I don’t have to go back and remove prefixes with providers.

+7
source share
5 answers

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

+11
source

I don't know about a script to do this specifically, but I wrote everything in LESS instead of direct CSS. This way you can put things like gradients into mixins (similar functions), and then you only need to change one small set of declarations. instead of doing this on multiple files. Of course, mixins generally result in a lot of reuse, not jsut for supplier announcements, but for many things (for example, I usually define a color palette and icon sets, as well as mesh mixins based on 960.gs).

On dynamic sites, I usually set things to compile on the server side and in the cache. On static sites, I just use a shell script to compile less css just before deployment.

+2
source

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

+2
source

Given the cascading nature of CSS, you can include two stylesheets, the second "> the second of which follows the official CSS3, and the second , the first of which overrides specific settings for the specific vendor material needed to work. Then, in the future, you (obviously) just delete first stylesheet second ...

+1
source

There is no reason to remove vendor prefixes unless you like the fact that they add clutter to your code.

As to why they are there, first of all, this article in List Apart http://www.alistapart.com/articles/prefix-or-posthack/ provides valuable information. In principle, it is easier for them to have them, and not to have them.

If your CSS cascades correctly:

-webkit-border-radius: 5px; border-radius: 5px; 

Then, when Chrome and Safari remove the provider prefix, the style will be cascaded in the natural way and you don’t need to delete anything (unless you are worried about the extra bytes that they add).

0
source

All Articles