(dist) build 1.0.36

nohash
cloudhead 14 years ago
parent f129522a92
commit 4c6087fdf5

@ -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 () {

@ -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="<h3>"+(e.message||"There is an error in your .less file")+'</h3><p><a href="'+b+'">'+b+"</a> ";if(e.extract)b+="on line "+e.line+", column "+(e.column+1)+":</p>"+'<ul>\n<li><label>[-1]</label><pre class="ctx">{0}</pre></li>\n<li><label>[0]</label><pre>{current}</pre></li>\n<li><label>[1]</label><pre class="ctx">{2}</pre></li>\n</ul>'.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)+'<span class="error">'+e.extract[1].slice(e.column)+"</span>");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="<h3>"+(e.message||"There is an error in your .less file")+'</h3><p><a href="'+b+'">'+b+"</a> ";if(e.extract)b+="on line "+e.line+", column "+(e.column+1)+":</p>"+'<ul>\n<li><label>[-1]</label><pre class="ctx">{0}</pre></li>\n<li><label>[0]</label><pre>{current}</pre></li>\n<li><label>[1]</label><pre class="ctx">{2}</pre></li>\n</ul>'.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)+'<span class="error">'+e.extract[1].slice(e.column)+"</span>");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<d;g++)g in this&&e.call(b,this[g],g,this)};if(!Array.prototype.map)Array.prototype.map=function(e,b){for(var d=this.length>>>0,g=new Array(d),a=0;a<d;a++)if(a in this)g[a]=e.call(b,this[a],a,this);return g};if(!Array.prototype.filter)Array.prototype.filter=function(e,b){for(var d=[],g=0;g<this.length;g++)e.call(b,this[g])&&d.push(this[g]);return d};if(!Array.prototype.reduce)Array.prototype.reduce=
function(e){var b=this.length>>>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<b;d++)if(d in this)g=e.call(null,g,this[d],d,this);return g};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(e,b){var d=this.length;b=b||0;if(!d)return-1;if(b>=d)return-1;if(b<0)b+=d;for(;b<d;b++)if(Object.prototype.hasOwnProperty.call(this,b))if(e===this[b])return b;return-1};
@ -62,6 +62,6 @@ e.Directive)i.push(b.toCSS(h,d));else if(b instanceof e.Comment)b.silent||(this.
"}":"\n}\n"))}g.push(i);return g.join("")+(d.compress?"\n":"")}}})(q("less/tree"));(function(e){e.Selector=function(b){this.elements=b;if(this.elements[0].combinator.value==="")this.elements[0].combinator.value=" "};e.Selector.prototype.match=function(b){return this.elements[0].value===b.elements[0].value?true:false};e.Selector.prototype.toCSS=function(b){if(this._css)return this._css;return this._css=this.elements.map(function(d){return typeof d==="string"?" "+d.trim():d.toCSS(b)}).join("")}})(q("less/tree"));
(function(e){e.URL=function(b,d){if(!/^(?:https?:\/|file:\/)?\//.test(b.value)&&d.length>0&&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;d<e.length;d++)if(g=b.call(e,e[d]))return g;return null};var P=location.protocol==="file:"||location.protocol==="chrome:"||location.protocol==="resource:";o.env=o.env||location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.port.length>0||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;d<e.length;d++)if(g=b.call(e,e[d]))return g;return null};var P=location.protocol==="file:"||location.protocol==="chrome:"||location.protocol==="resource:";o.env=o.env||(location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.port.length>0||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<M.length;J++)if(M[J].rel==="stylesheet/less"||M[J].rel.match(/stylesheet/)&&M[J].type.match(V))o.sheets.push(M[J]);o.refresh=function(e){var b=endTime=
new Date;W(function(d,g,a){if(a.local)I("loading "+g.href+" from cache.");else{I("parsed "+g.href+" successfully.");N(d.toCSS(),g,a.lastModified)}I("css for "+g.href+" generated in "+(new Date-endTime)+"ms");a.remaining===0&&I("css generated in "+(new Date-b)+"ms");endTime=new Date},e);U()};o.refreshStyles=U;o.refresh(o.env==="development")})(window);
Loading…
Cancel
Save