Open vespakoen opened 11 years ago
The problem became obvious once I looked at the code: It only handles properties (no values)! No idea how I missed something so huge. Marked as confirmed and changed the title. I'll try to look into it after the holidays, unless someone wants to pick it up and send a pull request :)
FYI, you don't need the jQuery -prefix-free plugin in its current form at all since jQuery auto-prefixes properties (but not values) since version 1.8.0.
I've actually reported a feature ticket about auto-prefixing values but authors decided it's more suitable for a plugin than jQuery core which I understand as the potential solution wouldn't be so clear code-wise. http://bugs.jquery.com/ticket/12967
So, time to make prefix free work nicely with jQuery then...
The jQuery version can be checked with $().jquery; Based on it's value, we can decide whether the properties have to be prefixed.
For "-prefix-free-ing" the values, I can't help here, I have browsed though the code, but I don't really understand what's going on there.
So here's me hoping someone can come up with a solution.
Can't wait to kiss all prefix differences goodbye =)
I just got bitten by the lack of value prefixing
element.css({transition: 'transform 2s linear'});
In webkit browsers, the transform
value needs to be prefixed as -webkit-transform
.
I figured I'd show this example to illustrate the need for compound value support as well.
That should be pretty easy, the string in the css
method should pass through PrefixFree.prefixCSS()
. Though I don't have time to look into the jQuery API to see how to integrate this in it. Any takers?
BTW, the current functionality is long not needed, jQuery 1.11 will be released soon and since 1.8 jQuery adds prefixes to properties by itself. Adding it by the -prefix-free plugin as well may create duplicates.
It looks like the jQuery plugin doesn't handle changes to the background / background-image properies.
See this fiddle for more details: http://jsfiddle.net/BtQvq/
I have console.log-ed the "property" in the jQuery plugin, and the background / background-image properties don't get listed, I think it would be pretty sweet if prefix-free could handle gradients for us =)