diff --git a/prefixfree.js b/prefixfree.js index 6a71162..a2bd833 100644 --- a/prefixfree.js +++ b/prefixfree.js @@ -157,8 +157,8 @@ var self = window.PrefixFree = { } fix('functions', '(\\s|:)', '\\s*\\(', '$1' + prefix + '$2('); - fix('keywords', '(\\s|:)', '(\\s|;|\\})', '$1' + prefix + '$2$3'); - fix('properties', '(\\{|\\s|;)', '\\s*:', '$1' + prefix + '$2:'); + fix('keywords', '(\\s|:)', '(\\s|;|\\}||$)', '$1' + prefix + '$2$3'); + fix('properties', '(^|\\{|\\s|;)', '\\s*:', '$1' + prefix + '$2:'); // Prefix properties *inside* values (issue #8) if (self.properties.length) { diff --git a/prefixfree.min.js b/prefixfree.min.js index 64ee7b9..7462086 100644 --- a/prefixfree.min.js +++ b/prefixfree.min.js @@ -3,7 +3,7 @@ 'url("'+f+b+'")':a}),b=b.replace(RegExp("\\b(behavior:\\s*?url\\('?\"?)"+f,"gi"),"$1"));var c=document.createElement("style");c.textContent=b;c.media=a.media;c.disabled=a.disabled;e.insertBefore(c,a);e.removeChild(a)}}};d.send(null);a.setAttribute("data-inprogress","")},styleElement:function(a){var b=a.disabled;a.textContent=h.fix(a.textContent,true,a);a.disabled=b},styleAttribute:function(a){var b=a.getAttribute("style"),b=h.fix(b,false,a);a.setAttribute("style",b)},register:function(a){this.fixers= this.fixers||[];this.fixers.push(a)},fix:function(a,b){for(var c=0;c-1){var d=a.split("-"); if(a.charAt(0)==="-"){var a=d[1],g=++b[a]||1;b[a]=g;for(f3;)d.pop(),g=d.join("-"),StyleFix.camelCase(g)in i&&(a=e,a.indexOf(g)===-1&&a.push(g))}}};if(d.length>0)for(var g=0;g