leafo/lessphp — pull request #344 by 123Haynes (2012-11-07 13:37:20+00:00)
Title: Support for Prefixr.com

Hello,

i wrote a small function to query the api of www.prefixr.com .
I saw this function in the simpless compiler and thought it would be usefull for phpless too.
This patch only adds the function itself. so the user has to call it manually. I guess if this is accepted you could integrate it into some of the other functions. Maybe with an extra parameter to trigger it or somethign like that.

So what does prefixr.com do?
The site checks if some css functions are missing vendor prefixes and adds them / removes them if they are not needed anymore.

It's pretty usefull for people like me who are not sure which prefixes are needed :)

A pretty good example would be this css code:

#header {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px;
-moz-transition: -moz-box-shadow 2s;
}
#footer {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
-ms-border-radius: 10px;
-o-border-radius: 10px;
border-radius: 10px;
}

after passing it through prefixr it looks like this:

#header {
border-radius: 5px;

-webkit-transition: -webkit-box-shadow 2s;
-moz-transition: -moz-box-shadow 2s;
-o-transition: box-shadow 2s;
-ms-transition: box-shadow 2s;
transition: box-shadow 2s;
}

#footer {
border-radius: 10px;
}

I hope this is usefull for someone :)

regards,
Haynes