From 4c6087fdf577f98a7f839212127d912d8284091b Mon Sep 17 00:00:00 2001 From: cloudhead Date: Thu, 14 Oct 2010 17:27:52 -0400 Subject: [PATCH] (dist) build 1.0.36 --- dist/{less-1.0.35.js => less-1.0.36.js} | 19 +++++++++---------- ...{less-1.0.35.min.js => less-1.0.36.min.js} | 10 +++++----- 2 files changed, 14 insertions(+), 15 deletions(-) rename dist/{less-1.0.35.js => less-1.0.36.js} (99%) rename dist/{less-1.0.35.min.js => less-1.0.36.min.js} (93%) diff --git a/dist/less-1.0.35.js b/dist/less-1.0.36.js similarity index 99% rename from dist/less-1.0.35.js rename to dist/less-1.0.36.js index 746ad36..b53268f 100644 --- a/dist/less-1.0.35.js +++ b/dist/less-1.0.36.js @@ -1,5 +1,5 @@ // -// LESS - Leaner CSS v1.0.35 +// LESS - Leaner CSS v1.0.36 // http://lesscss.org // // Copyright (c) 2010, Alexis Sellier @@ -2208,13 +2208,12 @@ var isFileProtocol = (location.protocol === 'file:' || location.protocol === 'chrome:' || location.protocol === 'resource:'); -less.env = less.env || - location.hostname == '127.0.0.1' || - location.hostname == '0.0.0.0' || - location.hostname == 'localhost' || - location.port.length > 0 || - isFileProtocol ? 'development' - : 'production'; +less.env = less.env || (location.hostname == '127.0.0.1' || + location.hostname == '0.0.0.0' || + location.hostname == 'localhost' || + location.port.length > 0 || + isFileProtocol ? 'development' + : 'production'); // Load styles asynchronously (default: false) // @@ -2354,7 +2353,7 @@ function loadStyleSheet(sheet, callback, reload, remaining) { } } }, function (status, url) { - throw new(Error)("Couldn't load " + url+ " (" + status + ")"); + throw new(Error)("Couldn't load " + url + " (" + status + ")"); }); } @@ -2425,7 +2424,7 @@ function xhr(url, callback, errback) { if (xhr.status === 0) { callback(xhr.responseText); } else { - errback(xhr.status); + errback(xhr.status, url); } } else if (async) { xhr.onreadystatechange = function () { diff --git a/dist/less-1.0.35.min.js b/dist/less-1.0.36.min.js similarity index 93% rename from dist/less-1.0.35.min.js rename to dist/less-1.0.36.min.js index 828fd36..d0071ca 100644 --- a/dist/less-1.0.35.min.js +++ b/dist/less-1.0.36.min.js @@ -1,5 +1,5 @@ // -// LESS - Leaner CSS v1.0.35 +// LESS - Leaner CSS v1.0.36 // http://lesscss.org // // Copyright (c) 2010, Alexis Sellier @@ -9,9 +9,9 @@ (i=a.slice(0,a.lastIndexOf("/")+1)+i);$(e.href,function(r,w){if(!d&&n&&(new Date(w)).valueOf()===(new Date(n.timestamp)).valueOf()){N(n.css,e);b(null,e,{local:true,remaining:g})}else try{(new o.Parser({optimization:o.optimization,paths:[i.replace(/[\w\.-]+$/,"")]})).parse(r,function(t,E){if(t)return Q(t,i);try{b(E,e,{local:false,lastModified:w,remaining:g});aa(document.getElementById("less-error-message:"+R(i)))}catch(O){Q(O,i)}})}catch(v){Q(v,i)}},function(r,w){throw new Error("Couldn't load "+w+ " ("+r+")");})}function R(e){return e.replace(/^[a-z]+:\/\/?[^\/]+/,"").replace(/^\//,"").replace(/\?.*$/,"").replace(/\.[^\.\/]+$/,"").replace(/[^\.\w-]+/g,"-").replace(/\./g,":")}function N(e,b,d){var g,a=b.href?b.href.replace(/\?.*$/,""):"",i="less:"+(b.title||R(a));if((g=document.getElementById(i))===null){g=document.createElement("style");g.type="text/css";g.media=b.media||"screen";g.id=i;document.getElementsByTagName("head")[0].appendChild(g)}if(g.styleSheet)try{g.styleSheet.cssText=e}catch(h){throw new Error("Couldn't reassign styleSheet.cssText."); }else(function(j){if(g.childNodes.length>0)g.firstChild.nodeValue!==j.nodeValue&&g.replaceChild(j,g.firstChild);else g.appendChild(j)})(document.createTextNode(e));if(d&&D){I("saving "+a+" to cache.");D.setItem(a,e);D.setItem(a+":timestamp",d)}}function $(e,b,d){function g(h,j,n){if(h.status>=200&&h.status<300)j(h.responseText,h.getResponseHeader("Last-Modified"));else typeof n==="function"&&n(h.status,e)}var a=ba(),i=P?false:o.async;typeof a.overrideMimeType==="function"&&a.overrideMimeType("text/css"); -a.open("GET",e,i);a.send(null);if(P)a.status===0?b(a.responseText):d(a.status);else if(i)a.onreadystatechange=function(){a.readyState==4&&g(a,b,d)};else g(a,b,d)}function ba(){if(y.XMLHttpRequest)return new XMLHttpRequest;else try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(e){I("browser doesn't support AJAX.");return null}}function aa(e){return e&&e.parentNode.removeChild(e)}function I(e){o.env=="development"&&typeof console!=="undefined"&&console.log("less: "+e)}function Q(e,b){var d="less-error-message:"+ -R(b),g=document.createElement("div"),a;g.id=d;g.className="less-error-message";b="

"+(e.message||"There is an error in your .less file")+'

'+b+" ";if(e.extract)b+="on line "+e.line+", column "+(e.column+1)+":

"+''.replace(/\[(-?\d)\]/g,function(i,h){return parseInt(e.line)+parseInt(h)||""}).replace(/\{(\d)\}/g, -function(i,h){return e.extract[parseInt(h)]||""}).replace(/\{current\}/,e.extract[1].slice(0,e.column)+''+e.extract[1].slice(e.column)+"");g.innerHTML=b;N(".less-error-message ul, .less-error-message li {\nlist-style-type: none;\nmargin-right: 15px;\npadding: 4px 0;\nmargin: 0;\n}\n.less-error-message label {\nfont-size: 12px;\nmargin-right: 15px;\npadding: 4px 0;\ncolor: #cc7777;\n}\n.less-error-message pre {\ncolor: #ee4444;\npadding: 4px 0;\nmargin: 0;\ndisplay: inline-block;\n}\n.less-error-message pre.ctx {\ncolor: #dd4444;\n}\n.less-error-message h3 {\nfont-size: 20px;\nfont-weight: bold;\npadding: 15px 0 5px 0;\nmargin: 0;\n}\n.less-error-message a {\ncolor: #10a\n}\n.less-error-message .error {\ncolor: red;\nfont-weight: bold;\npadding-bottom: 2px;\nborder-bottom: 1px dashed red;\n}", +a.open("GET",e,i);a.send(null);if(P)a.status===0?b(a.responseText):d(a.status,e);else if(i)a.onreadystatechange=function(){a.readyState==4&&g(a,b,d)};else g(a,b,d)}function ba(){if(y.XMLHttpRequest)return new XMLHttpRequest;else try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(e){I("browser doesn't support AJAX.");return null}}function aa(e){return e&&e.parentNode.removeChild(e)}function I(e){o.env=="development"&&typeof console!=="undefined"&&console.log("less: "+e)}function Q(e,b){var d= +"less-error-message:"+R(b),g=document.createElement("div"),a;g.id=d;g.className="less-error-message";b="

"+(e.message||"There is an error in your .less file")+'

'+b+" ";if(e.extract)b+="on line "+e.line+", column "+(e.column+1)+":

"+''.replace(/\[(-?\d)\]/g,function(i,h){return parseInt(e.line)+parseInt(h)|| +""}).replace(/\{(\d)\}/g,function(i,h){return e.extract[parseInt(h)]||""}).replace(/\{current\}/,e.extract[1].slice(0,e.column)+''+e.extract[1].slice(e.column)+"");g.innerHTML=b;N(".less-error-message ul, .less-error-message li {\nlist-style-type: none;\nmargin-right: 15px;\npadding: 4px 0;\nmargin: 0;\n}\n.less-error-message label {\nfont-size: 12px;\nmargin-right: 15px;\npadding: 4px 0;\ncolor: #cc7777;\n}\n.less-error-message pre {\ncolor: #ee4444;\npadding: 4px 0;\nmargin: 0;\ndisplay: inline-block;\n}\n.less-error-message pre.ctx {\ncolor: #dd4444;\n}\n.less-error-message h3 {\nfont-size: 20px;\nfont-weight: bold;\npadding: 15px 0 5px 0;\nmargin: 0;\n}\n.less-error-message a {\ncolor: #10a\n}\n.less-error-message .error {\ncolor: red;\nfont-weight: bold;\npadding-bottom: 2px;\nborder-bottom: 1px dashed red;\n}", {title:"error-message"});g.style.cssText="font-family: Arial, sans-serif;border: 1px solid #e00;background-color: #eee;border-radius: 5px;-webkit-border-radius: 5px;-moz-border-radius: 5px;color: #e00;padding: 15px;margin-bottom: 15px";if(o.env=="development")a=setInterval(function(){if(document.body){document.getElementById(d)?document.body.replaceChild(g,document.getElementById(d)):document.body.insertBefore(g,document.body.firstChild);clearInterval(a)}},10)}if(!Array.isArray)Array.isArray=function(e){return Object.prototype.toString.call(e)=== "[object Array]"||e instanceof Array};if(!Array.prototype.forEach)Array.prototype.forEach=function(e,b){for(var d=this.length>>>0,g=0;g>>0,g=new Array(d),a=0;a>>0,d=0;if(b===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var g=arguments[1];else{do{if(d in this){g=this[d++];break}if(++d>=b)throw new TypeError;}while(1)}for(;d=d)return-1;if(b<0)b+=d;for(;b0&&typeof y!=="undefined")b.value=d[0]+(b.value.charAt(0)==="/"?b.value.slice(1):b.value);this.value=b;this.paths=d};e.URL.prototype={toCSS:function(){return"url("+this.value.toCSS()+")"},eval:function(b){return new e.URL(this.value.eval(b),this.paths)}}})(q("less/tree"));(function(e){e.Value=function(b){this.value=b;this.is="value"};e.Value.prototype={eval:function(b){return this.value.length===1?this.value[0].eval(b): new e.Value(this.value.map(function(d){return d.eval(b)}))},toCSS:function(b){return this.value.map(function(d){return d.toCSS(b)}).join(b.compress?",":", ")}}})(q("less/tree"));(function(e){e.Variable=function(b,d){this.name=b;this.index=d};e.Variable.prototype={eval:function(b){var d,g,a=this.name;if(d=e.find(b.frames,function(i){if(g=i.variable(a))return g.value.eval(b)}))return d;else throw{message:"variable "+this.name+" is undefined",index:this.index};}}})(q("less/tree"));q("less/tree").find= -function(e,b){for(var d=0,g;d0||P?"development":"production";o.async=false;o.poll=o.poll||(P?1E3:1500);o.watch=function(){return this.watchMode=true};o.unwatch=function(){return this.watchMode=false};if(o.env==="development"){o.optimization= +function(e,b){for(var d=0,g;d0||P?"development":"production");o.async=false;o.poll=o.poll||(P?1E3:1500);o.watch=function(){return this.watchMode=true};o.unwatch=function(){return this.watchMode=false};if(o.env==="development"){o.optimization= 0;/!watch/.test(location.hash)&&o.watch();o.watchTimer=setInterval(function(){o.watchMode&&W(function(e,b,d){e&&N(e.toCSS(),b,d.lastModified)})},o.poll)}else o.optimization=3;var D;try{D=typeof y.localStorage==="undefined"?null:y.localStorage}catch(ca){D=null}var M=document.getElementsByTagName("link"),V=/^text\/(x-)?less$/;o.sheets=[];for(var J=0;J