From deb50b5c9a59e90dce1516b14d931038e35d75b9 Mon Sep 17 00:00:00 2001 From: Han Lin Yap Date: Mon, 8 Aug 2011 18:16:26 +0200 Subject: [PATCH] Added css3finalize 1.45 --- .../1.45/jquery.css3finalize.min.js | 18 ++++++++++++++++++ ajax/libs/css3finalize/package.json | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 ajax/libs/css3finalize/1.45/jquery.css3finalize.min.js diff --git a/ajax/libs/css3finalize/1.45/jquery.css3finalize.min.js b/ajax/libs/css3finalize/1.45/jquery.css3finalize.min.js new file mode 100644 index 00000000000000..9c2812a5deb6d5 --- /dev/null +++ b/ajax/libs/css3finalize/1.45/jquery.css3finalize.min.js @@ -0,0 +1,18 @@ +/** + * @author Han Lin Yap < http://zencodez.net/ > + * @copyright 2011 zencodez.net + * @license http://creativecommons.org/licenses/by-sa/3.0/ + * @package Css3-Finalize + * @version 1.45 - 2011-08-08 + * @website https://github.com/codler/jQuery-Css3-Finalize + * + * == Description == + * Some css3 attributes needs to have a prefix in front + * in order to work in different browser. The plugin takes + * care of that so you only need to write without the prefix. + * + * == Example Usage == + * // This will look for all style-tags and parse them. + * $('style').cssFinalize(); + */ +(function(c){if(c.cssFinalize){return}if(!c.camelCase){var b=/-([a-z])/ig,a=function(d,e){return e.toUpperCase()};c.camelCase=function(d){return d.replace(b,a)}}c.cssFinalizeSetup={shim:true,node:"style,link",checkMedia:true};c.fn.cssFinalize=function(d){if(!d||typeof d!="object"){d={}}d.node=this;c.cssFinalize(d);return this};c.cssFinalize=function(j){var r=document.createElement("div");if(typeof j=="string"){newoptions=arguments[1]||{};newoptions.node=j;j=newoptions}j=c.extend({},c.cssFinalizeSetup,j);j.checkMedia=!!(j.checkMedia&&window.matchMedia);var v=false;if(c.browser.webkit||c.browser.safari){v="webkit"}else{if(c.browser.mozilla){v="moz"}else{if(c.browser.msie){if(c.browser.version<=7&&!j.shim){return true}v="ms"}else{if(c.browser.opera){v="o"}}}}function g(A,B){return function(C){return(v==A)?B:false}}var k="animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function";k+=" appearance backface-visibility";k+=" background-clip background-composite background-origin background-position-x background-position-y background-size";k+=" border-corner-image border-image border-top-image border-right-image border-bottom-image border-left-image border-top-left-image border-top-right-image border-bottom-left-image border-bottom-right-image border-radius";k+=" box-align box-direction box-flex box-flex-group box-lines box-ordinal-group box-orient box-pack box-reflect box-shadow box-sizing";k+=" column-count column-gap column-rule column-rule-color column-rule-style column-rule-width column-width columns";k+=" dashboard-region hyphenate-character hyphens line-break";k+=" grid-columns grid-rows";k+=" marquee marquee-direction marquee-increment marquee-repetition marquee-speed marquee-style";k+=" mask mask-attachment mask-box-image mask-clip mask-composite mask-image mask-origin mask-position mask-position-x mask-position-y mask-repeat mask-size";k+=" nbsp-mode";k+=" perspective perspective-origin";k+=" tab-size tap-highlight-color text-fill-color text-overflow text-security text-size-adjust";k+=" text-stroke text-stroke-color text-stroke-width";k+=" touch-callout";k+=" transform transform-origin transform-origin-x transform-origin-y transform-origin-z transform-style";k+=" transition transition-delay transition-duration transition-property transition-timing-function";k+=" user-drag user-modify user-select";k=k.split(" ");var o={};if(parseInt(c.browser.version.substr(0,1))<2){o={"border-top-left-radius":[g("moz","-moz-border-radius-topleft")],"border-top-right-radius":[g("moz","-moz-border-radius-topright")],"border-bottom-right-radius":[g("moz","-moz-border-radius-bottomright")],"border-bottom-left-radius":[g("moz","-moz-border-radius-bottomleft")]}}function m(A){var B=c.camelCase(A);return(v=="ms")?B[0].toLowerCase()+B.substr(1):B}function w(A){A=A.replace(/\/\*((?:[^\*]|\*[^\/])*)\*\//g,"");A=A.replace(/\n/g,"");A=A.replace(/\r/g,"");A=A.replace(/\@import[^;]*;/g,"");return A}function y(D,C){var A=D.match(RegExp(C,"g"));var B=D.replace(new RegExp(C,"g"),"[|]").split("[|]");var E=[];for(i in B){E.push(B[i]);if(A&&A[i]){E.push(A[i])}}return E}function z(A,C){if(v=="ms"&&c.browser.version<=7){var B=c('")}}function e(B,C){C=w(C);if(c.trim(C)===""){return}var D=f(C);var A=[];A=E(D);function E(G){var F=[];c.each(G,function(H,J){if(J.attributes){var I=s(J.attributes);if(!c.isEmptyObject(I)){F.push({selector:n(J.selector),attributes:I})}else{if(n(J.selector)!=J.selector){F.push({selector:n(J.selector),attributes:s(J.attributes,true)})}else{if(!j.checkMedia||(j.checkMedia&&J.selector.indexOf("@media")===0&&matchMedia(J.selector.substr(7)).matches)){F.push({selector:J.selector,attributes:E(J.attributes)})}}}}});return F}B.addClass("css-finalize-read");if(A.length>0){z(B,A)}}function f(H){var C;if(v=="ms"&&c.browser.version<=8){C=y(H,"({[^{}]*})")}else{C=H.split(/({[^{}]*})/)}if(C[C.length-1].indexOf("}")==-1){C.pop()}var D=[];var A=false;var I;var F=0;var G;var E=0;while(E-1){if(!(m(B) in r.style)||B=="mask"){if(m("-"+v+"-"+B) in r.style){return"-"+v+"-"+B}}}return false}function p(F,E,H){H=H||F;if(F=="background-clip"||F=="background-origin"){r.style.cssText=H+":"+E;if(r.style[m(H)]!==undefined&&""+r.style[m(H)].indexOf(E)==-1){return E.split("-")[0]}}if(F=="transition"||F=="transition-property"){var J=E.split(/\s?,\s?/);var A=[];for(var B in J){var G,K;if(F=="transition"){G=J[B].split(" ")[0]}else{G=J[B]}if((K=t(G))!==false){A.push(K+J[B].substr(G.length))}else{A.push(J[B])}}return A.join(",")}if(v=="moz"){if(E.indexOf("calc")===0){return"-moz-"+E}}var M;if(F=="background"||F=="background-image"){if(E.indexOf("linear-gradient")===0){if(v=="webkit"){M=E.replace(/^linear-gradient\s?\(\s?(.*?)\s?\)$/,"$1").split(/,\s?/);if(M.length==2){return"-webkit-gradient(linear, 0% 0%, 0% 100%, from("+M[0]+"), to("+M[1]+"))"}var L="";if(M.length>=3){var C="0% 0%, 0% 100%";if(M[0]==="left"){C="0% 0%, 100% 0%"}if(M.length>3){var I=M.slice(2,M.length-1);c.each(I,function(O,P){var N=P.split(/ /);if(N.length===2){L+="color-stop("+N[1]+", "+N[0]+"),"}})}return"-webkit-gradient(linear, "+C+", from("+M[1]+"), "+L+" to("+M[M.length-1]+"))"}}else{if(v=="ms"&&c.browser.version==9){M=E.replace(/^linear-gradient\s?\(\s?(.*?)\s?\)$/,"$1").split(/,\s?/);if(M.length==2){var D='';return"url(data:image/svg+xml,"+escape(D)+")"}}}return"-"+v+"-"+E}else{if(E.indexOf("radial-gradient")===0){return"-"+v+"-"+E}}}return false}function u(C,B){if(j.shim){if(v=="ms"){if(c.browser.version<=8){if(C.toUpperCase()=="OPACITY"&&!c.support.opacity&&!c.isNaN(B)){return{filter:"alpha(opacity="+B*100+")",zoom:1}}if(C.toUpperCase()==="BACKGROUND-COLOR"&&B.indexOf("rgba")===0){B=d(B);return{background:"url(#)",filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='"+B+"',EndColorStr='"+B+"')"}}if((C.toUpperCase()=="BACKGROUND"||C.toUpperCase()==="BACKGROUND-IMAGE")&&B.indexOf("linear-gradient")===0){var A=B.replace(/^linear-gradient\s?\(\s?(.*?)\s?\)$/,"$1").split(/,\s?/);if(A.length==2){return{background:"url(#)",filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='"+A[0]+"',EndColorStr='"+A[1]+"')"}}}}}}return false}function n(A){if(v=="moz"){A=A.replace("::selection","::-moz-selection");A=A.replace("::placeholder",":-moz-placeholder");A=A.replace("@keyframes","@-moz-keyframes")}else{if(v=="webkit"){A=A.replace("@keyframes","@-webkit-keyframes");A=A.replace("::placeholder","::-webkit-input-placeholder")}}return A}function d(E){var B=E.replace(/^rgba\s?\(\s?(.*?)\s?\)$/,"$1").split(/,\s?/);var A=[];var D;for(var C=0;C0&&matchMedia(C.attr("media")).matches)||!C.attr("media")){l(this.href,C)}}else{e(C,C.html())}});function l(A,B){var G=document.location,F=G.protocol||"http:";var E=/^(\w+:)\/\/([^\/?#:]+)(?::(\d+))?/.exec(A.toLowerCase());var C=!!(E&&(E[1]!=F||E[2]!=G.hostname||(E[3]||(E[1]==="http:"?80:443))!=(G.port||(F==="http:"?80:443))));if(C){return}try{c("
").load(A,function(H){e(B,H)})}catch(D){}}if(c.cssHooks){for(property in o){if((newProperty=t(property))!==false){q(property,newProperty)}}for(property in k){if((newProperty=t(k[property]))!==false){q(k[property],newProperty)}}}function q(B,A){A=m(A);c.cssHooks[m(B)]={get:function(E,D,C){return E.style[A]},set:function(C,D){C.style[A]=D}}}};c(function(){if(window.cssFinalize!==false){c.cssFinalize()}})})(jQuery);window.matchMedia=window.matchMedia||(function(e,f){var c,a=e.documentElement,b=a.firstElementChild||a.firstChild,d=e.createElement("body"),g=e.createElement("div");g.id="mq-test-1";g.style.cssText="position:absolute;top:-100em";d.appendChild(g);return function(h){g.innerHTML='­';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document); \ No newline at end of file diff --git a/ajax/libs/css3finalize/package.json b/ajax/libs/css3finalize/package.json index 4d578d0e7194eb..14d0711e23f642 100644 --- a/ajax/libs/css3finalize/package.json +++ b/ajax/libs/css3finalize/package.json @@ -1,7 +1,7 @@ { "name": "css3finalize", "filename": "jquery.css3finalize.min.js", - "version": "1.43", + "version": "1.45", "description": "Skip vendor prefixes", "homepage": "https://github.com/codler/jQuery-Css3-Finalize", "keywords": [