Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix camelCasing properties for IE ( see #93 ) #94

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions prefixfree.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,19 @@ var self = window.PrefixFree = {

// Warning: Prefixes no matter what, even if the property is supported prefix-less
prefixProperty: function(property, camelCase) {
var prefixed = self.prefix + property;

return camelCase? StyleFix.camelCase(prefixed) : prefixed;
var dashPrefixed = self.prefix + property;
if (camelCase) {
// Some browsers use lowercase prefixes in the camelCased property names, so we check
// for both. Uppercase prefixes are favored as they are the right way (R) to do it
var upperPrefixed = StyleFix.camelCase(dashPrefixed),
lowerPrefixed = StyleFix.camelCase(dashPrefixed.substr(1));
if (upperPrefixed in document.documentElement.style) {
return upperPrefixed;
}
return lowerPrefixed;
} else {
return dashPrefixed;
}
}
};

Expand Down