mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
Added node-modules
This commit is contained in:
46
node_modules/less/test/browser-test-prepare.js
generated
vendored
Normal file
46
node_modules/less/test/browser-test-prepare.js
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
var path = require('path'),
|
||||
fs = require('fs'),
|
||||
sys = require('util');
|
||||
|
||||
var readDirFilesSync = function(dir, regex, callback) {
|
||||
fs.readdirSync(dir).forEach(function (file) {
|
||||
if (! regex.test(file)) { return; }
|
||||
callback(file);
|
||||
});
|
||||
}
|
||||
|
||||
var createTestRunnerPage = function(dir, exclude, testSuiteName, dir2) {
|
||||
var output = '<html><head>\n';
|
||||
|
||||
readDirFilesSync(path.join("test", dir, 'less', dir2 || ""), /\.less$/, function (file) {
|
||||
var name = path.basename(file, '.less'),
|
||||
id = (dir ? dir + '-' : "") + 'less-' + (dir2 ? dir2 + "-" : "") + name;
|
||||
|
||||
if (exclude && name.match(exclude)) { return; }
|
||||
|
||||
output += '<link id="original-less:' + id + '" rel="stylesheet/less" type="text/css" href="/' + path.join(dir, 'less', dir2 || "", name) + '.less' +'">\n';
|
||||
output += '<link id="expected-less:' + id + '" rel="stylesheet" type="text/css" href="/' + path.join(dir, 'css', dir2 || "", name) + '.css' + '">\n';
|
||||
});
|
||||
|
||||
output += String(fs.readFileSync(path.join('test/browser', 'template.htm'))).replace("{runner-name}", testSuiteName);
|
||||
|
||||
fs.writeFileSync(path.join('test/browser', 'test-runner-'+testSuiteName+'.htm'), output);
|
||||
};
|
||||
|
||||
var removeFiles = function(dir, regex) {
|
||||
readDirFilesSync(dir, regex, function(file) {
|
||||
fs.unlinkSync(path.join(dir, file), function() {
|
||||
console.log("Failed to delete " + file);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
removeFiles("test/browser", /test-runner-[a-zA-Z-]*\.htm$/);
|
||||
createTestRunnerPage("", /javascript|urls/, "main");
|
||||
createTestRunnerPage("", null, "legacy", "legacy");
|
||||
createTestRunnerPage("", /javascript/, "errors", "errors");
|
||||
createTestRunnerPage("browser", null, "browser");
|
||||
createTestRunnerPage("browser", null, "relative-urls", "relative-urls");
|
||||
createTestRunnerPage("browser", null, "rootpath", "rootpath");
|
||||
createTestRunnerPage("browser", null, "rootpath-relative", "rootpath-relative");
|
||||
createTestRunnerPage("browser", null, "production");
|
||||
126
node_modules/less/test/browser/common.js
generated
vendored
Normal file
126
node_modules/less/test/browser/common.js
generated
vendored
Normal file
@ -0,0 +1,126 @@
|
||||
/*if not async then phantomjs fails to run the webserver and the test concurrently*/
|
||||
var less = { async: true, strictMath: true };
|
||||
|
||||
/* record log messages for testing */
|
||||
var logMessages = [],
|
||||
realConsoleLog = console.log;
|
||||
console.log = function(msg) {
|
||||
logMessages.push(msg);
|
||||
realConsoleLog.call(console, msg);
|
||||
};
|
||||
|
||||
var testLessEqualsInDocument = function() {
|
||||
testLessInDocument(testSheet);
|
||||
};
|
||||
|
||||
var testLessErrorsInDocument = function() {
|
||||
testLessInDocument(testErrorSheet);
|
||||
};
|
||||
|
||||
var testLessInDocument = function(testFunc) {
|
||||
var links = document.getElementsByTagName('link'),
|
||||
typePattern = /^text\/(x-)?less$/;
|
||||
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
if (links[i].rel === 'stylesheet/less' || (links[i].rel.match(/stylesheet/) &&
|
||||
(links[i].type.match(typePattern)))) {
|
||||
testFunc(links[i]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var testSheet = function(sheet) {
|
||||
it(sheet.id + " should match the expected output", function() {
|
||||
var lessOutputId = sheet.id.replace("original-", ""),
|
||||
expectedOutputId = "expected-" + lessOutputId,
|
||||
lessOutput = document.getElementById(lessOutputId).innerText,
|
||||
expectedOutputHref = document.getElementById(expectedOutputId).href,
|
||||
expectedOutput = loadFile(expectedOutputHref);
|
||||
|
||||
waitsFor(function() {
|
||||
return expectedOutput.loaded;
|
||||
}, "failed to load expected outout", 10000);
|
||||
|
||||
runs(function() {
|
||||
// use sheet to do testing
|
||||
expect(lessOutput).toEqual(expectedOutput.text);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
var testErrorSheet = function(sheet) {
|
||||
it(sheet.id + " should match an error", function() {
|
||||
var lessHref = sheet.href,
|
||||
id = sheet.id.replace(/^original-less:/, "less-error-message:"),
|
||||
errorHref = lessHref.replace(/.less$/, ".txt"),
|
||||
errorFile = loadFile(errorHref),
|
||||
actualErrorElement = document.getElementById(id),
|
||||
actualErrorMsg;
|
||||
|
||||
describe("the error", function() {
|
||||
expect(actualErrorElement).not.toBe(null);
|
||||
});
|
||||
|
||||
actualErrorMsg = actualErrorElement.innerText
|
||||
.replace(/\n\d+/g, function(lineNo) { return lineNo + " "; })
|
||||
.replace(/\n\s*in /g, " in ")
|
||||
.replace("\n\n", "\n");
|
||||
|
||||
waitsFor(function() {
|
||||
return errorFile.loaded;
|
||||
}, "failed to load expected outout", 10000);
|
||||
|
||||
runs(function() {
|
||||
var errorTxt = errorFile.text
|
||||
.replace("{path}", "")
|
||||
.replace("{pathrel}", "")
|
||||
.replace("{pathhref}", "http://localhost:8081/less/errors/")
|
||||
.replace("{404status}", " (404)");
|
||||
expect(actualErrorMsg).toEqual(errorTxt);
|
||||
if (errorTxt == actualErrorMsg) {
|
||||
actualErrorElement.style.display = "none";
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
var loadFile = function(href) {
|
||||
var request = new XMLHttpRequest(),
|
||||
response = { loaded: false, text: ""};
|
||||
request.open('GET', href, true);
|
||||
request.onload = function(e) {
|
||||
response.text = request.response.replace(/\r/g, "");
|
||||
response.loaded = true;
|
||||
}
|
||||
request.send();
|
||||
return response;
|
||||
};
|
||||
|
||||
(function() {
|
||||
var jasmineEnv = jasmine.getEnv();
|
||||
jasmineEnv.updateInterval = 1000;
|
||||
|
||||
var htmlReporter = new jasmine.HtmlReporter();
|
||||
|
||||
jasmineEnv.addReporter(htmlReporter);
|
||||
|
||||
jasmineEnv.specFilter = function(spec) {
|
||||
return htmlReporter.specFilter(spec);
|
||||
};
|
||||
|
||||
var currentWindowOnload = window.onload;
|
||||
|
||||
window.onload = function() {
|
||||
if (currentWindowOnload) {
|
||||
currentWindowOnload();
|
||||
}
|
||||
execJasmine();
|
||||
};
|
||||
|
||||
function execJasmine() {
|
||||
setTimeout(function() {
|
||||
jasmineEnv.execute();
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
})();
|
||||
36
node_modules/less/test/browser/css/relative-urls/urls.css
generated
vendored
Normal file
36
node_modules/less/test/browser/css/relative-urls/urls.css
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
@import "http://localhost:8081/browser/less/imports/modify-this.css";
|
||||
|
||||
@import "http://localhost:8081/browser/less/imports/modify-again.css";
|
||||
.modify {
|
||||
my-url: url("http://localhost:8081/browser/less/imports/a.png");
|
||||
}
|
||||
.modify {
|
||||
my-url: url("http://localhost:8081/browser/less/imports/b.png");
|
||||
}
|
||||
@font-face {
|
||||
src: url("/fonts/garamond-pro.ttf");
|
||||
src: local(Futura-Medium), url(http://localhost:8081/browser/less/relative-urls/fonts.svg#MyGeometricModern) format("svg");
|
||||
}
|
||||
#shorthands {
|
||||
background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
|
||||
}
|
||||
#misc {
|
||||
background-image: url(http://localhost:8081/browser/less/relative-urls/images/image.jpg);
|
||||
}
|
||||
#data-uri {
|
||||
background: url(data:image/png;charset=utf-8;base64,
|
||||
kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
|
||||
k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
|
||||
kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
|
||||
background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
|
||||
background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
|
||||
}
|
||||
#svg-data-uri {
|
||||
background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
|
||||
}
|
||||
.comma-delimited {
|
||||
background: url(http://localhost:8081/browser/less/relative-urls/bg.jpg) no-repeat, url(http://localhost:8081/browser/less/relative-urls/bg.png) repeat-x top left, url(http://localhost:8081/browser/less/relative-urls/bg);
|
||||
}
|
||||
.values {
|
||||
url: url('http://localhost:8081/browser/less/relative-urls/Trebuchet');
|
||||
}
|
||||
36
node_modules/less/test/browser/css/rootpath-relative/urls.css
generated
vendored
Normal file
36
node_modules/less/test/browser/css/rootpath-relative/urls.css
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
@import "https://www.github.com/cloudhead/imports/modify-this.css";
|
||||
|
||||
@import "https://www.github.com/cloudhead/imports/modify-again.css";
|
||||
.modify {
|
||||
my-url: url("https://www.github.com/cloudhead/imports/a.png");
|
||||
}
|
||||
.modify {
|
||||
my-url: url("https://www.github.com/cloudhead/imports/b.png");
|
||||
}
|
||||
@font-face {
|
||||
src: url("/fonts/garamond-pro.ttf");
|
||||
src: local(Futura-Medium), url(https://www.github.com/cloudhead/less.js/fonts.svg#MyGeometricModern) format("svg");
|
||||
}
|
||||
#shorthands {
|
||||
background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
|
||||
}
|
||||
#misc {
|
||||
background-image: url(https://www.github.com/cloudhead/less.js/images/image.jpg);
|
||||
}
|
||||
#data-uri {
|
||||
background: url(data:image/png;charset=utf-8;base64,
|
||||
kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
|
||||
k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
|
||||
kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
|
||||
background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
|
||||
background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
|
||||
}
|
||||
#svg-data-uri {
|
||||
background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
|
||||
}
|
||||
.comma-delimited {
|
||||
background: url(https://www.github.com/cloudhead/less.js/bg.jpg) no-repeat, url(https://www.github.com/cloudhead/less.js/bg.png) repeat-x top left, url(https://www.github.com/cloudhead/less.js/bg);
|
||||
}
|
||||
.values {
|
||||
url: url('https://www.github.com/cloudhead/less.js/Trebuchet');
|
||||
}
|
||||
36
node_modules/less/test/browser/css/rootpath/urls.css
generated
vendored
Normal file
36
node_modules/less/test/browser/css/rootpath/urls.css
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
@import "https://www.github.com/modify-this.css";
|
||||
|
||||
@import "https://www.github.com/modify-again.css";
|
||||
.modify {
|
||||
my-url: url("https://www.github.com/a.png");
|
||||
}
|
||||
.modify {
|
||||
my-url: url("https://www.github.com/b.png");
|
||||
}
|
||||
@font-face {
|
||||
src: url("/fonts/garamond-pro.ttf");
|
||||
src: local(Futura-Medium), url(https://www.github.com/fonts.svg#MyGeometricModern) format("svg");
|
||||
}
|
||||
#shorthands {
|
||||
background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
|
||||
}
|
||||
#misc {
|
||||
background-image: url(https://www.github.com/images/image.jpg);
|
||||
}
|
||||
#data-uri {
|
||||
background: url(data:image/png;charset=utf-8;base64,
|
||||
kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
|
||||
k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
|
||||
kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
|
||||
background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
|
||||
background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
|
||||
}
|
||||
#svg-data-uri {
|
||||
background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
|
||||
}
|
||||
.comma-delimited {
|
||||
background: url(https://www.github.com/bg.jpg) no-repeat, url(https://www.github.com/bg.png) repeat-x top left, url(https://www.github.com/bg);
|
||||
}
|
||||
.values {
|
||||
url: url('https://www.github.com/Trebuchet');
|
||||
}
|
||||
49
node_modules/less/test/browser/css/urls.css
generated
vendored
Normal file
49
node_modules/less/test/browser/css/urls.css
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
@import "http://localhost:8081/browser/less/modify-this.css";
|
||||
|
||||
@import "http://localhost:8081/browser/less/modify-again.css";
|
||||
.modify {
|
||||
my-url: url("http://localhost:8081/browser/less/a.png");
|
||||
}
|
||||
.modify {
|
||||
my-url: url("http://localhost:8081/browser/less/b.png");
|
||||
}
|
||||
@font-face {
|
||||
src: url("/fonts/garamond-pro.ttf");
|
||||
src: local(Futura-Medium), url(http://localhost:8081/browser/less/fonts.svg#MyGeometricModern) format("svg");
|
||||
}
|
||||
#shorthands {
|
||||
background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
|
||||
}
|
||||
#misc {
|
||||
background-image: url(http://localhost:8081/browser/less/images/image.jpg);
|
||||
}
|
||||
#data-uri {
|
||||
background: url(data:image/png;charset=utf-8;base64,
|
||||
kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
|
||||
k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
|
||||
kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
|
||||
background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
|
||||
background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
|
||||
}
|
||||
#svg-data-uri {
|
||||
background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
|
||||
}
|
||||
.comma-delimited {
|
||||
background: url(http://localhost:8081/browser/less/bg.jpg) no-repeat, url(http://localhost:8081/browser/less/bg.png) repeat-x top left, url(http://localhost:8081/browser/less/bg);
|
||||
}
|
||||
.values {
|
||||
url: url('http://localhost:8081/browser/less/Trebuchet');
|
||||
}
|
||||
#data-uri {
|
||||
uri: url('http://localhost:8081/browser/less/../../data/image.jpg');
|
||||
}
|
||||
#data-uri-guess {
|
||||
uri: url('http://localhost:8081/browser/less/../../data/image.jpg');
|
||||
}
|
||||
#data-uri-ascii {
|
||||
uri-1: url('http://localhost:8081/browser/less/../../data/page.html');
|
||||
uri-2: url('http://localhost:8081/browser/less/../../data/page.html');
|
||||
}
|
||||
#data-uri-toobig {
|
||||
uri: url('http://localhost:8081/browser/less/../../data/data-uri-fail.png');
|
||||
}
|
||||
681
node_modules/less/test/browser/jasmine-html.js
generated
vendored
Normal file
681
node_modules/less/test/browser/jasmine-html.js
generated
vendored
Normal file
@ -0,0 +1,681 @@
|
||||
jasmine.HtmlReporterHelpers = {};
|
||||
|
||||
jasmine.HtmlReporterHelpers.createDom = function(type, attrs, childrenVarArgs) {
|
||||
var el = document.createElement(type);
|
||||
|
||||
for (var i = 2; i < arguments.length; i++) {
|
||||
var child = arguments[i];
|
||||
|
||||
if (typeof child === 'string') {
|
||||
el.appendChild(document.createTextNode(child));
|
||||
} else {
|
||||
if (child) {
|
||||
el.appendChild(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (var attr in attrs) {
|
||||
if (attr == "className") {
|
||||
el[attr] = attrs[attr];
|
||||
} else {
|
||||
el.setAttribute(attr, attrs[attr]);
|
||||
}
|
||||
}
|
||||
|
||||
return el;
|
||||
};
|
||||
|
||||
jasmine.HtmlReporterHelpers.getSpecStatus = function(child) {
|
||||
var results = child.results();
|
||||
var status = results.passed() ? 'passed' : 'failed';
|
||||
if (results.skipped) {
|
||||
status = 'skipped';
|
||||
}
|
||||
|
||||
return status;
|
||||
};
|
||||
|
||||
jasmine.HtmlReporterHelpers.appendToSummary = function(child, childElement) {
|
||||
var parentDiv = this.dom.summary;
|
||||
var parentSuite = (typeof child.parentSuite == 'undefined') ? 'suite' : 'parentSuite';
|
||||
var parent = child[parentSuite];
|
||||
|
||||
if (parent) {
|
||||
if (typeof this.views.suites[parent.id] == 'undefined') {
|
||||
this.views.suites[parent.id] = new jasmine.HtmlReporter.SuiteView(parent, this.dom, this.views);
|
||||
}
|
||||
parentDiv = this.views.suites[parent.id].element;
|
||||
}
|
||||
|
||||
parentDiv.appendChild(childElement);
|
||||
};
|
||||
|
||||
|
||||
jasmine.HtmlReporterHelpers.addHelpers = function(ctor) {
|
||||
for(var fn in jasmine.HtmlReporterHelpers) {
|
||||
ctor.prototype[fn] = jasmine.HtmlReporterHelpers[fn];
|
||||
}
|
||||
};
|
||||
|
||||
jasmine.HtmlReporter = function(_doc) {
|
||||
var self = this;
|
||||
var doc = _doc || window.document;
|
||||
|
||||
var reporterView;
|
||||
|
||||
var dom = {};
|
||||
|
||||
// Jasmine Reporter Public Interface
|
||||
self.logRunningSpecs = false;
|
||||
|
||||
self.reportRunnerStarting = function(runner) {
|
||||
var specs = runner.specs() || [];
|
||||
|
||||
if (specs.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
createReporterDom(runner.env.versionString());
|
||||
doc.body.appendChild(dom.reporter);
|
||||
setExceptionHandling();
|
||||
|
||||
reporterView = new jasmine.HtmlReporter.ReporterView(dom);
|
||||
reporterView.addSpecs(specs, self.specFilter);
|
||||
};
|
||||
|
||||
self.reportRunnerResults = function(runner) {
|
||||
reporterView && reporterView.complete();
|
||||
};
|
||||
|
||||
self.reportSuiteResults = function(suite) {
|
||||
reporterView.suiteComplete(suite);
|
||||
};
|
||||
|
||||
self.reportSpecStarting = function(spec) {
|
||||
if (self.logRunningSpecs) {
|
||||
self.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
|
||||
}
|
||||
};
|
||||
|
||||
self.reportSpecResults = function(spec) {
|
||||
reporterView.specComplete(spec);
|
||||
};
|
||||
|
||||
self.log = function() {
|
||||
var console = jasmine.getGlobal().console;
|
||||
if (console && console.log) {
|
||||
if (console.log.apply) {
|
||||
console.log.apply(console, arguments);
|
||||
} else {
|
||||
console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
self.specFilter = function(spec) {
|
||||
if (!focusedSpecName()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return spec.getFullName().indexOf(focusedSpecName()) === 0;
|
||||
};
|
||||
|
||||
return self;
|
||||
|
||||
function focusedSpecName() {
|
||||
var specName;
|
||||
|
||||
(function memoizeFocusedSpec() {
|
||||
if (specName) {
|
||||
return;
|
||||
}
|
||||
|
||||
var paramMap = [];
|
||||
var params = jasmine.HtmlReporter.parameters(doc);
|
||||
|
||||
for (var i = 0; i < params.length; i++) {
|
||||
var p = params[i].split('=');
|
||||
paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
|
||||
}
|
||||
|
||||
specName = paramMap.spec;
|
||||
})();
|
||||
|
||||
return specName;
|
||||
}
|
||||
|
||||
function createReporterDom(version) {
|
||||
dom.reporter = self.createDom('div', { id: 'HTMLReporter', className: 'jasmine_reporter' },
|
||||
dom.banner = self.createDom('div', { className: 'banner' },
|
||||
self.createDom('span', { className: 'title' }, "Jasmine "),
|
||||
self.createDom('span', { className: 'version' }, version)),
|
||||
|
||||
dom.symbolSummary = self.createDom('ul', {className: 'symbolSummary'}),
|
||||
dom.alert = self.createDom('div', {className: 'alert'},
|
||||
self.createDom('span', { className: 'exceptions' },
|
||||
self.createDom('label', { className: 'label', 'for': 'no_try_catch' }, 'No try/catch'),
|
||||
self.createDom('input', { id: 'no_try_catch', type: 'checkbox' }))),
|
||||
dom.results = self.createDom('div', {className: 'results'},
|
||||
dom.summary = self.createDom('div', { className: 'summary' }),
|
||||
dom.details = self.createDom('div', { id: 'details' }))
|
||||
);
|
||||
}
|
||||
|
||||
function noTryCatch() {
|
||||
return window.location.search.match(/catch=false/);
|
||||
}
|
||||
|
||||
function searchWithCatch() {
|
||||
var params = jasmine.HtmlReporter.parameters(window.document);
|
||||
var removed = false;
|
||||
var i = 0;
|
||||
|
||||
while (!removed && i < params.length) {
|
||||
if (params[i].match(/catch=/)) {
|
||||
params.splice(i, 1);
|
||||
removed = true;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (jasmine.CATCH_EXCEPTIONS) {
|
||||
params.push("catch=false");
|
||||
}
|
||||
|
||||
return params.join("&");
|
||||
}
|
||||
|
||||
function setExceptionHandling() {
|
||||
var chxCatch = document.getElementById('no_try_catch');
|
||||
|
||||
if (noTryCatch()) {
|
||||
chxCatch.setAttribute('checked', true);
|
||||
jasmine.CATCH_EXCEPTIONS = false;
|
||||
}
|
||||
chxCatch.onclick = function() {
|
||||
window.location.search = searchWithCatch();
|
||||
};
|
||||
}
|
||||
};
|
||||
jasmine.HtmlReporter.parameters = function(doc) {
|
||||
var paramStr = doc.location.search.substring(1);
|
||||
var params = [];
|
||||
|
||||
if (paramStr.length > 0) {
|
||||
params = paramStr.split('&');
|
||||
}
|
||||
return params;
|
||||
}
|
||||
jasmine.HtmlReporter.sectionLink = function(sectionName) {
|
||||
var link = '?';
|
||||
var params = [];
|
||||
|
||||
if (sectionName) {
|
||||
params.push('spec=' + encodeURIComponent(sectionName));
|
||||
}
|
||||
if (!jasmine.CATCH_EXCEPTIONS) {
|
||||
params.push("catch=false");
|
||||
}
|
||||
if (params.length > 0) {
|
||||
link += params.join("&");
|
||||
}
|
||||
|
||||
return link;
|
||||
};
|
||||
jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter);
|
||||
jasmine.HtmlReporter.ReporterView = function(dom) {
|
||||
this.startedAt = new Date();
|
||||
this.runningSpecCount = 0;
|
||||
this.completeSpecCount = 0;
|
||||
this.passedCount = 0;
|
||||
this.failedCount = 0;
|
||||
this.skippedCount = 0;
|
||||
|
||||
this.createResultsMenu = function() {
|
||||
this.resultsMenu = this.createDom('span', {className: 'resultsMenu bar'},
|
||||
this.summaryMenuItem = this.createDom('a', {className: 'summaryMenuItem', href: "#"}, '0 specs'),
|
||||
' | ',
|
||||
this.detailsMenuItem = this.createDom('a', {className: 'detailsMenuItem', href: "#"}, '0 failing'));
|
||||
|
||||
this.summaryMenuItem.onclick = function() {
|
||||
dom.reporter.className = dom.reporter.className.replace(/ showDetails/g, '');
|
||||
};
|
||||
|
||||
this.detailsMenuItem.onclick = function() {
|
||||
showDetails();
|
||||
};
|
||||
};
|
||||
|
||||
this.addSpecs = function(specs, specFilter) {
|
||||
this.totalSpecCount = specs.length;
|
||||
|
||||
this.views = {
|
||||
specs: {},
|
||||
suites: {}
|
||||
};
|
||||
|
||||
for (var i = 0; i < specs.length; i++) {
|
||||
var spec = specs[i];
|
||||
this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom, this.views);
|
||||
if (specFilter(spec)) {
|
||||
this.runningSpecCount++;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.specComplete = function(spec) {
|
||||
this.completeSpecCount++;
|
||||
|
||||
if (isUndefined(this.views.specs[spec.id])) {
|
||||
this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom);
|
||||
}
|
||||
|
||||
var specView = this.views.specs[spec.id];
|
||||
|
||||
switch (specView.status()) {
|
||||
case 'passed':
|
||||
this.passedCount++;
|
||||
break;
|
||||
|
||||
case 'failed':
|
||||
this.failedCount++;
|
||||
break;
|
||||
|
||||
case 'skipped':
|
||||
this.skippedCount++;
|
||||
break;
|
||||
}
|
||||
|
||||
specView.refresh();
|
||||
this.refresh();
|
||||
};
|
||||
|
||||
this.suiteComplete = function(suite) {
|
||||
var suiteView = this.views.suites[suite.id];
|
||||
if (isUndefined(suiteView)) {
|
||||
return;
|
||||
}
|
||||
suiteView.refresh();
|
||||
};
|
||||
|
||||
this.refresh = function() {
|
||||
|
||||
if (isUndefined(this.resultsMenu)) {
|
||||
this.createResultsMenu();
|
||||
}
|
||||
|
||||
// currently running UI
|
||||
if (isUndefined(this.runningAlert)) {
|
||||
this.runningAlert = this.createDom('a', { href: jasmine.HtmlReporter.sectionLink(), className: "runningAlert bar" });
|
||||
dom.alert.appendChild(this.runningAlert);
|
||||
}
|
||||
this.runningAlert.innerHTML = "Running " + this.completeSpecCount + " of " + specPluralizedFor(this.totalSpecCount);
|
||||
|
||||
// skipped specs UI
|
||||
if (isUndefined(this.skippedAlert)) {
|
||||
this.skippedAlert = this.createDom('a', { href: jasmine.HtmlReporter.sectionLink(), className: "skippedAlert bar" });
|
||||
}
|
||||
|
||||
this.skippedAlert.innerHTML = "Skipping " + this.skippedCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all";
|
||||
|
||||
if (this.skippedCount === 1 && isDefined(dom.alert)) {
|
||||
dom.alert.appendChild(this.skippedAlert);
|
||||
}
|
||||
|
||||
// passing specs UI
|
||||
if (isUndefined(this.passedAlert)) {
|
||||
this.passedAlert = this.createDom('span', { href: jasmine.HtmlReporter.sectionLink(), className: "passingAlert bar" });
|
||||
}
|
||||
this.passedAlert.innerHTML = "Passing " + specPluralizedFor(this.passedCount);
|
||||
|
||||
// failing specs UI
|
||||
if (isUndefined(this.failedAlert)) {
|
||||
this.failedAlert = this.createDom('span', {href: "?", className: "failingAlert bar"});
|
||||
}
|
||||
this.failedAlert.innerHTML = "Failing " + specPluralizedFor(this.failedCount);
|
||||
|
||||
if (this.failedCount === 1 && isDefined(dom.alert)) {
|
||||
dom.alert.appendChild(this.failedAlert);
|
||||
dom.alert.appendChild(this.resultsMenu);
|
||||
}
|
||||
|
||||
// summary info
|
||||
this.summaryMenuItem.innerHTML = "" + specPluralizedFor(this.runningSpecCount);
|
||||
this.detailsMenuItem.innerHTML = "" + this.failedCount + " failing";
|
||||
};
|
||||
|
||||
this.complete = function() {
|
||||
dom.alert.removeChild(this.runningAlert);
|
||||
|
||||
this.skippedAlert.innerHTML = "Ran " + this.runningSpecCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all";
|
||||
|
||||
if (this.failedCount === 0) {
|
||||
dom.alert.appendChild(this.createDom('span', {className: 'passingAlert bar'}, "Passing " + specPluralizedFor(this.passedCount)));
|
||||
} else {
|
||||
showDetails();
|
||||
}
|
||||
|
||||
dom.banner.appendChild(this.createDom('span', {className: 'duration'}, "finished in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s"));
|
||||
};
|
||||
|
||||
return this;
|
||||
|
||||
function showDetails() {
|
||||
if (dom.reporter.className.search(/showDetails/) === -1) {
|
||||
dom.reporter.className += " showDetails";
|
||||
}
|
||||
}
|
||||
|
||||
function isUndefined(obj) {
|
||||
return typeof obj === 'undefined';
|
||||
}
|
||||
|
||||
function isDefined(obj) {
|
||||
return !isUndefined(obj);
|
||||
}
|
||||
|
||||
function specPluralizedFor(count) {
|
||||
var str = count + " spec";
|
||||
if (count > 1) {
|
||||
str += "s"
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.ReporterView);
|
||||
|
||||
|
||||
jasmine.HtmlReporter.SpecView = function(spec, dom, views) {
|
||||
this.spec = spec;
|
||||
this.dom = dom;
|
||||
this.views = views;
|
||||
|
||||
this.symbol = this.createDom('li', { className: 'pending' });
|
||||
this.dom.symbolSummary.appendChild(this.symbol);
|
||||
|
||||
this.summary = this.createDom('div', { className: 'specSummary' },
|
||||
this.createDom('a', {
|
||||
className: 'description',
|
||||
href: jasmine.HtmlReporter.sectionLink(this.spec.getFullName()),
|
||||
title: this.spec.getFullName()
|
||||
}, this.spec.description)
|
||||
);
|
||||
|
||||
this.detail = this.createDom('div', { className: 'specDetail' },
|
||||
this.createDom('a', {
|
||||
className: 'description',
|
||||
href: '?spec=' + encodeURIComponent(this.spec.getFullName()),
|
||||
title: this.spec.getFullName()
|
||||
}, this.spec.getFullName())
|
||||
);
|
||||
};
|
||||
|
||||
jasmine.HtmlReporter.SpecView.prototype.status = function() {
|
||||
return this.getSpecStatus(this.spec);
|
||||
};
|
||||
|
||||
jasmine.HtmlReporter.SpecView.prototype.refresh = function() {
|
||||
this.symbol.className = this.status();
|
||||
|
||||
switch (this.status()) {
|
||||
case 'skipped':
|
||||
break;
|
||||
|
||||
case 'passed':
|
||||
this.appendSummaryToSuiteDiv();
|
||||
break;
|
||||
|
||||
case 'failed':
|
||||
this.appendSummaryToSuiteDiv();
|
||||
this.appendFailureDetail();
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
jasmine.HtmlReporter.SpecView.prototype.appendSummaryToSuiteDiv = function() {
|
||||
this.summary.className += ' ' + this.status();
|
||||
this.appendToSummary(this.spec, this.summary);
|
||||
};
|
||||
|
||||
jasmine.HtmlReporter.SpecView.prototype.appendFailureDetail = function() {
|
||||
this.detail.className += ' ' + this.status();
|
||||
|
||||
var resultItems = this.spec.results().getItems();
|
||||
var messagesDiv = this.createDom('div', { className: 'messages' });
|
||||
|
||||
for (var i = 0; i < resultItems.length; i++) {
|
||||
var result = resultItems[i];
|
||||
|
||||
if (result.type == 'log') {
|
||||
messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));
|
||||
} else if (result.type == 'expect' && result.passed && !result.passed()) {
|
||||
messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));
|
||||
|
||||
if (result.trace.stack) {
|
||||
messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (messagesDiv.childNodes.length > 0) {
|
||||
this.detail.appendChild(messagesDiv);
|
||||
this.dom.details.appendChild(this.detail);
|
||||
}
|
||||
};
|
||||
|
||||
jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SpecView);jasmine.HtmlReporter.SuiteView = function(suite, dom, views) {
|
||||
this.suite = suite;
|
||||
this.dom = dom;
|
||||
this.views = views;
|
||||
|
||||
this.element = this.createDom('div', { className: 'suite' },
|
||||
this.createDom('a', { className: 'description', href: jasmine.HtmlReporter.sectionLink(this.suite.getFullName()) }, this.suite.description)
|
||||
);
|
||||
|
||||
this.appendToSummary(this.suite, this.element);
|
||||
};
|
||||
|
||||
jasmine.HtmlReporter.SuiteView.prototype.status = function() {
|
||||
return this.getSpecStatus(this.suite);
|
||||
};
|
||||
|
||||
jasmine.HtmlReporter.SuiteView.prototype.refresh = function() {
|
||||
this.element.className += " " + this.status();
|
||||
};
|
||||
|
||||
jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SuiteView);
|
||||
|
||||
/* @deprecated Use jasmine.HtmlReporter instead
|
||||
*/
|
||||
jasmine.TrivialReporter = function(doc) {
|
||||
this.document = doc || document;
|
||||
this.suiteDivs = {};
|
||||
this.logRunningSpecs = false;
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) {
|
||||
var el = document.createElement(type);
|
||||
|
||||
for (var i = 2; i < arguments.length; i++) {
|
||||
var child = arguments[i];
|
||||
|
||||
if (typeof child === 'string') {
|
||||
el.appendChild(document.createTextNode(child));
|
||||
} else {
|
||||
if (child) { el.appendChild(child); }
|
||||
}
|
||||
}
|
||||
|
||||
for (var attr in attrs) {
|
||||
if (attr == "className") {
|
||||
el[attr] = attrs[attr];
|
||||
} else {
|
||||
el.setAttribute(attr, attrs[attr]);
|
||||
}
|
||||
}
|
||||
|
||||
return el;
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) {
|
||||
var showPassed, showSkipped;
|
||||
|
||||
this.outerDiv = this.createDom('div', { id: 'TrivialReporter', className: 'jasmine_reporter' },
|
||||
this.createDom('div', { className: 'banner' },
|
||||
this.createDom('div', { className: 'logo' },
|
||||
this.createDom('span', { className: 'title' }, "Jasmine"),
|
||||
this.createDom('span', { className: 'version' }, runner.env.versionString())),
|
||||
this.createDom('div', { className: 'options' },
|
||||
"Show ",
|
||||
showPassed = this.createDom('input', { id: "__jasmine_TrivialReporter_showPassed__", type: 'checkbox' }),
|
||||
this.createDom('label', { "for": "__jasmine_TrivialReporter_showPassed__" }, " passed "),
|
||||
showSkipped = this.createDom('input', { id: "__jasmine_TrivialReporter_showSkipped__", type: 'checkbox' }),
|
||||
this.createDom('label', { "for": "__jasmine_TrivialReporter_showSkipped__" }, " skipped")
|
||||
)
|
||||
),
|
||||
|
||||
this.runnerDiv = this.createDom('div', { className: 'runner running' },
|
||||
this.createDom('a', { className: 'run_spec', href: '?' }, "run all"),
|
||||
this.runnerMessageSpan = this.createDom('span', {}, "Running..."),
|
||||
this.finishedAtSpan = this.createDom('span', { className: 'finished-at' }, ""))
|
||||
);
|
||||
|
||||
this.document.body.appendChild(this.outerDiv);
|
||||
|
||||
var suites = runner.suites();
|
||||
for (var i = 0; i < suites.length; i++) {
|
||||
var suite = suites[i];
|
||||
var suiteDiv = this.createDom('div', { className: 'suite' },
|
||||
this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, "run"),
|
||||
this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, suite.description));
|
||||
this.suiteDivs[suite.id] = suiteDiv;
|
||||
var parentDiv = this.outerDiv;
|
||||
if (suite.parentSuite) {
|
||||
parentDiv = this.suiteDivs[suite.parentSuite.id];
|
||||
}
|
||||
parentDiv.appendChild(suiteDiv);
|
||||
}
|
||||
|
||||
this.startedAt = new Date();
|
||||
|
||||
var self = this;
|
||||
showPassed.onclick = function(evt) {
|
||||
if (showPassed.checked) {
|
||||
self.outerDiv.className += ' show-passed';
|
||||
} else {
|
||||
self.outerDiv.className = self.outerDiv.className.replace(/ show-passed/, '');
|
||||
}
|
||||
};
|
||||
|
||||
showSkipped.onclick = function(evt) {
|
||||
if (showSkipped.checked) {
|
||||
self.outerDiv.className += ' show-skipped';
|
||||
} else {
|
||||
self.outerDiv.className = self.outerDiv.className.replace(/ show-skipped/, '');
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
|
||||
var results = runner.results();
|
||||
var className = (results.failedCount > 0) ? "runner failed" : "runner passed";
|
||||
this.runnerDiv.setAttribute("class", className);
|
||||
//do it twice for IE
|
||||
this.runnerDiv.setAttribute("className", className);
|
||||
var specs = runner.specs();
|
||||
var specCount = 0;
|
||||
for (var i = 0; i < specs.length; i++) {
|
||||
if (this.specFilter(specs[i])) {
|
||||
specCount++;
|
||||
}
|
||||
}
|
||||
var message = "" + specCount + " spec" + (specCount == 1 ? "" : "s" ) + ", " + results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s");
|
||||
message += " in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s";
|
||||
this.runnerMessageSpan.replaceChild(this.createDom('a', { className: 'description', href: '?'}, message), this.runnerMessageSpan.firstChild);
|
||||
|
||||
this.finishedAtSpan.appendChild(document.createTextNode("Finished at " + new Date().toString()));
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
|
||||
var results = suite.results();
|
||||
var status = results.passed() ? 'passed' : 'failed';
|
||||
if (results.totalCount === 0) { // todo: change this to check results.skipped
|
||||
status = 'skipped';
|
||||
}
|
||||
this.suiteDivs[suite.id].className += " " + status;
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.reportSpecStarting = function(spec) {
|
||||
if (this.logRunningSpecs) {
|
||||
this.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
|
||||
}
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
|
||||
var results = spec.results();
|
||||
var status = results.passed() ? 'passed' : 'failed';
|
||||
if (results.skipped) {
|
||||
status = 'skipped';
|
||||
}
|
||||
var specDiv = this.createDom('div', { className: 'spec ' + status },
|
||||
this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, "run"),
|
||||
this.createDom('a', {
|
||||
className: 'description',
|
||||
href: '?spec=' + encodeURIComponent(spec.getFullName()),
|
||||
title: spec.getFullName()
|
||||
}, spec.description));
|
||||
|
||||
|
||||
var resultItems = results.getItems();
|
||||
var messagesDiv = this.createDom('div', { className: 'messages' });
|
||||
for (var i = 0; i < resultItems.length; i++) {
|
||||
var result = resultItems[i];
|
||||
|
||||
if (result.type == 'log') {
|
||||
messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));
|
||||
} else if (result.type == 'expect' && result.passed && !result.passed()) {
|
||||
messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));
|
||||
|
||||
if (result.trace.stack) {
|
||||
messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (messagesDiv.childNodes.length > 0) {
|
||||
specDiv.appendChild(messagesDiv);
|
||||
}
|
||||
|
||||
this.suiteDivs[spec.suite.id].appendChild(specDiv);
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.log = function() {
|
||||
var console = jasmine.getGlobal().console;
|
||||
if (console && console.log) {
|
||||
if (console.log.apply) {
|
||||
console.log.apply(console, arguments);
|
||||
} else {
|
||||
console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.getLocation = function() {
|
||||
return this.document.location;
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.specFilter = function(spec) {
|
||||
var paramMap = {};
|
||||
var params = this.getLocation().search.substring(1).split('&');
|
||||
for (var i = 0; i < params.length; i++) {
|
||||
var p = params[i].split('=');
|
||||
paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
|
||||
}
|
||||
|
||||
if (!paramMap.spec) {
|
||||
return true;
|
||||
}
|
||||
return spec.getFullName().indexOf(paramMap.spec) === 0;
|
||||
};
|
||||
82
node_modules/less/test/browser/jasmine.css
generated
vendored
Normal file
82
node_modules/less/test/browser/jasmine.css
generated
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
body { background-color: #eeeeee; padding: 0; margin: 5px; overflow-y: scroll; }
|
||||
|
||||
#HTMLReporter { font-size: 11px; font-family: Monaco, "Lucida Console", monospace; line-height: 14px; color: #333333; }
|
||||
#HTMLReporter a { text-decoration: none; }
|
||||
#HTMLReporter a:hover { text-decoration: underline; }
|
||||
#HTMLReporter p, #HTMLReporter h1, #HTMLReporter h2, #HTMLReporter h3, #HTMLReporter h4, #HTMLReporter h5, #HTMLReporter h6 { margin: 0; line-height: 14px; }
|
||||
#HTMLReporter .banner, #HTMLReporter .symbolSummary, #HTMLReporter .summary, #HTMLReporter .resultMessage, #HTMLReporter .specDetail .description, #HTMLReporter .alert .bar, #HTMLReporter .stackTrace { padding-left: 9px; padding-right: 9px; }
|
||||
#HTMLReporter #jasmine_content { position: fixed; right: 100%; }
|
||||
#HTMLReporter .version { color: #aaaaaa; }
|
||||
#HTMLReporter .banner { margin-top: 14px; }
|
||||
#HTMLReporter .duration { color: #aaaaaa; float: right; }
|
||||
#HTMLReporter .symbolSummary { overflow: hidden; *zoom: 1; margin: 14px 0; }
|
||||
#HTMLReporter .symbolSummary li { display: block; float: left; height: 7px; width: 14px; margin-bottom: 7px; font-size: 16px; }
|
||||
#HTMLReporter .symbolSummary li.passed { font-size: 14px; }
|
||||
#HTMLReporter .symbolSummary li.passed:before { color: #5e7d00; content: "\02022"; }
|
||||
#HTMLReporter .symbolSummary li.failed { line-height: 9px; }
|
||||
#HTMLReporter .symbolSummary li.failed:before { color: #b03911; content: "x"; font-weight: bold; margin-left: -1px; }
|
||||
#HTMLReporter .symbolSummary li.skipped { font-size: 14px; }
|
||||
#HTMLReporter .symbolSummary li.skipped:before { color: #bababa; content: "\02022"; }
|
||||
#HTMLReporter .symbolSummary li.pending { line-height: 11px; }
|
||||
#HTMLReporter .symbolSummary li.pending:before { color: #aaaaaa; content: "-"; }
|
||||
#HTMLReporter .exceptions { color: #fff; float: right; margin-top: 5px; margin-right: 5px; }
|
||||
#HTMLReporter .bar { line-height: 28px; font-size: 14px; display: block; color: #eee; }
|
||||
#HTMLReporter .runningAlert { background-color: #666666; }
|
||||
#HTMLReporter .skippedAlert { background-color: #aaaaaa; }
|
||||
#HTMLReporter .skippedAlert:first-child { background-color: #333333; }
|
||||
#HTMLReporter .skippedAlert:hover { text-decoration: none; color: white; text-decoration: underline; }
|
||||
#HTMLReporter .passingAlert { background-color: #a6b779; }
|
||||
#HTMLReporter .passingAlert:first-child { background-color: #5e7d00; }
|
||||
#HTMLReporter .failingAlert { background-color: #cf867e; }
|
||||
#HTMLReporter .failingAlert:first-child { background-color: #b03911; }
|
||||
#HTMLReporter .results { margin-top: 14px; }
|
||||
#HTMLReporter #details { display: none; }
|
||||
#HTMLReporter .resultsMenu, #HTMLReporter .resultsMenu a { background-color: #fff; color: #333333; }
|
||||
#HTMLReporter.showDetails .summaryMenuItem { font-weight: normal; text-decoration: inherit; }
|
||||
#HTMLReporter.showDetails .summaryMenuItem:hover { text-decoration: underline; }
|
||||
#HTMLReporter.showDetails .detailsMenuItem { font-weight: bold; text-decoration: underline; }
|
||||
#HTMLReporter.showDetails .summary { display: none; }
|
||||
#HTMLReporter.showDetails #details { display: block; }
|
||||
#HTMLReporter .summaryMenuItem { font-weight: bold; text-decoration: underline; }
|
||||
#HTMLReporter .summary { margin-top: 14px; }
|
||||
#HTMLReporter .summary .suite .suite, #HTMLReporter .summary .specSummary { margin-left: 14px; }
|
||||
#HTMLReporter .summary .specSummary.passed a { color: #5e7d00; }
|
||||
#HTMLReporter .summary .specSummary.failed a { color: #b03911; }
|
||||
#HTMLReporter .description + .suite { margin-top: 0; }
|
||||
#HTMLReporter .suite { margin-top: 14px; }
|
||||
#HTMLReporter .suite a { color: #333333; }
|
||||
#HTMLReporter #details .specDetail { margin-bottom: 28px; }
|
||||
#HTMLReporter #details .specDetail .description { display: block; color: white; background-color: #b03911; }
|
||||
#HTMLReporter .resultMessage { padding-top: 14px; color: #333333; }
|
||||
#HTMLReporter .resultMessage span.result { display: block; }
|
||||
#HTMLReporter .stackTrace { margin: 5px 0 0 0; max-height: 224px; overflow: auto; line-height: 18px; color: #666666; border: 1px solid #ddd; background: white; white-space: pre; }
|
||||
|
||||
#TrivialReporter { padding: 8px 13px; position: absolute; top: 0; bottom: 0; left: 0; right: 0; overflow-y: scroll; background-color: white; font-family: "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif; /*.resultMessage {*/ /*white-space: pre;*/ /*}*/ }
|
||||
#TrivialReporter a:visited, #TrivialReporter a { color: #303; }
|
||||
#TrivialReporter a:hover, #TrivialReporter a:active { color: blue; }
|
||||
#TrivialReporter .run_spec { float: right; padding-right: 5px; font-size: .8em; text-decoration: none; }
|
||||
#TrivialReporter .banner { color: #303; background-color: #fef; padding: 5px; }
|
||||
#TrivialReporter .logo { float: left; font-size: 1.1em; padding-left: 5px; }
|
||||
#TrivialReporter .logo .version { font-size: .6em; padding-left: 1em; }
|
||||
#TrivialReporter .runner.running { background-color: yellow; }
|
||||
#TrivialReporter .options { text-align: right; font-size: .8em; }
|
||||
#TrivialReporter .suite { border: 1px outset gray; margin: 5px 0; padding-left: 1em; }
|
||||
#TrivialReporter .suite .suite { margin: 5px; }
|
||||
#TrivialReporter .suite.passed { background-color: #dfd; }
|
||||
#TrivialReporter .suite.failed { background-color: #fdd; }
|
||||
#TrivialReporter .spec { margin: 5px; padding-left: 1em; clear: both; }
|
||||
#TrivialReporter .spec.failed, #TrivialReporter .spec.passed, #TrivialReporter .spec.skipped { padding-bottom: 5px; border: 1px solid gray; }
|
||||
#TrivialReporter .spec.failed { background-color: #fbb; border-color: red; }
|
||||
#TrivialReporter .spec.passed { background-color: #bfb; border-color: green; }
|
||||
#TrivialReporter .spec.skipped { background-color: #bbb; }
|
||||
#TrivialReporter .messages { border-left: 1px dashed gray; padding-left: 1em; padding-right: 1em; }
|
||||
#TrivialReporter .passed { background-color: #cfc; display: none; }
|
||||
#TrivialReporter .failed { background-color: #fbb; }
|
||||
#TrivialReporter .skipped { color: #777; background-color: #eee; display: none; }
|
||||
#TrivialReporter .resultMessage span.result { display: block; line-height: 2em; color: black; }
|
||||
#TrivialReporter .resultMessage .mismatch { color: black; }
|
||||
#TrivialReporter .stackTrace { white-space: pre; font-size: .8em; margin-left: 10px; max-height: 5em; overflow: auto; border: 1px inset red; padding: 1em; background: #eef; }
|
||||
#TrivialReporter .finished-at { padding-left: 1em; font-size: .6em; }
|
||||
#TrivialReporter.show-passed .passed, #TrivialReporter.show-skipped .skipped { display: block; }
|
||||
#TrivialReporter #jasmine_content { position: fixed; right: 100%; }
|
||||
#TrivialReporter .runner { border: 1px solid gray; display: block; margin: 5px 0; padding: 2px 0 2px 10px; }
|
||||
2600
node_modules/less/test/browser/jasmine.js
generated
vendored
Normal file
2600
node_modules/less/test/browser/jasmine.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
node_modules/less/test/browser/less/imports/urls.less
generated
vendored
Normal file
4
node_modules/less/test/browser/less/imports/urls.less
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
@import "modify-this.css";
|
||||
.modify {
|
||||
my-url: url("a.png");
|
||||
}
|
||||
4
node_modules/less/test/browser/less/imports/urls2.less
generated
vendored
Normal file
4
node_modules/less/test/browser/less/imports/urls2.less
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
@import "modify-again.css";
|
||||
.modify {
|
||||
my-url: url("b.png");
|
||||
}
|
||||
33
node_modules/less/test/browser/less/relative-urls/urls.less
generated
vendored
Normal file
33
node_modules/less/test/browser/less/relative-urls/urls.less
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
@import ".././imports/urls.less";
|
||||
@import "http://localhost:8081/browser/less/imports/urls2.less";
|
||||
@font-face {
|
||||
src: url("/fonts/garamond-pro.ttf");
|
||||
src: local(Futura-Medium),
|
||||
url(fonts.svg#MyGeometricModern) format("svg");
|
||||
}
|
||||
#shorthands {
|
||||
background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
|
||||
}
|
||||
#misc {
|
||||
background-image: url(images/image.jpg);
|
||||
}
|
||||
#data-uri {
|
||||
background: url(data:image/png;charset=utf-8;base64,
|
||||
kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
|
||||
k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
|
||||
kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
|
||||
background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
|
||||
background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
|
||||
}
|
||||
|
||||
#svg-data-uri {
|
||||
background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
|
||||
}
|
||||
|
||||
.comma-delimited {
|
||||
background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg);
|
||||
}
|
||||
.values {
|
||||
@a: 'Trebuchet';
|
||||
url: url(@a);
|
||||
}
|
||||
33
node_modules/less/test/browser/less/rootpath-relative/urls.less
generated
vendored
Normal file
33
node_modules/less/test/browser/less/rootpath-relative/urls.less
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
@import "../imports/urls.less";
|
||||
@import "http://localhost:8081/browser/less/imports/urls2.less";
|
||||
@font-face {
|
||||
src: url("/fonts/garamond-pro.ttf");
|
||||
src: local(Futura-Medium),
|
||||
url(fonts.svg#MyGeometricModern) format("svg");
|
||||
}
|
||||
#shorthands {
|
||||
background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
|
||||
}
|
||||
#misc {
|
||||
background-image: url(images/image.jpg);
|
||||
}
|
||||
#data-uri {
|
||||
background: url(data:image/png;charset=utf-8;base64,
|
||||
kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
|
||||
k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
|
||||
kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
|
||||
background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
|
||||
background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
|
||||
}
|
||||
|
||||
#svg-data-uri {
|
||||
background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
|
||||
}
|
||||
|
||||
.comma-delimited {
|
||||
background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg);
|
||||
}
|
||||
.values {
|
||||
@a: 'Trebuchet';
|
||||
url: url(@a);
|
||||
}
|
||||
33
node_modules/less/test/browser/less/rootpath/urls.less
generated
vendored
Normal file
33
node_modules/less/test/browser/less/rootpath/urls.less
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
@import "../imports/urls.less";
|
||||
@import "http://localhost:8081/browser/less/imports/urls2.less";
|
||||
@font-face {
|
||||
src: url("/fonts/garamond-pro.ttf");
|
||||
src: local(Futura-Medium),
|
||||
url(fonts.svg#MyGeometricModern) format("svg");
|
||||
}
|
||||
#shorthands {
|
||||
background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
|
||||
}
|
||||
#misc {
|
||||
background-image: url(images/image.jpg);
|
||||
}
|
||||
#data-uri {
|
||||
background: url(data:image/png;charset=utf-8;base64,
|
||||
kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
|
||||
k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
|
||||
kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
|
||||
background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
|
||||
background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
|
||||
}
|
||||
|
||||
#svg-data-uri {
|
||||
background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
|
||||
}
|
||||
|
||||
.comma-delimited {
|
||||
background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg);
|
||||
}
|
||||
.values {
|
||||
@a: 'Trebuchet';
|
||||
url: url(@a);
|
||||
}
|
||||
49
node_modules/less/test/browser/less/urls.less
generated
vendored
Normal file
49
node_modules/less/test/browser/less/urls.less
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
@import "imports/urls.less";
|
||||
@import "http://localhost:8081/browser/less/imports/urls2.less";
|
||||
@font-face {
|
||||
src: url("/fonts/garamond-pro.ttf");
|
||||
src: local(Futura-Medium),
|
||||
url(fonts.svg#MyGeometricModern) format("svg");
|
||||
}
|
||||
#shorthands {
|
||||
background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
|
||||
}
|
||||
#misc {
|
||||
background-image: url(images/image.jpg);
|
||||
}
|
||||
#data-uri {
|
||||
background: url(data:image/png;charset=utf-8;base64,
|
||||
kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
|
||||
k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
|
||||
kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
|
||||
background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
|
||||
background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
|
||||
}
|
||||
|
||||
#svg-data-uri {
|
||||
background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
|
||||
}
|
||||
|
||||
.comma-delimited {
|
||||
background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg);
|
||||
}
|
||||
.values {
|
||||
@a: 'Trebuchet';
|
||||
url: url(@a);
|
||||
}
|
||||
#data-uri {
|
||||
uri: data-uri('image/jpeg;base64', '../../data/image.jpg');
|
||||
}
|
||||
|
||||
#data-uri-guess {
|
||||
uri: data-uri('../../data/image.jpg');
|
||||
}
|
||||
|
||||
#data-uri-ascii {
|
||||
uri-1: data-uri('text/html', '../../data/page.html');
|
||||
uri-2: data-uri('../../data/page.html');
|
||||
}
|
||||
|
||||
#data-uri-toobig {
|
||||
uri: data-uri('../../data/data-uri-fail.png');
|
||||
}
|
||||
141
node_modules/less/test/browser/phantom-runner.js
generated
vendored
Normal file
141
node_modules/less/test/browser/phantom-runner.js
generated
vendored
Normal file
@ -0,0 +1,141 @@
|
||||
var webpage = require('webpage');
|
||||
var server = require('webserver').create();
|
||||
var system = require('system');
|
||||
var fs = require('fs');
|
||||
var host, port = 8081;
|
||||
|
||||
var listening = server.listen(port, function (request, response) {
|
||||
//console.log("Requested "+request.url);
|
||||
|
||||
var filename = ("test/" + request.url.slice(1)).replace(/[\\\/]/g, fs.separator);
|
||||
|
||||
if (!fs.exists(filename) || !fs.isFile(filename)) {
|
||||
response.statusCode = 404;
|
||||
response.write("<html><head></head><body><h1>File Not Found</h1><h2>File:"+filename+"</h2></body></html>");
|
||||
response.close();
|
||||
return;
|
||||
}
|
||||
|
||||
// we set the headers here
|
||||
response.statusCode = 200;
|
||||
response.headers = {"Cache": "no-cache", "Content-Type": "text/html"};
|
||||
|
||||
response.write(fs.read(filename));
|
||||
|
||||
response.close();
|
||||
});
|
||||
if (!listening) {
|
||||
console.log("could not create web server listening on port " + port);
|
||||
phantom.exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Wait until the test condition is true or a timeout occurs. Useful for waiting
|
||||
* on a server response or for a ui change (fadeIn, etc.) to occur.
|
||||
*
|
||||
* @param testFx javascript condition that evaluates to a boolean,
|
||||
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or
|
||||
* as a callback function.
|
||||
* @param onReady what to do when testFx condition is fulfilled,
|
||||
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or
|
||||
* as a callback function.
|
||||
* @param timeOutMillis the max amount of time to wait. If not specified, 3 sec is used.
|
||||
* @param timeOutErrorMessage the error message if time out occurs
|
||||
*/
|
||||
function waitFor(testFx, onReady, timeOutMillis, timeOutErrorMessage) {
|
||||
var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 10001, //< Default Max Timeout is 10s
|
||||
start = new Date().getTime(),
|
||||
condition = false,
|
||||
interval = setInterval(function() {
|
||||
if ( (new Date().getTime() - start < maxtimeOutMillis) && !condition ) {
|
||||
// If not time-out yet and condition not yet fulfilled
|
||||
condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()); //< defensive code
|
||||
} else {
|
||||
if(!condition) {
|
||||
// If condition still not fulfilled (timeout but condition is 'false')
|
||||
console.log(timeOutErrorMessage || "'waitFor()' timeout");
|
||||
phantom.exit(1);
|
||||
} else {
|
||||
// Condition fulfilled (timeout and/or condition is 'true')
|
||||
typeof(onReady) === "string" ? eval(onReady) : onReady(); //< Do what it's supposed to do once the condition is fulfilled
|
||||
clearInterval(interval); //< Stop this interval
|
||||
}
|
||||
}
|
||||
}, 100); //< repeat check every 100ms
|
||||
};
|
||||
|
||||
function testPage(url) {
|
||||
var page = webpage.create();
|
||||
page.open(url, function (status) {
|
||||
if (status !== "success") {
|
||||
console.log("Unable to access network - " + status);
|
||||
phantom.exit();
|
||||
} else {
|
||||
waitFor(function(){
|
||||
return page.evaluate(function(){
|
||||
return document.body && document.body.querySelector &&
|
||||
document.body.querySelector('.symbolSummary .pending') === null &&
|
||||
document.body.querySelector('.results') !== null;
|
||||
});
|
||||
}, function(){
|
||||
page.onConsoleMessage = function (msg) {
|
||||
console.log(msg);
|
||||
};
|
||||
var exitCode = page.evaluate(function(){
|
||||
console.log('');
|
||||
console.log(document.body.querySelector('.description').innerText);
|
||||
var list = document.body.querySelectorAll('.results > #details > .specDetail.failed');
|
||||
if (list && list.length > 0) {
|
||||
console.log('');
|
||||
console.log(list.length + ' test(s) FAILED:');
|
||||
for (var i = 0; i < list.length; ++i) {
|
||||
var el = list[i],
|
||||
desc = el.querySelector('.description'),
|
||||
msg = el.querySelector('.resultMessage.fail');
|
||||
console.log('');
|
||||
console.log(desc.innerText);
|
||||
console.log(msg.innerText);
|
||||
console.log('');
|
||||
}
|
||||
return 1;
|
||||
} else {
|
||||
console.log(document.body.querySelector('.alert > .passingAlert.bar').innerText);
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
testFinished(exitCode);
|
||||
},
|
||||
10000, // 10 second timeout
|
||||
"Test failed waiting for jasmine results on page: " + url);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function scanDirectory(path, regex) {
|
||||
var files = [];
|
||||
fs.list(path).forEach(function (file) {
|
||||
if (file.match(regex)) {
|
||||
files.push(file);
|
||||
}
|
||||
});
|
||||
return files;
|
||||
};
|
||||
|
||||
var totalTests = 0,
|
||||
totalFailed = 0,
|
||||
totalDone = 0;
|
||||
|
||||
function testFinished(failed) {
|
||||
if (failed) { totalFailed++; }
|
||||
totalDone++;
|
||||
if (totalDone === totalTests) { phantom.exit(totalFailed > 0 ? 1 : 0); }
|
||||
}
|
||||
|
||||
if (system.args.length != 2 && system.args[1] != "--no-tests") {
|
||||
var files = scanDirectory("test/browser/", /^test-runner-.+\.htm$/);
|
||||
totalTests = files.length;
|
||||
console.log("found " + files.length + " tests");
|
||||
files.forEach(function(file) {
|
||||
testPage("http://localhost:8081/browser/" + file);
|
||||
});
|
||||
}
|
||||
7
node_modules/less/test/browser/runner-browser.js
generated
vendored
Normal file
7
node_modules/less/test/browser/runner-browser.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
describe("less.js browser behaviour", function() {
|
||||
testLessEqualsInDocument();
|
||||
|
||||
it("has some log messages", function() {
|
||||
expect(logMessages.length).toBeGreaterThan(0);
|
||||
});
|
||||
});
|
||||
5
node_modules/less/test/browser/runner-errors.js
generated
vendored
Normal file
5
node_modules/less/test/browser/runner-errors.js
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
less.strictUnits = true;
|
||||
|
||||
describe("less.js error tests", function() {
|
||||
testLessErrorsInDocument();
|
||||
});
|
||||
6
node_modules/less/test/browser/runner-legacy.js
generated
vendored
Normal file
6
node_modules/less/test/browser/runner-legacy.js
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
less.strictMath = false;
|
||||
less.strictUnits = false;
|
||||
|
||||
describe("less.js legacy tests", function() {
|
||||
testLessEqualsInDocument();
|
||||
});
|
||||
15
node_modules/less/test/browser/runner-main.js
generated
vendored
Normal file
15
node_modules/less/test/browser/runner-main.js
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
less.functions = {
|
||||
add: function (a, b) {
|
||||
return new(less.tree.Dimension)(a.value + b.value);
|
||||
},
|
||||
increment: function (a) {
|
||||
return new(less.tree.Dimension)(a.value + 1);
|
||||
},
|
||||
_color: function (str) {
|
||||
if (str.value === "evil red") { return new(less.tree.Color)("600") }
|
||||
}
|
||||
};
|
||||
|
||||
describe("less.js main tests", function() {
|
||||
testLessEqualsInDocument();
|
||||
});
|
||||
7
node_modules/less/test/browser/runner-production.js
generated
vendored
Normal file
7
node_modules/less/test/browser/runner-production.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
less.env = "production";
|
||||
|
||||
describe("less.js production behaviour", function() {
|
||||
it("doesn't log any messages", function() {
|
||||
expect(logMessages.length).toEqual(0);
|
||||
});
|
||||
});
|
||||
4
node_modules/less/test/browser/runner-relative-urls.js
generated
vendored
Normal file
4
node_modules/less/test/browser/runner-relative-urls.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
less.relativeUrls = true;
|
||||
describe("less.js browser test - relative url's", function() {
|
||||
testLessEqualsInDocument();
|
||||
});
|
||||
5
node_modules/less/test/browser/runner-rootpath-relative.js
generated
vendored
Normal file
5
node_modules/less/test/browser/runner-rootpath-relative.js
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
less.rootpath = "https://www.github.com/cloudhead/less.js/";
|
||||
less.relativeUrls = true;
|
||||
describe("less.js browser test - rootpath and relative url's", function() {
|
||||
testLessEqualsInDocument();
|
||||
});
|
||||
4
node_modules/less/test/browser/runner-rootpath.js
generated
vendored
Normal file
4
node_modules/less/test/browser/runner-rootpath.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
less.rootpath = "https://www.github.com/";
|
||||
describe("less.js browser test - rootpath url's", function() {
|
||||
testLessEqualsInDocument();
|
||||
});
|
||||
10
node_modules/less/test/browser/template.htm
generated
vendored
Normal file
10
node_modules/less/test/browser/template.htm
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
<script src="/browser/jasmine.js" type="text/javascript"></script>
|
||||
<script src="/browser/jasmine-html.js" type="text/javascript"></script>
|
||||
<script src="/browser/common.js" type="text/javascript"></script>
|
||||
<script src="/browser/runner-{runner-name}.js" type="text/javascript"></script>
|
||||
<script src="/browser/less.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/browser/jasmine.css"></link>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
1
node_modules/less/test/css/charsets.css
generated
vendored
Normal file
1
node_modules/less/test/css/charsets.css
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
@charset "UTF-8";
|
||||
80
node_modules/less/test/css/colors.css
generated
vendored
Normal file
80
node_modules/less/test/css/colors.css
generated
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
#yelow #short {
|
||||
color: #fea;
|
||||
}
|
||||
#yelow #long {
|
||||
color: #ffeeaa;
|
||||
}
|
||||
#yelow #rgba {
|
||||
color: rgba(255, 238, 170, 0.1);
|
||||
}
|
||||
#yelow #argb {
|
||||
color: #1affeeaa;
|
||||
}
|
||||
#blue #short {
|
||||
color: #00f;
|
||||
}
|
||||
#blue #long {
|
||||
color: #0000ff;
|
||||
}
|
||||
#blue #rgba {
|
||||
color: rgba(0, 0, 255, 0.1);
|
||||
}
|
||||
#blue #argb {
|
||||
color: #1a0000ff;
|
||||
}
|
||||
#alpha #hsla {
|
||||
color: rgba(61, 45, 41, 0.6);
|
||||
}
|
||||
#overflow .a {
|
||||
color: #000000;
|
||||
}
|
||||
#overflow .b {
|
||||
color: #ffffff;
|
||||
}
|
||||
#overflow .c {
|
||||
color: #ffffff;
|
||||
}
|
||||
#overflow .d {
|
||||
color: #00ff00;
|
||||
}
|
||||
#grey {
|
||||
color: #c8c8c8;
|
||||
}
|
||||
#333333 {
|
||||
color: #333333;
|
||||
}
|
||||
#808080 {
|
||||
color: #808080;
|
||||
}
|
||||
#00ff00 {
|
||||
color: #00ff00;
|
||||
}
|
||||
.lightenblue {
|
||||
color: #3333ff;
|
||||
}
|
||||
.darkenblue {
|
||||
color: #0000cc;
|
||||
}
|
||||
.unknowncolors {
|
||||
color: blue2;
|
||||
border: 2px solid superred;
|
||||
}
|
||||
.transparent {
|
||||
color: transparent;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
#alpha #fromvar {
|
||||
opacity: 0.7;
|
||||
}
|
||||
#alpha #short {
|
||||
opacity: 1;
|
||||
}
|
||||
#alpha #long {
|
||||
opacity: 1;
|
||||
}
|
||||
#alpha #rgba {
|
||||
opacity: 0.2;
|
||||
}
|
||||
#alpha #hsl {
|
||||
opacity: 1;
|
||||
}
|
||||
64
node_modules/less/test/css/comments.css
generated
vendored
Normal file
64
node_modules/less/test/css/comments.css
generated
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
/******************\
|
||||
* *
|
||||
* Comment Header *
|
||||
* *
|
||||
\******************/
|
||||
/*
|
||||
|
||||
Comment
|
||||
|
||||
*/
|
||||
/*
|
||||
* Comment Test
|
||||
*
|
||||
* - cloudhead (http://cloudhead.net)
|
||||
*
|
||||
*/
|
||||
/* Colors
|
||||
* ------
|
||||
* #EDF8FC (background blue)
|
||||
* #166C89 (darkest blue)
|
||||
*
|
||||
* Text:
|
||||
* #333 (standard text) // A comment within a comment!
|
||||
* #1F9EC9 (standard link)
|
||||
*
|
||||
*/
|
||||
/* @group Variables
|
||||
------------------- */
|
||||
#comments {
|
||||
/**/
|
||||
color: red;
|
||||
/* A C-style comment */
|
||||
/* A C-style comment */
|
||||
|
||||
background-color: orange;
|
||||
font-size: 12px;
|
||||
/* lost comment */
|
||||
content: "content";
|
||||
border: 1px solid black;
|
||||
padding: 0;
|
||||
margin: 2em;
|
||||
}
|
||||
/* commented out
|
||||
#more-comments {
|
||||
color: grey;
|
||||
}
|
||||
*/
|
||||
.selector,
|
||||
.lots,
|
||||
.comments {
|
||||
color: #808080, /* blue */ #ffa500;
|
||||
-webkit-border-radius: 2px /* webkit only */;
|
||||
-moz-border-radius: 8px /* moz only with operation */;
|
||||
}
|
||||
.test {
|
||||
color: 1px //put in @b - causes problems! --->;
|
||||
}
|
||||
#last {
|
||||
color: #0000ff;
|
||||
}
|
||||
/* *//* { *//* *//* *//* */#div {
|
||||
color: #A33;
|
||||
}
|
||||
/* } */
|
||||
2
node_modules/less/test/css/compression/compression.css
generated
vendored
Normal file
2
node_modules/less/test/css/compression/compression.css
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
#colours{color1:#fea;color2:#fea;color3:rgba(255,238,170,0.1);string:"#ffeeaa"}
|
||||
dimensions{val:.1px;val:0;val:4cm;val:.2;val:5;angles-must-have-unit:0deg;width:auto\9}
|
||||
114
node_modules/less/test/css/css-3.css
generated
vendored
Normal file
114
node_modules/less/test/css/css-3.css
generated
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
.comma-delimited {
|
||||
text-shadow: -1px -1px 1px #ff0000, 6px 5px 5px #ffff00;
|
||||
-moz-box-shadow: 0pt 0pt 2px rgba(255, 255, 255, 0.4) inset, 0pt 4px 6px rgba(255, 255, 255, 0.4) inset;
|
||||
-webkit-transform: rotate(-0.0000000001deg);
|
||||
}
|
||||
@font-face {
|
||||
font-family: Headline;
|
||||
unicode-range: U+??????, U+0???, U+0-7F, U+A5;
|
||||
}
|
||||
.other {
|
||||
-moz-transform: translate(0, 11em) rotate(-90deg);
|
||||
transform: rotateX(45deg);
|
||||
}
|
||||
.item[data-cra_zy-attr1b-ut3=bold] {
|
||||
font-weight: bold;
|
||||
}
|
||||
p:not([class*="lead"]) {
|
||||
color: black;
|
||||
}
|
||||
input[type="text"].class#id[attr=32]:not(1) {
|
||||
color: white;
|
||||
}
|
||||
div#id.class[a=1][b=2].class:not(1) {
|
||||
color: white;
|
||||
}
|
||||
ul.comma > li:not(:only-child)::after {
|
||||
color: white;
|
||||
}
|
||||
ol.comma > li:nth-last-child(2)::after {
|
||||
color: white;
|
||||
}
|
||||
li:nth-child(4n+1),
|
||||
li:nth-child(-5n),
|
||||
li:nth-child(-n+2) {
|
||||
color: white;
|
||||
}
|
||||
a[href^="http://"] {
|
||||
color: black;
|
||||
}
|
||||
a[href$="http://"] {
|
||||
color: black;
|
||||
}
|
||||
form[data-disabled] {
|
||||
color: black;
|
||||
}
|
||||
p::before {
|
||||
color: black;
|
||||
}
|
||||
#issue322 {
|
||||
-webkit-animation: anim2 7s infinite ease-in-out;
|
||||
}
|
||||
@-webkit-keyframes frames {
|
||||
0% {
|
||||
border: 1px;
|
||||
}
|
||||
5.5% {
|
||||
border: 2px;
|
||||
}
|
||||
100% {
|
||||
border: 3px;
|
||||
}
|
||||
}
|
||||
@keyframes fontbulger1 {
|
||||
to {
|
||||
font-size: 15px;
|
||||
}
|
||||
from,
|
||||
to {
|
||||
font-size: 12px;
|
||||
}
|
||||
0%,
|
||||
100% {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
.units {
|
||||
font: 1.2rem/2rem;
|
||||
font: 8vw/9vw;
|
||||
font: 10vh/12vh;
|
||||
font: 12vm/15vm;
|
||||
font: 12vmin/15vmin;
|
||||
font: 1.2ch/1.5ch;
|
||||
}
|
||||
@supports ( box-shadow: 2px 2px 2px black ) or
|
||||
( -moz-box-shadow: 2px 2px 2px black ) {
|
||||
.outline {
|
||||
box-shadow: 2px 2px 2px black;
|
||||
-moz-box-shadow: 2px 2px 2px black;
|
||||
}
|
||||
}
|
||||
@-x-document url-prefix(""github.com"") {
|
||||
h1 {
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
@viewport {
|
||||
font-size: 10px;
|
||||
}
|
||||
@namespace foo url(http://www.example.com);
|
||||
foo | h1 {
|
||||
color: blue;
|
||||
}
|
||||
foo | * {
|
||||
color: yellow;
|
||||
}
|
||||
| h1 {
|
||||
color: red;
|
||||
}
|
||||
* | h1 {
|
||||
color: green;
|
||||
}
|
||||
h1 {
|
||||
color: green;
|
||||
}
|
||||
24
node_modules/less/test/css/css-escapes.css
generated
vendored
Normal file
24
node_modules/less/test/css/css-escapes.css
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
.escape\|random\|char {
|
||||
color: red;
|
||||
}
|
||||
.mixin\!tUp {
|
||||
font-weight: bold;
|
||||
}
|
||||
.\34 04 {
|
||||
background: red;
|
||||
}
|
||||
.\34 04 strong {
|
||||
color: #ff00ff;
|
||||
font-weight: bold;
|
||||
}
|
||||
.trailingTest\+ {
|
||||
color: red;
|
||||
}
|
||||
/* This hideous test of hideousness checks for the selector "blockquote" with various permutations of hex escapes */
|
||||
\62\6c\6f \63 \6B \0071 \000075o\74 e {
|
||||
color: silver;
|
||||
}
|
||||
[ng\:cloak],
|
||||
ng\:form {
|
||||
display: none;
|
||||
}
|
||||
95
node_modules/less/test/css/css.css
generated
vendored
Normal file
95
node_modules/less/test/css/css.css
generated
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
@charset "utf-8";
|
||||
div {
|
||||
color: black;
|
||||
}
|
||||
div {
|
||||
width: 99%;
|
||||
}
|
||||
* {
|
||||
min-width: 45em;
|
||||
}
|
||||
h1,
|
||||
h2 > a > p,
|
||||
h3 {
|
||||
color: none;
|
||||
}
|
||||
div.class {
|
||||
color: blue;
|
||||
}
|
||||
div#id {
|
||||
color: green;
|
||||
}
|
||||
.class#id {
|
||||
color: purple;
|
||||
}
|
||||
.one.two.three {
|
||||
color: grey;
|
||||
}
|
||||
@media print {
|
||||
* {
|
||||
font-size: 3em;
|
||||
}
|
||||
}
|
||||
@media screen {
|
||||
* {
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Garamond Pro';
|
||||
}
|
||||
a:hover,
|
||||
a:link {
|
||||
color: #999;
|
||||
}
|
||||
p,
|
||||
p:first-child {
|
||||
text-transform: none;
|
||||
}
|
||||
q:lang(no) {
|
||||
quotes: none;
|
||||
}
|
||||
p + h1 {
|
||||
font-size: 2.2em;
|
||||
}
|
||||
#shorthands {
|
||||
border: 1px solid #000;
|
||||
font: 12px/16px Arial;
|
||||
font: 100%/16px Arial;
|
||||
margin: 1px 0;
|
||||
padding: 0 auto;
|
||||
}
|
||||
#more-shorthands {
|
||||
margin: 0;
|
||||
padding: 1px 0 2px 0;
|
||||
font: normal small / 20px 'Trebuchet MS', Verdana, sans-serif;
|
||||
font: 0/0 a;
|
||||
border-radius: 5px / 10px;
|
||||
}
|
||||
.misc {
|
||||
-moz-border-radius: 2px;
|
||||
display: -moz-inline-stack;
|
||||
width: .1em;
|
||||
background-color: #009998;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), to(#0000ff));
|
||||
margin: ;
|
||||
filter: alpha(opacity=100);
|
||||
width: auto\9;
|
||||
}
|
||||
.misc .nested-multiple {
|
||||
multiple-semi-colons: yes;
|
||||
}
|
||||
#important {
|
||||
color: red !important;
|
||||
width: 100%!important;
|
||||
height: 20px ! important;
|
||||
}
|
||||
@font-face {
|
||||
font-family: font-a;
|
||||
}
|
||||
@font-face {
|
||||
font-family: font-b;
|
||||
}
|
||||
.æøå {
|
||||
margin: 0;
|
||||
}
|
||||
43
node_modules/less/test/css/debug/linenumbers-all.css
generated
vendored
Normal file
43
node_modules/less/test/css/debug/linenumbers-all.css
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
@charset "UTF-8";
|
||||
/* line 3, {pathimport}test.less */
|
||||
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\000033}}
|
||||
/* @charset "ISO-8859-1"; */
|
||||
/* line 23, {pathimport}test.less */
|
||||
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\0000323}}
|
||||
.tst3 {
|
||||
color: grey;
|
||||
}
|
||||
/* line 15, {path}linenumbers.less */
|
||||
@media -sass-debug-info{filename{font-family:file\:\/\/{pathesc}linenumbers\.less}line{font-family:\0000315}}
|
||||
.test1 {
|
||||
color: black;
|
||||
}
|
||||
/* line 6, {path}linenumbers.less */
|
||||
@media -sass-debug-info{filename{font-family:file\:\/\/{pathesc}linenumbers\.less}line{font-family:\000036}}
|
||||
.test2 {
|
||||
color: red;
|
||||
}
|
||||
@media all {
|
||||
/* line 5, {pathimport}test.less */
|
||||
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\000035}}
|
||||
.tst {
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
@media all and screen {
|
||||
/* line 7, {pathimport}test.less */
|
||||
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\000037}}
|
||||
.tst {
|
||||
color: red;
|
||||
}
|
||||
/* line 9, {pathimport}test.less */
|
||||
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\000039}}
|
||||
.tst .tst3 {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
/* line 18, {pathimport}test.less */
|
||||
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\0000318}}
|
||||
.tst2 {
|
||||
color: white;
|
||||
}
|
||||
35
node_modules/less/test/css/debug/linenumbers-comments.css
generated
vendored
Normal file
35
node_modules/less/test/css/debug/linenumbers-comments.css
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
@charset "UTF-8";
|
||||
/* line 3, {pathimport}test.less */
|
||||
/* @charset "ISO-8859-1"; */
|
||||
/* line 23, {pathimport}test.less */
|
||||
.tst3 {
|
||||
color: grey;
|
||||
}
|
||||
/* line 15, {path}linenumbers.less */
|
||||
.test1 {
|
||||
color: black;
|
||||
}
|
||||
/* line 6, {path}linenumbers.less */
|
||||
.test2 {
|
||||
color: red;
|
||||
}
|
||||
@media all {
|
||||
/* line 5, {pathimport}test.less */
|
||||
.tst {
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
@media all and screen {
|
||||
/* line 7, {pathimport}test.less */
|
||||
.tst {
|
||||
color: red;
|
||||
}
|
||||
/* line 9, {pathimport}test.less */
|
||||
.tst .tst3 {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
/* line 18, {pathimport}test.less */
|
||||
.tst2 {
|
||||
color: white;
|
||||
}
|
||||
35
node_modules/less/test/css/debug/linenumbers-mediaquery.css
generated
vendored
Normal file
35
node_modules/less/test/css/debug/linenumbers-mediaquery.css
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
@charset "UTF-8";
|
||||
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\000033}}
|
||||
/* @charset "ISO-8859-1"; */
|
||||
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\0000323}}
|
||||
.tst3 {
|
||||
color: grey;
|
||||
}
|
||||
@media -sass-debug-info{filename{font-family:file\:\/\/{pathesc}linenumbers\.less}line{font-family:\0000315}}
|
||||
.test1 {
|
||||
color: black;
|
||||
}
|
||||
@media -sass-debug-info{filename{font-family:file\:\/\/{pathesc}linenumbers\.less}line{font-family:\000036}}
|
||||
.test2 {
|
||||
color: red;
|
||||
}
|
||||
@media all {
|
||||
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\000035}}
|
||||
.tst {
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
@media all and screen {
|
||||
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\000037}}
|
||||
.tst {
|
||||
color: red;
|
||||
}
|
||||
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\000039}}
|
||||
.tst .tst3 {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
@media -sass-debug-info{filename{font-family:file\:\/\/{pathimportesc}test\.less}line{font-family:\0000318}}
|
||||
.tst2 {
|
||||
color: white;
|
||||
}
|
||||
72
node_modules/less/test/css/extend-chaining.css
generated
vendored
Normal file
72
node_modules/less/test/css/extend-chaining.css
generated
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
.a,
|
||||
.b,
|
||||
.c {
|
||||
color: black;
|
||||
}
|
||||
.f,
|
||||
.e,
|
||||
.d {
|
||||
color: black;
|
||||
}
|
||||
.g.h,
|
||||
.i.j.h,
|
||||
.k.j.h {
|
||||
color: black;
|
||||
}
|
||||
.i.j,
|
||||
.k.j {
|
||||
color: white;
|
||||
}
|
||||
.l,
|
||||
.m,
|
||||
.n,
|
||||
.o,
|
||||
.p,
|
||||
.q,
|
||||
.r,
|
||||
.s,
|
||||
.t {
|
||||
color: black;
|
||||
}
|
||||
.u,
|
||||
.v.u.v {
|
||||
color: black;
|
||||
}
|
||||
.w,
|
||||
.v.w.v {
|
||||
color: black;
|
||||
}
|
||||
.x,
|
||||
.y,
|
||||
.z {
|
||||
color: x;
|
||||
}
|
||||
.y,
|
||||
.z,
|
||||
.x {
|
||||
color: y;
|
||||
}
|
||||
.z,
|
||||
.x,
|
||||
.y {
|
||||
color: z;
|
||||
}
|
||||
@media tv {
|
||||
.ma,
|
||||
.mb,
|
||||
.mc {
|
||||
color: black;
|
||||
}
|
||||
.md,
|
||||
.ma,
|
||||
.mb,
|
||||
.mc {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
@media tv and plasma {
|
||||
.me,
|
||||
.mf {
|
||||
background: red;
|
||||
}
|
||||
}
|
||||
19
node_modules/less/test/css/extend-clearfix.css
generated
vendored
Normal file
19
node_modules/less/test/css/extend-clearfix.css
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
.clearfix,
|
||||
.foo,
|
||||
.bar {
|
||||
*zoom: 1;
|
||||
}
|
||||
.clearfix:after,
|
||||
.foo:after,
|
||||
.bar:after {
|
||||
content: '';
|
||||
display: block;
|
||||
clear: both;
|
||||
height: 0;
|
||||
}
|
||||
.foo {
|
||||
color: red;
|
||||
}
|
||||
.bar {
|
||||
color: blue;
|
||||
}
|
||||
37
node_modules/less/test/css/extend-exact.css
generated
vendored
Normal file
37
node_modules/less/test/css/extend-exact.css
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
.replace.replace .replace,
|
||||
.c.replace + .replace .replace,
|
||||
.replace.replace .c,
|
||||
.c.replace + .replace .c,
|
||||
.rep_ace {
|
||||
prop: copy-paste-replace;
|
||||
}
|
||||
.a .b .c {
|
||||
prop: not_effected;
|
||||
}
|
||||
.a,
|
||||
.effected {
|
||||
prop: is_effected;
|
||||
}
|
||||
.a .b {
|
||||
prop: not_effected;
|
||||
}
|
||||
.a .b.c {
|
||||
prop: not_effected;
|
||||
}
|
||||
.c .b .a,
|
||||
.a .b .a,
|
||||
.c .a .a,
|
||||
.a .a .a,
|
||||
.c .b .c,
|
||||
.a .b .c,
|
||||
.c .a .c,
|
||||
.a .a .c {
|
||||
prop: not_effected;
|
||||
}
|
||||
.e.e,
|
||||
.dbl {
|
||||
prop: extend-double;
|
||||
}
|
||||
.e.e:hover {
|
||||
hover: not-extended;
|
||||
}
|
||||
24
node_modules/less/test/css/extend-media.css
generated
vendored
Normal file
24
node_modules/less/test/css/extend-media.css
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
.ext1 .ext2,
|
||||
.all .ext2 {
|
||||
background: black;
|
||||
}
|
||||
@media tv {
|
||||
.ext1 .ext3,
|
||||
.tv-lowres .ext3,
|
||||
.all .ext3 {
|
||||
color: white;
|
||||
}
|
||||
.tv-lowres {
|
||||
background: blue;
|
||||
}
|
||||
}
|
||||
@media tv and hires {
|
||||
.ext1 .ext4,
|
||||
.tv-hires .ext4,
|
||||
.all .ext4 {
|
||||
color: green;
|
||||
}
|
||||
.tv-hires {
|
||||
background: red;
|
||||
}
|
||||
}
|
||||
57
node_modules/less/test/css/extend-nest.css
generated
vendored
Normal file
57
node_modules/less/test/css/extend-nest.css
generated
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
.sidebar,
|
||||
.sidebar2,
|
||||
.type1 .sidebar3,
|
||||
.type2.sidebar4 {
|
||||
width: 300px;
|
||||
background: red;
|
||||
}
|
||||
.sidebar .box,
|
||||
.sidebar2 .box,
|
||||
.type1 .sidebar3 .box,
|
||||
.type2.sidebar4 .box {
|
||||
background: #FFF;
|
||||
border: 1px solid #000;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.sidebar2 {
|
||||
background: blue;
|
||||
}
|
||||
.type1 .sidebar3 {
|
||||
background: green;
|
||||
}
|
||||
.type2.sidebar4 {
|
||||
background: red;
|
||||
}
|
||||
.button,
|
||||
.submit {
|
||||
color: black;
|
||||
}
|
||||
.button:hover,
|
||||
.submit:hover {
|
||||
color: white;
|
||||
}
|
||||
.button2 :hover {
|
||||
nested: white;
|
||||
}
|
||||
.button2 :hover {
|
||||
notnested: black;
|
||||
}
|
||||
.amp-test-h,
|
||||
.amp-test-f.amp-test-c .amp-test-a.amp-test-d.amp-test-a.amp-test-e + .amp-test-c .amp-test-a.amp-test-d.amp-test-a.amp-test-e.amp-test-g,
|
||||
.amp-test-f.amp-test-c .amp-test-a.amp-test-d.amp-test-a.amp-test-e + .amp-test-c .amp-test-a.amp-test-d.amp-test-b.amp-test-e.amp-test-g,
|
||||
.amp-test-f.amp-test-c .amp-test-a.amp-test-d.amp-test-a.amp-test-e + .amp-test-c .amp-test-b.amp-test-d.amp-test-a.amp-test-e.amp-test-g,
|
||||
.amp-test-f.amp-test-c .amp-test-a.amp-test-d.amp-test-a.amp-test-e + .amp-test-c .amp-test-b.amp-test-d.amp-test-b.amp-test-e.amp-test-g,
|
||||
.amp-test-f.amp-test-c .amp-test-a.amp-test-d.amp-test-b.amp-test-e + .amp-test-c .amp-test-a.amp-test-d.amp-test-a.amp-test-e.amp-test-g,
|
||||
.amp-test-f.amp-test-c .amp-test-a.amp-test-d.amp-test-b.amp-test-e + .amp-test-c .amp-test-a.amp-test-d.amp-test-b.amp-test-e.amp-test-g,
|
||||
.amp-test-f.amp-test-c .amp-test-a.amp-test-d.amp-test-b.amp-test-e + .amp-test-c .amp-test-b.amp-test-d.amp-test-a.amp-test-e.amp-test-g,
|
||||
.amp-test-f.amp-test-c .amp-test-a.amp-test-d.amp-test-b.amp-test-e + .amp-test-c .amp-test-b.amp-test-d.amp-test-b.amp-test-e.amp-test-g,
|
||||
.amp-test-f.amp-test-c .amp-test-b.amp-test-d.amp-test-a.amp-test-e + .amp-test-c .amp-test-a.amp-test-d.amp-test-a.amp-test-e.amp-test-g,
|
||||
.amp-test-f.amp-test-c .amp-test-b.amp-test-d.amp-test-a.amp-test-e + .amp-test-c .amp-test-a.amp-test-d.amp-test-b.amp-test-e.amp-test-g,
|
||||
.amp-test-f.amp-test-c .amp-test-b.amp-test-d.amp-test-a.amp-test-e + .amp-test-c .amp-test-b.amp-test-d.amp-test-a.amp-test-e.amp-test-g,
|
||||
.amp-test-f.amp-test-c .amp-test-b.amp-test-d.amp-test-a.amp-test-e + .amp-test-c .amp-test-b.amp-test-d.amp-test-b.amp-test-e.amp-test-g,
|
||||
.amp-test-f.amp-test-c .amp-test-b.amp-test-d.amp-test-b.amp-test-e + .amp-test-c .amp-test-a.amp-test-d.amp-test-a.amp-test-e.amp-test-g,
|
||||
.amp-test-f.amp-test-c .amp-test-b.amp-test-d.amp-test-b.amp-test-e + .amp-test-c .amp-test-a.amp-test-d.amp-test-b.amp-test-e.amp-test-g,
|
||||
.amp-test-f.amp-test-c .amp-test-b.amp-test-d.amp-test-b.amp-test-e + .amp-test-c .amp-test-b.amp-test-d.amp-test-a.amp-test-e.amp-test-g,
|
||||
.amp-test-f.amp-test-c .amp-test-b.amp-test-d.amp-test-b.amp-test-e + .amp-test-c .amp-test-b.amp-test-d.amp-test-b.amp-test-e.amp-test-g {
|
||||
test: extended by masses of selectors;
|
||||
}
|
||||
72
node_modules/less/test/css/extend-selector.css
generated
vendored
Normal file
72
node_modules/less/test/css/extend-selector.css
generated
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
.error,
|
||||
.badError {
|
||||
border: 1px #f00;
|
||||
background: #fdd;
|
||||
}
|
||||
.error.intrusion,
|
||||
.badError.intrusion {
|
||||
font-size: 1.3em;
|
||||
font-weight: bold;
|
||||
}
|
||||
.intrusion .error,
|
||||
.intrusion .badError {
|
||||
display: none;
|
||||
}
|
||||
.badError {
|
||||
border-width: 3px;
|
||||
}
|
||||
.foo .bar,
|
||||
.foo .baz,
|
||||
.ext1 .ext2 .bar,
|
||||
.ext1 .ext2 .baz,
|
||||
.ext3 .bar,
|
||||
.ext3 .baz,
|
||||
.ext4 .bar,
|
||||
.ext4 .baz {
|
||||
display: none;
|
||||
}
|
||||
div.ext5,
|
||||
.ext6 > .ext5,
|
||||
div.ext7,
|
||||
.ext6 > .ext7 {
|
||||
width: 100px;
|
||||
}
|
||||
.ext,
|
||||
.a .c,
|
||||
.b .c {
|
||||
test: 1;
|
||||
}
|
||||
.a,
|
||||
.b {
|
||||
test: 2;
|
||||
}
|
||||
.a .c,
|
||||
.b .c {
|
||||
test: 3;
|
||||
}
|
||||
.a .c .d,
|
||||
.b .c .d {
|
||||
test: 4;
|
||||
}
|
||||
.replace.replace .replace,
|
||||
.c.replace + .replace .replace,
|
||||
.replace.replace .c,
|
||||
.c.replace + .replace .c,
|
||||
.rep_ace .rep_ace .rep_ace,
|
||||
.c.rep_ace + .rep_ace .rep_ace,
|
||||
.rep_ace .rep_ace .c,
|
||||
.c.rep_ace + .rep_ace .c {
|
||||
prop: copy-paste-replace;
|
||||
}
|
||||
.attributes [data="test"],
|
||||
.attributes .attributes .attribute-test {
|
||||
extend: attributes;
|
||||
}
|
||||
.attributes [data],
|
||||
.attributes .attributes .attribute-test2 {
|
||||
extend: attributes2;
|
||||
}
|
||||
.attributes [data="test3"],
|
||||
.attributes .attributes .attribute-test {
|
||||
extend: attributes2;
|
||||
}
|
||||
76
node_modules/less/test/css/extend.css
generated
vendored
Normal file
76
node_modules/less/test/css/extend.css
generated
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
.error,
|
||||
.badError {
|
||||
border: 1px #f00;
|
||||
background: #fdd;
|
||||
}
|
||||
.error.intrusion,
|
||||
.badError.intrusion {
|
||||
font-size: 1.3em;
|
||||
font-weight: bold;
|
||||
}
|
||||
.intrusion .error,
|
||||
.intrusion .badError {
|
||||
display: none;
|
||||
}
|
||||
.badError {
|
||||
border-width: 3px;
|
||||
}
|
||||
.foo .bar,
|
||||
.foo .baz,
|
||||
.ext1 .ext2 .bar,
|
||||
.ext1 .ext2 .baz,
|
||||
.ext3 .bar,
|
||||
.ext3 .baz,
|
||||
.foo .ext3,
|
||||
.ext4 .bar,
|
||||
.ext4 .baz,
|
||||
.foo .ext4 {
|
||||
display: none;
|
||||
}
|
||||
div.ext5,
|
||||
.ext6 > .ext5,
|
||||
div.ext7,
|
||||
.ext6 > .ext7 {
|
||||
width: 100px;
|
||||
}
|
||||
.ext8.ext9,
|
||||
.fuu {
|
||||
result: add-foo;
|
||||
}
|
||||
.ext8 .ext9,
|
||||
.ext8 + .ext9,
|
||||
.ext8 > .ext9,
|
||||
.buu,
|
||||
.zap,
|
||||
.zoo {
|
||||
result: bar-matched;
|
||||
}
|
||||
.ext8.nomatch {
|
||||
result: none;
|
||||
}
|
||||
.ext8 .ext9,
|
||||
.buu {
|
||||
result: match-nested-bar;
|
||||
}
|
||||
.ext8.ext9,
|
||||
.fuu {
|
||||
result: match-nested-foo;
|
||||
}
|
||||
.aa,
|
||||
.cc {
|
||||
color: black;
|
||||
}
|
||||
.aa .dd,
|
||||
.aa .ee {
|
||||
background: red;
|
||||
}
|
||||
.bb,
|
||||
.cc,
|
||||
.ee,
|
||||
.ff {
|
||||
background: red;
|
||||
}
|
||||
.bb .bb,
|
||||
.ff .ff {
|
||||
color: black;
|
||||
}
|
||||
128
node_modules/less/test/css/functions.css
generated
vendored
Normal file
128
node_modules/less/test/css/functions.css
generated
vendored
Normal file
@ -0,0 +1,128 @@
|
||||
#functions {
|
||||
color: #660000;
|
||||
width: 16;
|
||||
height: undefined("self");
|
||||
border-width: 5;
|
||||
variable: 11;
|
||||
background: linear-gradient(#000000, #ffffff);
|
||||
}
|
||||
#built-in {
|
||||
escaped: -Some::weird(#thing, y);
|
||||
lighten: #ffcccc;
|
||||
darken: #330000;
|
||||
saturate: #203c31;
|
||||
desaturate: #29332f;
|
||||
greyscale: #2e2e2e;
|
||||
hsl-clamp: #ffffff;
|
||||
spin-p: #bf6a40;
|
||||
spin-n: #bf4055;
|
||||
luma-white: 100%;
|
||||
luma-black: 0%;
|
||||
luma-black-alpha: 0%;
|
||||
luma-red: 21%;
|
||||
luma-green: 72%;
|
||||
luma-blue: 7%;
|
||||
luma-yellow: 93%;
|
||||
luma-cyan: 79%;
|
||||
luma-white-alpha: 50%;
|
||||
contrast-filter: contrast(30%);
|
||||
contrast-white: #000000;
|
||||
contrast-black: #ffffff;
|
||||
contrast-red: #ffffff;
|
||||
contrast-green: #000000;
|
||||
contrast-blue: #ffffff;
|
||||
contrast-yellow: #000000;
|
||||
contrast-cyan: #000000;
|
||||
contrast-light: #111111;
|
||||
contrast-dark: #eeeeee;
|
||||
contrast-wrongorder: #111111;
|
||||
contrast-light-thresh: #111111;
|
||||
contrast-dark-thresh: #eeeeee;
|
||||
contrast-high-thresh: #eeeeee;
|
||||
contrast-low-thresh: #111111;
|
||||
contrast-light-thresh-per: #111111;
|
||||
contrast-dark-thresh-per: #eeeeee;
|
||||
contrast-high-thresh-per: #eeeeee;
|
||||
contrast-low-thresh-per: #111111;
|
||||
format: "rgb(32, 128, 64)";
|
||||
format-string: "hello world";
|
||||
format-multiple: "hello earth 2";
|
||||
format-url-encode: "red is %23ff0000";
|
||||
eformat: rgb(32, 128, 64);
|
||||
unitless: 12;
|
||||
unit: 14em;
|
||||
hue: 98;
|
||||
saturation: 12%;
|
||||
lightness: 95%;
|
||||
hsvhue: 98;
|
||||
hsvsaturation: 12%;
|
||||
hsvvalue: 95%;
|
||||
red: 255;
|
||||
green: 255;
|
||||
blue: 255;
|
||||
rounded: 11;
|
||||
rounded-two: 10.67;
|
||||
roundedpx: 3px;
|
||||
roundedpx-three: 3.333px;
|
||||
rounded-percentage: 10%;
|
||||
ceil: 11px;
|
||||
floor: 12px;
|
||||
sqrt: 5px;
|
||||
pi: 3.141592653589793;
|
||||
mod: 2m;
|
||||
abs: 4%;
|
||||
tan: 0.9004040442978399;
|
||||
sin: 0.17364817766693033;
|
||||
cos: 0.8438539587324921;
|
||||
atan: 0.1rad;
|
||||
atan: 34.00000000000001deg;
|
||||
atan: 45.00000000000001deg;
|
||||
pow: 64px;
|
||||
pow: 64;
|
||||
pow: 27;
|
||||
percentage: 20%;
|
||||
color: #ff0011;
|
||||
tint: #898989;
|
||||
tint-full: #ffffff;
|
||||
tint-percent: #898989;
|
||||
shade: #686868;
|
||||
shade-full: #000000;
|
||||
shade-percent: #686868;
|
||||
fade-out: rgba(255, 0, 0, 0.95);
|
||||
fade-in: rgba(255, 0, 0, 0.9500000000000001);
|
||||
hsv: #4d2926;
|
||||
hsva: rgba(77, 40, 38, 0.2);
|
||||
mix: #ff3300;
|
||||
mix-0: #ffff00;
|
||||
mix-100: #ff0000;
|
||||
mix-weightless: #ff8000;
|
||||
}
|
||||
#built-in .is-a {
|
||||
color: true;
|
||||
color1: true;
|
||||
color2: true;
|
||||
keyword: true;
|
||||
number: true;
|
||||
string: true;
|
||||
pixel: true;
|
||||
percent: true;
|
||||
em: true;
|
||||
cat: true;
|
||||
}
|
||||
#alpha {
|
||||
alpha: rgba(153, 94, 51, 0.6);
|
||||
}
|
||||
#blendmodes {
|
||||
multiply: #ed0000;
|
||||
screen: #f600f6;
|
||||
overlay: #ed0000;
|
||||
softlight: #ff0000;
|
||||
hardlight: #0000ed;
|
||||
difference: #f600f6;
|
||||
exclusion: #f600f6;
|
||||
average: #7b007b;
|
||||
negation: #d73131;
|
||||
}
|
||||
#extract {
|
||||
result: 3 2 1 C B A;
|
||||
}
|
||||
9
node_modules/less/test/css/ie-filters.css
generated
vendored
Normal file
9
node_modules/less/test/css/ie-filters.css
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
.nav {
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=20);
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#333333", endColorstr="#000000", GradientType=0);
|
||||
}
|
||||
.evalTest1 {
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=30);
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=5);
|
||||
}
|
||||
6
node_modules/less/test/css/import-interpolation.css
generated
vendored
Normal file
6
node_modules/less/test/css/import-interpolation.css
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
body {
|
||||
width: 100%;
|
||||
}
|
||||
.a {
|
||||
var: test;
|
||||
}
|
||||
3
node_modules/less/test/css/import-once.css
generated
vendored
Normal file
3
node_modules/less/test/css/import-once.css
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
#import {
|
||||
color: #ff0000;
|
||||
}
|
||||
38
node_modules/less/test/css/import.css
generated
vendored
Normal file
38
node_modules/less/test/css/import.css
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
@import url(http://fonts.googleapis.com/css?family=Open+Sans);
|
||||
|
||||
@import url(/absolute/something.css) screen and (color) and (max-width: 600px);
|
||||
|
||||
@import url("//ha.com/file.css") (min-width: 100px);
|
||||
#import-test {
|
||||
height: 10px;
|
||||
color: #ff0000;
|
||||
width: 10px;
|
||||
height: 30%;
|
||||
}
|
||||
@media screen and (max-width: 600px) {
|
||||
body {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
#import {
|
||||
color: #ff0000;
|
||||
}
|
||||
.mixin {
|
||||
height: 10px;
|
||||
color: #ff0000;
|
||||
}
|
||||
@media screen and (max-width: 601px) {
|
||||
#css {
|
||||
color: yellow;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 602px) {
|
||||
body {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 603px) {
|
||||
#css {
|
||||
color: yellow;
|
||||
}
|
||||
}
|
||||
23
node_modules/less/test/css/javascript.css
generated
vendored
Normal file
23
node_modules/less/test/css/javascript.css
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
.eval {
|
||||
js: 42;
|
||||
js: 2;
|
||||
js: "hello world";
|
||||
js: 1, 2, 3;
|
||||
title: "string";
|
||||
ternary: true;
|
||||
multiline: 2;
|
||||
}
|
||||
.scope {
|
||||
var: 42;
|
||||
escaped: 7px;
|
||||
}
|
||||
.vars {
|
||||
width: 8;
|
||||
}
|
||||
.escape-interpol {
|
||||
width: hello world;
|
||||
}
|
||||
.arrays {
|
||||
ary: "1, 2, 3";
|
||||
ary1: "1, 2, 3";
|
||||
}
|
||||
3
node_modules/less/test/css/lazy-eval.css
generated
vendored
Normal file
3
node_modules/less/test/css/lazy-eval.css
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.lazy-eval {
|
||||
width: 100%;
|
||||
}
|
||||
7
node_modules/less/test/css/legacy/legacy.css
generated
vendored
Normal file
7
node_modules/less/test/css/legacy/legacy.css
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
@media (-o-min-device-pixel-ratio: 2/1) {
|
||||
.test-math-and-units {
|
||||
font: ignores 0/0 rules;
|
||||
test-division: 7em;
|
||||
simple: 2px;
|
||||
}
|
||||
}
|
||||
203
node_modules/less/test/css/media.css
generated
vendored
Normal file
203
node_modules/less/test/css/media.css
generated
vendored
Normal file
@ -0,0 +1,203 @@
|
||||
@media print {
|
||||
.class {
|
||||
color: blue;
|
||||
}
|
||||
.class .sub {
|
||||
width: 42;
|
||||
}
|
||||
.top,
|
||||
header > h1 {
|
||||
color: #444444;
|
||||
}
|
||||
}
|
||||
@media screen {
|
||||
body {
|
||||
max-width: 480;
|
||||
}
|
||||
}
|
||||
@media all and (device-aspect-ratio: 16 / 9) {
|
||||
body {
|
||||
max-width: 800px;
|
||||
}
|
||||
}
|
||||
@media all and (orientation: portrait) {
|
||||
aside {
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
@media handheld and (min-width: 42), screen and (min-width: 20em) {
|
||||
body {
|
||||
max-width: 480px;
|
||||
}
|
||||
}
|
||||
@media print {
|
||||
body {
|
||||
padding: 20px;
|
||||
}
|
||||
body header {
|
||||
background-color: red;
|
||||
}
|
||||
}
|
||||
@media print and (orientation: landscape) {
|
||||
body {
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
@media screen {
|
||||
.sidebar {
|
||||
width: 300px;
|
||||
}
|
||||
}
|
||||
@media screen and (orientation: landscape) {
|
||||
.sidebar {
|
||||
width: 500px;
|
||||
}
|
||||
}
|
||||
@media a {
|
||||
|
||||
}
|
||||
@media a and b {
|
||||
.first .second .third {
|
||||
width: 300px;
|
||||
}
|
||||
.first .second .fourth {
|
||||
width: 3;
|
||||
}
|
||||
}
|
||||
@media a and b and c {
|
||||
.first .second .third {
|
||||
width: 500px;
|
||||
}
|
||||
}
|
||||
@media a, b and c {
|
||||
body {
|
||||
width: 95%;
|
||||
}
|
||||
}
|
||||
@media a and x, b and c and x, a and y, b and c and y {
|
||||
body {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.a {
|
||||
background: black;
|
||||
}
|
||||
@media handheld {
|
||||
.a {
|
||||
background: white;
|
||||
}
|
||||
}
|
||||
@media handheld and (max-width: 100px) {
|
||||
.a {
|
||||
background: red;
|
||||
}
|
||||
}
|
||||
.b {
|
||||
background: black;
|
||||
}
|
||||
@media handheld {
|
||||
.b {
|
||||
background: white;
|
||||
}
|
||||
}
|
||||
@media handheld and (max-width: 200px) {
|
||||
.b {
|
||||
background: red;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 200px) {
|
||||
width: 480px;
|
||||
}
|
||||
@media print {
|
||||
@page :left {
|
||||
margin: 0.5cm;
|
||||
}
|
||||
@page :right {
|
||||
margin: 0.5cm;
|
||||
}
|
||||
@page Test:first {
|
||||
margin: 1cm;
|
||||
}
|
||||
@page :first {
|
||||
size: 8.5in 11in;@top-left {
|
||||
margin: 1cm;
|
||||
}
|
||||
@top-left-corner {
|
||||
margin: 1cm;
|
||||
}
|
||||
@top-center {
|
||||
margin: 1cm;
|
||||
}
|
||||
@top-right {
|
||||
margin: 1cm;
|
||||
}
|
||||
@top-right-corner {
|
||||
margin: 1cm;
|
||||
}
|
||||
@bottom-left {
|
||||
margin: 1cm;
|
||||
}
|
||||
@bottom-left-corner {
|
||||
margin: 1cm;
|
||||
}
|
||||
@bottom-center {
|
||||
margin: 1cm;
|
||||
}
|
||||
@bottom-right {
|
||||
margin: 1cm;
|
||||
}
|
||||
@bottom-right-corner {
|
||||
margin: 1cm;
|
||||
}
|
||||
@left-top {
|
||||
margin: 1cm;
|
||||
}
|
||||
@left-middle {
|
||||
margin: 1cm;
|
||||
}
|
||||
@left-bottom {
|
||||
margin: 1cm;
|
||||
}
|
||||
@right-top {
|
||||
margin: 1cm;
|
||||
}
|
||||
@right-middle {
|
||||
content: "Page " counter(page);
|
||||
}
|
||||
@right-bottom {
|
||||
margin: 1cm;
|
||||
}
|
||||
}
|
||||
}
|
||||
@media (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: 2/1), (min-resolution: 2dppx), (min-resolution: 128dpcm) {
|
||||
.b {
|
||||
background: red;
|
||||
}
|
||||
}
|
||||
body {
|
||||
background: red;
|
||||
}
|
||||
@media (max-width: 500px) {
|
||||
body {
|
||||
background: green;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1000px) {
|
||||
body {
|
||||
background: red;
|
||||
background: blue;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1000px) and (max-width: 500px) {
|
||||
body {
|
||||
background: green;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1200px) {
|
||||
/* a comment */
|
||||
}
|
||||
@media (max-width: 1200px) and (max-width: 900px) {
|
||||
body {
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
113
node_modules/less/test/css/mixins-args.css
generated
vendored
Normal file
113
node_modules/less/test/css/mixins-args.css
generated
vendored
Normal file
@ -0,0 +1,113 @@
|
||||
#hidden {
|
||||
color: transparent;
|
||||
}
|
||||
#hidden1 {
|
||||
color: transparent;
|
||||
}
|
||||
.two-args {
|
||||
color: blue;
|
||||
width: 10px;
|
||||
height: 99%;
|
||||
border: 2px dotted #000000;
|
||||
}
|
||||
.one-arg {
|
||||
width: 15px;
|
||||
height: 49%;
|
||||
}
|
||||
.no-parens {
|
||||
width: 5px;
|
||||
height: 49%;
|
||||
}
|
||||
.no-args {
|
||||
width: 5px;
|
||||
height: 49%;
|
||||
}
|
||||
.var-args {
|
||||
width: 45;
|
||||
height: 17%;
|
||||
}
|
||||
.multi-mix {
|
||||
width: 10px;
|
||||
height: 29%;
|
||||
margin: 4;
|
||||
padding: 5;
|
||||
}
|
||||
body {
|
||||
padding: 30px;
|
||||
color: #ff0000;
|
||||
}
|
||||
.scope-mix {
|
||||
width: 8;
|
||||
}
|
||||
.content {
|
||||
width: 600px;
|
||||
}
|
||||
.content .column {
|
||||
margin: 600px;
|
||||
}
|
||||
#same-var-name {
|
||||
radius: 5px;
|
||||
}
|
||||
#var-inside {
|
||||
width: 10px;
|
||||
}
|
||||
.arguments {
|
||||
border: 1px solid #000000;
|
||||
width: 1px;
|
||||
}
|
||||
.arguments2 {
|
||||
border: 0px;
|
||||
width: 0px;
|
||||
}
|
||||
.arguments3 {
|
||||
border: 0px;
|
||||
width: 0px;
|
||||
}
|
||||
.arguments4 {
|
||||
border: 0 1 2 3 4;
|
||||
rest: 1 2 3 4;
|
||||
width: 0;
|
||||
}
|
||||
.edge-case {
|
||||
border: "{";
|
||||
width: "{";
|
||||
}
|
||||
.slash-vs-math {
|
||||
border-radius: 2px/5px;
|
||||
border-radius: 5px/10px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.comma-vs-semi-colon {
|
||||
one: a;
|
||||
two: b, c;
|
||||
one: d, e;
|
||||
two: f;
|
||||
one: g;
|
||||
one: h;
|
||||
one: i;
|
||||
one: j;
|
||||
one: k;
|
||||
two: l;
|
||||
one: m, n;
|
||||
one: o, p;
|
||||
two: q;
|
||||
one: r, s;
|
||||
two: t;
|
||||
}
|
||||
#named-conflict {
|
||||
four: a, 11, 12, 13;
|
||||
four: a, 21, 22, 23;
|
||||
}
|
||||
.test-mixin-default-arg {
|
||||
defaults: 1px 1px 1px;
|
||||
defaults: 2px 2px 2px;
|
||||
}
|
||||
.selector {
|
||||
margin: 2, 2, 2, 2;
|
||||
}
|
||||
.selector2 {
|
||||
margin: 2, 2, 2, 2;
|
||||
}
|
||||
.selector3 {
|
||||
margin: 4;
|
||||
}
|
||||
9
node_modules/less/test/css/mixins-closure.css
generated
vendored
Normal file
9
node_modules/less/test/css/mixins-closure.css
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
.class {
|
||||
width: 99px;
|
||||
}
|
||||
.overwrite {
|
||||
width: 99px;
|
||||
}
|
||||
.nested .class {
|
||||
width: 5px;
|
||||
}
|
||||
76
node_modules/less/test/css/mixins-guards.css
generated
vendored
Normal file
76
node_modules/less/test/css/mixins-guards.css
generated
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
.light1 {
|
||||
color: white;
|
||||
margin: 1px;
|
||||
}
|
||||
.light2 {
|
||||
color: black;
|
||||
margin: 1px;
|
||||
}
|
||||
.max1 {
|
||||
width: 6;
|
||||
}
|
||||
.max2 {
|
||||
width: 8;
|
||||
}
|
||||
.glob1 {
|
||||
margin: auto auto;
|
||||
}
|
||||
.ops1 {
|
||||
height: gt-or-eq;
|
||||
height: lt-or-eq;
|
||||
}
|
||||
.ops2 {
|
||||
height: gt-or-eq;
|
||||
height: not-eq;
|
||||
}
|
||||
.ops3 {
|
||||
height: lt-or-eq;
|
||||
height: not-eq;
|
||||
}
|
||||
.default1 {
|
||||
content: default;
|
||||
}
|
||||
.test1 {
|
||||
content: "true.";
|
||||
}
|
||||
.test2 {
|
||||
content: "false.";
|
||||
}
|
||||
.test3 {
|
||||
content: "false.";
|
||||
}
|
||||
.test4 {
|
||||
content: "false.";
|
||||
}
|
||||
.test5 {
|
||||
content: "false.";
|
||||
}
|
||||
.bool1 {
|
||||
content: true and true;
|
||||
content: true;
|
||||
content: false, true;
|
||||
content: false and true and true, true;
|
||||
content: false, true and true;
|
||||
content: false, false, true;
|
||||
content: false, true and true and true, false;
|
||||
content: not false;
|
||||
content: not false and false, not false;
|
||||
}
|
||||
.equality-units {
|
||||
test: pass;
|
||||
}
|
||||
.colorguardtest {
|
||||
content: is #ff0000;
|
||||
content: is not #0000ff its #ff0000;
|
||||
content: is not #0000ff its #800080;
|
||||
}
|
||||
.stringguardtest {
|
||||
content: is theme1;
|
||||
content: is not theme2;
|
||||
content: is theme1 no quotes;
|
||||
}
|
||||
#tryNumberPx {
|
||||
catch: all;
|
||||
declare: 4;
|
||||
declare: 4px;
|
||||
}
|
||||
38
node_modules/less/test/css/mixins-important.css
generated
vendored
Normal file
38
node_modules/less/test/css/mixins-important.css
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
.class {
|
||||
border: 1;
|
||||
boxer: 1;
|
||||
border: 2 !important;
|
||||
boxer: 2 !important;
|
||||
border: 3;
|
||||
boxer: 3;
|
||||
border: 4 !important;
|
||||
boxer: 4 !important;
|
||||
border: 5;
|
||||
boxer: 5;
|
||||
border: 0 !important;
|
||||
boxer: 0 !important;
|
||||
border: 9 !important;
|
||||
border: 9;
|
||||
boxer: 9;
|
||||
}
|
||||
.class .inner {
|
||||
test: 1;
|
||||
}
|
||||
.class .inner {
|
||||
test: 2 !important;
|
||||
}
|
||||
.class .inner {
|
||||
test: 3;
|
||||
}
|
||||
.class .inner {
|
||||
test: 4 !important;
|
||||
}
|
||||
.class .inner {
|
||||
test: 5;
|
||||
}
|
||||
.class .inner {
|
||||
test: 0 !important;
|
||||
}
|
||||
.class .inner {
|
||||
test: 9;
|
||||
}
|
||||
27
node_modules/less/test/css/mixins-named-args.css
generated
vendored
Normal file
27
node_modules/less/test/css/mixins-named-args.css
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
.named-arg {
|
||||
color: blue;
|
||||
width: 5px;
|
||||
height: 99%;
|
||||
args: 1px 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.class {
|
||||
width: 5px;
|
||||
height: 19%;
|
||||
args: 1px 20%;
|
||||
}
|
||||
.all-args-wrong-args {
|
||||
width: 10px;
|
||||
height: 9%;
|
||||
args: 2px 10%;
|
||||
}
|
||||
.named-args2 {
|
||||
width: 15px;
|
||||
height: 49%;
|
||||
color: #646464;
|
||||
}
|
||||
.named-args3 {
|
||||
width: 5px;
|
||||
height: 29%;
|
||||
color: #123456;
|
||||
}
|
||||
14
node_modules/less/test/css/mixins-nested.css
generated
vendored
Normal file
14
node_modules/less/test/css/mixins-nested.css
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
.class .inner {
|
||||
height: 300;
|
||||
}
|
||||
.class .inner .innest {
|
||||
width: 30;
|
||||
border-width: 60;
|
||||
}
|
||||
.class2 .inner {
|
||||
height: 600;
|
||||
}
|
||||
.class2 .inner .innest {
|
||||
width: 60;
|
||||
border-width: 120;
|
||||
}
|
||||
47
node_modules/less/test/css/mixins-pattern.css
generated
vendored
Normal file
47
node_modules/less/test/css/mixins-pattern.css
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
.zero {
|
||||
variadic: true;
|
||||
zero: 0;
|
||||
one: 1;
|
||||
two: 2;
|
||||
three: 3;
|
||||
}
|
||||
.one {
|
||||
variadic: true;
|
||||
one: 1;
|
||||
one-req: 1;
|
||||
two: 2;
|
||||
three: 3;
|
||||
}
|
||||
.two {
|
||||
variadic: true;
|
||||
two: 2;
|
||||
three: 3;
|
||||
}
|
||||
.three {
|
||||
variadic: true;
|
||||
three-req: 3;
|
||||
three: 3;
|
||||
}
|
||||
.left {
|
||||
left: 1;
|
||||
}
|
||||
.right {
|
||||
right: 1;
|
||||
}
|
||||
.border-right {
|
||||
color: black;
|
||||
border-right: 4px;
|
||||
}
|
||||
.border-left {
|
||||
color: black;
|
||||
border-left: 4px;
|
||||
}
|
||||
.only-right {
|
||||
right: 33;
|
||||
}
|
||||
.only-left {
|
||||
left: 33;
|
||||
}
|
||||
.left-right {
|
||||
both: 330;
|
||||
}
|
||||
121
node_modules/less/test/css/mixins.css
generated
vendored
Normal file
121
node_modules/less/test/css/mixins.css
generated
vendored
Normal file
@ -0,0 +1,121 @@
|
||||
.mixin {
|
||||
border: 1px solid black;
|
||||
}
|
||||
.mixout {
|
||||
border-color: orange;
|
||||
}
|
||||
.borders {
|
||||
border-style: dashed;
|
||||
}
|
||||
#namespace .borders {
|
||||
border-style: dotted;
|
||||
}
|
||||
#namespace .biohazard {
|
||||
content: "death";
|
||||
}
|
||||
#namespace .biohazard .man {
|
||||
color: transparent;
|
||||
}
|
||||
#theme > .mixin {
|
||||
background-color: grey;
|
||||
}
|
||||
#container {
|
||||
color: black;
|
||||
border: 1px solid black;
|
||||
border-color: orange;
|
||||
background-color: grey;
|
||||
}
|
||||
#header .milk {
|
||||
color: white;
|
||||
border: 1px solid black;
|
||||
background-color: grey;
|
||||
}
|
||||
#header #cookie {
|
||||
border-style: dashed;
|
||||
}
|
||||
#header #cookie .chips {
|
||||
border-style: dotted;
|
||||
}
|
||||
#header #cookie .chips .calories {
|
||||
color: black;
|
||||
border: 1px solid black;
|
||||
border-color: orange;
|
||||
background-color: grey;
|
||||
}
|
||||
.secure-zone {
|
||||
color: transparent;
|
||||
}
|
||||
.direct {
|
||||
border-style: dotted;
|
||||
}
|
||||
.bo,
|
||||
.bar {
|
||||
width: 100%;
|
||||
}
|
||||
.bo {
|
||||
border: 1px;
|
||||
}
|
||||
.ar.bo.ca {
|
||||
color: black;
|
||||
}
|
||||
.jo.ki {
|
||||
background: none;
|
||||
}
|
||||
.amp.support {
|
||||
color: orange;
|
||||
}
|
||||
.extended {
|
||||
width: 100%;
|
||||
border: 1px;
|
||||
background: none;
|
||||
color: orange;
|
||||
}
|
||||
.foo .bar {
|
||||
width: 100%;
|
||||
}
|
||||
.underParents {
|
||||
color: red;
|
||||
}
|
||||
.parent .underParents {
|
||||
color: red;
|
||||
}
|
||||
* + h1 {
|
||||
margin-top: 25px;
|
||||
}
|
||||
legend + h1 {
|
||||
margin-top: 0;
|
||||
}
|
||||
h1 + * {
|
||||
margin-top: 10px;
|
||||
}
|
||||
* + h2 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
legend + h2 {
|
||||
margin-top: 0;
|
||||
}
|
||||
h2 + * {
|
||||
margin-top: 8px;
|
||||
}
|
||||
* + h3 {
|
||||
margin-top: 15px;
|
||||
}
|
||||
legend + h3 {
|
||||
margin-top: 0;
|
||||
}
|
||||
h3 + * {
|
||||
margin-top: 5px;
|
||||
}
|
||||
.error {
|
||||
background-image: "/a.png";
|
||||
background-position: center center;
|
||||
}
|
||||
.test-rec .recursion {
|
||||
color: black;
|
||||
}
|
||||
.button {
|
||||
padding-left: 44px;
|
||||
}
|
||||
.button.large {
|
||||
padding-left: 40em;
|
||||
}
|
||||
49
node_modules/less/test/css/operations.css
generated
vendored
Normal file
49
node_modules/less/test/css/operations.css
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
#operations {
|
||||
color: #111111;
|
||||
height: 9px;
|
||||
width: 3em;
|
||||
substraction: 0;
|
||||
division: 1;
|
||||
}
|
||||
#operations .spacing {
|
||||
height: 9px;
|
||||
width: 3em;
|
||||
}
|
||||
.with-variables {
|
||||
height: 16em;
|
||||
width: 24em;
|
||||
size: 1cm;
|
||||
}
|
||||
.with-functions {
|
||||
color: #646464;
|
||||
color: #ff8080;
|
||||
color: #c94a4a;
|
||||
}
|
||||
.negative {
|
||||
height: 0px;
|
||||
width: 4px;
|
||||
}
|
||||
.shorthands {
|
||||
padding: -1px 2px 0 -4px;
|
||||
}
|
||||
.rem-dimensions {
|
||||
font-size: 5.5rem;
|
||||
}
|
||||
.colors {
|
||||
color: #123;
|
||||
border-color: #334455;
|
||||
background-color: #000000;
|
||||
}
|
||||
.colors .other {
|
||||
color: #222222;
|
||||
border-color: #222222;
|
||||
}
|
||||
.negations {
|
||||
variable: -4px;
|
||||
variable1: 0px;
|
||||
variable2: 0px;
|
||||
variable3: 8px;
|
||||
variable4: 0px;
|
||||
paren: -4px;
|
||||
paren2: 16px;
|
||||
}
|
||||
33
node_modules/less/test/css/parens.css
generated
vendored
Normal file
33
node_modules/less/test/css/parens.css
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
.parens {
|
||||
border: 2px solid #000000;
|
||||
margin: 1px 3px 16 3;
|
||||
width: 36;
|
||||
padding: 2px 36px;
|
||||
}
|
||||
.more-parens {
|
||||
padding: 8 4 4 4px;
|
||||
width-all: 96;
|
||||
width-first: 16 * 6;
|
||||
width-keep: (4 * 4) * 6;
|
||||
height-keep: (7 * 7) + (8 * 8);
|
||||
height-all: 113;
|
||||
height-parts: 49 + 64;
|
||||
margin-keep: (4 * (5 + 5) / 2) - (4 * 2);
|
||||
margin-parts: 20 - 8;
|
||||
margin-all: 12;
|
||||
border-radius-keep: 4px * (1 + 1) / 4 + 3px;
|
||||
border-radius-parts: 8px / 7px;
|
||||
border-radius-all: 5px;
|
||||
}
|
||||
.negative {
|
||||
neg-var: -1;
|
||||
neg-var-paren: -(1);
|
||||
}
|
||||
.nested-parens {
|
||||
width: 2 * (4 * (2 + (1 + 6))) - 1;
|
||||
height: ((2 + 3) * (2 + 3) / (9 - 4)) + 1;
|
||||
}
|
||||
.mixed-units {
|
||||
margin: 2px 4em 1 5pc;
|
||||
padding: 6px 1em 2px 2;
|
||||
}
|
||||
33
node_modules/less/test/css/rulesets.css
generated
vendored
Normal file
33
node_modules/less/test/css/rulesets.css
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
#first > .one {
|
||||
font-size: 2em;
|
||||
}
|
||||
#first > .one > #second .two > #deux {
|
||||
width: 50%;
|
||||
}
|
||||
#first > .one > #second .two > #deux #third {
|
||||
height: 100%;
|
||||
}
|
||||
#first > .one > #second .two > #deux #third:focus {
|
||||
color: black;
|
||||
}
|
||||
#first > .one > #second .two > #deux #third:focus #fifth > #sixth .seventh #eighth + #ninth {
|
||||
color: purple;
|
||||
}
|
||||
#first > .one > #second .two > #deux #fourth,
|
||||
#first > .one > #second .two > #deux #five,
|
||||
#first > .one > #second .two > #deux #six {
|
||||
color: #110000;
|
||||
}
|
||||
#first > .one > #second .two > #deux #fourth .seven,
|
||||
#first > .one > #second .two > #deux #five .seven,
|
||||
#first > .one > #second .two > #deux #six .seven,
|
||||
#first > .one > #second .two > #deux #fourth .eight > #nine,
|
||||
#first > .one > #second .two > #deux #five .eight > #nine,
|
||||
#first > .one > #second .two > #deux #six .eight > #nine {
|
||||
border: 1px solid black;
|
||||
}
|
||||
#first > .one > #second .two > #deux #fourth #ten,
|
||||
#first > .one > #second .two > #deux #five #ten,
|
||||
#first > .one > #second .two > #deux #six #ten {
|
||||
color: red;
|
||||
}
|
||||
35
node_modules/less/test/css/scope.css
generated
vendored
Normal file
35
node_modules/less/test/css/scope.css
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
.tiny-scope {
|
||||
color: #998899;
|
||||
}
|
||||
.scope1 {
|
||||
color: #0000ff;
|
||||
border-color: #000000;
|
||||
}
|
||||
.scope1 .scope2 {
|
||||
color: #0000ff;
|
||||
}
|
||||
.scope1 .scope2 .scope3 {
|
||||
color: #ff0000;
|
||||
border-color: #000000;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.scope {
|
||||
scoped-val: #008000;
|
||||
}
|
||||
.heightIsSet {
|
||||
height: 1024px;
|
||||
}
|
||||
.useHeightInMixinCall {
|
||||
mixin-height: 1024px;
|
||||
}
|
||||
.imported {
|
||||
exists: true;
|
||||
}
|
||||
.testImported {
|
||||
exists: true;
|
||||
}
|
||||
#allAreUsedHere {
|
||||
default: 'top level';
|
||||
scope: 'top level';
|
||||
sub-scope-only: 'inside';
|
||||
}
|
||||
141
node_modules/less/test/css/selectors.css
generated
vendored
Normal file
141
node_modules/less/test/css/selectors.css
generated
vendored
Normal file
@ -0,0 +1,141 @@
|
||||
h1 a:hover,
|
||||
h2 a:hover,
|
||||
h3 a:hover,
|
||||
h1 p:hover,
|
||||
h2 p:hover,
|
||||
h3 p:hover {
|
||||
color: red;
|
||||
}
|
||||
#all {
|
||||
color: blue;
|
||||
}
|
||||
#the {
|
||||
color: blue;
|
||||
}
|
||||
#same {
|
||||
color: blue;
|
||||
}
|
||||
ul,
|
||||
li,
|
||||
div,
|
||||
q,
|
||||
blockquote,
|
||||
textarea {
|
||||
margin: 0;
|
||||
}
|
||||
td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
td,
|
||||
input {
|
||||
line-height: 1em;
|
||||
}
|
||||
a {
|
||||
color: red;
|
||||
}
|
||||
a:hover {
|
||||
color: blue;
|
||||
}
|
||||
div a {
|
||||
color: green;
|
||||
}
|
||||
p a span {
|
||||
color: yellow;
|
||||
}
|
||||
.foo .bar .qux,
|
||||
.foo .baz .qux {
|
||||
display: block;
|
||||
}
|
||||
.qux .foo .bar,
|
||||
.qux .foo .baz {
|
||||
display: inline;
|
||||
}
|
||||
.qux.foo .bar,
|
||||
.qux.foo .baz {
|
||||
display: inline-block;
|
||||
}
|
||||
.qux .foo .bar .biz,
|
||||
.qux .foo .baz .biz {
|
||||
display: none;
|
||||
}
|
||||
.a.b.c {
|
||||
color: red;
|
||||
}
|
||||
.c .b.a {
|
||||
color: red;
|
||||
}
|
||||
.foo .p.bar {
|
||||
color: red;
|
||||
}
|
||||
.foo.p.bar {
|
||||
color: red;
|
||||
}
|
||||
.foo + .foo {
|
||||
background: amber;
|
||||
}
|
||||
.foo + .foo {
|
||||
background: amber;
|
||||
}
|
||||
.foo + .foo,
|
||||
.foo + .bar,
|
||||
.bar + .foo,
|
||||
.bar + .bar {
|
||||
background: amber;
|
||||
}
|
||||
.foo a > .foo a,
|
||||
.foo a > .bar a,
|
||||
.foo a > .foo b,
|
||||
.foo a > .bar b,
|
||||
.bar a > .foo a,
|
||||
.bar a > .bar a,
|
||||
.bar a > .foo b,
|
||||
.bar a > .bar b,
|
||||
.foo b > .foo a,
|
||||
.foo b > .bar a,
|
||||
.foo b > .foo b,
|
||||
.foo b > .bar b,
|
||||
.bar b > .foo a,
|
||||
.bar b > .bar a,
|
||||
.bar b > .foo b,
|
||||
.bar b > .bar b {
|
||||
background: amber;
|
||||
}
|
||||
.other ::fnord {
|
||||
color: #ff0000;
|
||||
}
|
||||
.other::fnord {
|
||||
color: #ff0000;
|
||||
}
|
||||
.other ::bnord {
|
||||
color: #ff0000;
|
||||
}
|
||||
.other::bnord {
|
||||
color: #ff0000;
|
||||
}
|
||||
.blood {
|
||||
color: red;
|
||||
}
|
||||
.bloodred {
|
||||
color: green;
|
||||
}
|
||||
#blood.blood.red.black {
|
||||
color: black;
|
||||
}
|
||||
:nth-child(3) {
|
||||
selector: interpolated;
|
||||
}
|
||||
.test:nth-child(odd):not(:nth-child(3)) {
|
||||
color: #ff0000;
|
||||
}
|
||||
[prop],
|
||||
[prop="value3"],
|
||||
[prop*="val3"],
|
||||
[|prop~="val3"],
|
||||
[*|prop$="val3"],
|
||||
[ns|prop^="val3"],
|
||||
[3^="val3"],
|
||||
[3=3],
|
||||
[3] {
|
||||
attributes: yes;
|
||||
}
|
||||
42
node_modules/less/test/css/static-urls/urls.css
generated
vendored
Normal file
42
node_modules/less/test/css/static-urls/urls.css
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
@import "folder (1)/../css/background.css";
|
||||
|
||||
@import "folder (1)/import-test-d.css";
|
||||
@font-face {
|
||||
src: url("/fonts/garamond-pro.ttf");
|
||||
src: local(Futura-Medium), url(folder\ \(1\)/fonts.svg#MyGeometricModern) format("svg");
|
||||
}
|
||||
#shorthands {
|
||||
background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
|
||||
}
|
||||
#misc {
|
||||
background-image: url(folder\ \(1\)/images/image.jpg);
|
||||
}
|
||||
#data-uri {
|
||||
background: url(data:image/png;charset=utf-8;base64,
|
||||
kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
|
||||
k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
|
||||
kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
|
||||
background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
|
||||
background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
|
||||
}
|
||||
#svg-data-uri {
|
||||
background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
|
||||
}
|
||||
.comma-delimited {
|
||||
background: url(folder\ \(1\)/bg.jpg) no-repeat, url(folder\ \(1\)/bg.png) repeat-x top left, url(folder\ \(1\)/bg);
|
||||
}
|
||||
.values {
|
||||
url: url('folder (1)/Trebuchet');
|
||||
}
|
||||
#logo {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: url('folder (1)/../assets/logo.png');
|
||||
}
|
||||
@font-face {
|
||||
font-family: xecret;
|
||||
src: url('folder (1)/../assets/xecret.ttf');
|
||||
}
|
||||
#secret {
|
||||
font-family: xecret, sans-serif;
|
||||
}
|
||||
40
node_modules/less/test/css/strings.css
generated
vendored
Normal file
40
node_modules/less/test/css/strings.css
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
#strings {
|
||||
background-image: url("http://son-of-a-banana.com");
|
||||
quotes: "~" "~";
|
||||
content: "#*%:&^,)!.(~*})";
|
||||
empty: "";
|
||||
brackets: "{" "}";
|
||||
escapes: "\"hello\" \\world";
|
||||
escapes2: "\"llo";
|
||||
}
|
||||
#comments {
|
||||
content: "/* hello */ // not-so-secret";
|
||||
}
|
||||
#single-quote {
|
||||
quotes: "'" "'";
|
||||
content: '""#!&""';
|
||||
empty: '';
|
||||
semi-colon: ';';
|
||||
}
|
||||
#escaped {
|
||||
filter: DX.Transform.MS.BS.filter(opacity=50);
|
||||
}
|
||||
#one-line {
|
||||
image: url(http://tooks.com);
|
||||
}
|
||||
#crazy {
|
||||
image: url(http://), "}", url("http://}");
|
||||
}
|
||||
#interpolation {
|
||||
url: "http://lesscss.org/dev/image.jpg";
|
||||
url2: "http://lesscss.org/image-256.jpg";
|
||||
url3: "http://lesscss.org#445566";
|
||||
url4: "http://lesscss.org/hello";
|
||||
url5: "http://lesscss.org/54.4px";
|
||||
}
|
||||
.mix-mul-class {
|
||||
color: #0000ff;
|
||||
color: #ff0000;
|
||||
color: #000000;
|
||||
color: #ffa500;
|
||||
}
|
||||
59
node_modules/less/test/css/urls.css
generated
vendored
Normal file
59
node_modules/less/test/css/urls.css
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
@import "import/../css/background.css";
|
||||
|
||||
@import "import/import-test-d.css";
|
||||
|
||||
@import "file.css";
|
||||
@font-face {
|
||||
src: url("/fonts/garamond-pro.ttf");
|
||||
src: local(Futura-Medium), url(fonts.svg#MyGeometricModern) format("svg");
|
||||
}
|
||||
#shorthands {
|
||||
background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
|
||||
background: url("img.jpg") center / 100px;
|
||||
background: #ffffff url(image.png) center / 1px 100px repeat-x scroll content-box padding-box;
|
||||
}
|
||||
#misc {
|
||||
background-image: url(images/image.jpg);
|
||||
}
|
||||
#data-uri {
|
||||
background: url(data:image/png;charset=utf-8;base64,
|
||||
kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
|
||||
k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
|
||||
kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
|
||||
background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
|
||||
background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
|
||||
}
|
||||
#svg-data-uri {
|
||||
background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
|
||||
}
|
||||
.comma-delimited {
|
||||
background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg);
|
||||
}
|
||||
.values {
|
||||
url: url('Trebuchet');
|
||||
}
|
||||
#logo {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: url('import/imports/../assets/logo.png');
|
||||
}
|
||||
@font-face {
|
||||
font-family: xecret;
|
||||
src: url('import/imports/../assets/xecret.ttf');
|
||||
}
|
||||
#secret {
|
||||
font-family: xecret, sans-serif;
|
||||
}
|
||||
#data-uri {
|
||||
uri: url('data:image/jpeg;base64,bm90IGFjdHVhbGx5IGEganBlZyBmaWxlCg==');
|
||||
}
|
||||
#data-uri-guess {
|
||||
uri: url('data:image/jpeg;base64,bm90IGFjdHVhbGx5IGEganBlZyBmaWxlCg==');
|
||||
}
|
||||
#data-uri-ascii {
|
||||
uri-1: url('data:text/html,%3Ch1%3EThis%20page%20is%20100%25%20Awesome.%3C%2Fh1%3E%0A');
|
||||
uri-2: url('data:text/html,%3Ch1%3EThis%20page%20is%20100%25%20Awesome.%3C%2Fh1%3E%0A');
|
||||
}
|
||||
#data-uri-toobig {
|
||||
uri: url('../data/data-uri-fail.png');
|
||||
}
|
||||
45
node_modules/less/test/css/variables.css
generated
vendored
Normal file
45
node_modules/less/test/css/variables.css
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
.variables {
|
||||
width: 14cm;
|
||||
}
|
||||
.variables {
|
||||
height: 24px;
|
||||
color: #888888;
|
||||
font-family: "Trebuchet MS", Verdana, sans-serif;
|
||||
quotes: "~" "~";
|
||||
}
|
||||
.redef {
|
||||
zero: 0;
|
||||
}
|
||||
.redef .inition {
|
||||
three: 3;
|
||||
}
|
||||
.values {
|
||||
minus-one: -1;
|
||||
font-family: 'Trebuchet', 'Trebuchet', 'Trebuchet';
|
||||
color: #888888 !important;
|
||||
multi: something 'A', B, C, 'Trebuchet';
|
||||
}
|
||||
.variable-names {
|
||||
name: 'hello';
|
||||
}
|
||||
.alpha {
|
||||
filter: alpha(opacity=42);
|
||||
}
|
||||
.testPollution {
|
||||
a: 'no-pollution';
|
||||
}
|
||||
.units {
|
||||
width: 1px;
|
||||
same-unit-as-previously: 1px;
|
||||
square-pixel-divided: 1px;
|
||||
odd-unit: 2;
|
||||
percentage: 500%;
|
||||
pixels: 500px;
|
||||
conversion-metric-a: 30mm;
|
||||
conversion-metric-b: 3cm;
|
||||
conversion-imperial: 3in;
|
||||
custom-unit: 420octocats;
|
||||
custom-unit-cancelling: 18dogs;
|
||||
mix-units: 2px;
|
||||
invalid-units: 1px;
|
||||
}
|
||||
42
node_modules/less/test/css/whitespace.css
generated
vendored
Normal file
42
node_modules/less/test/css/whitespace.css
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
.whitespace {
|
||||
color: white;
|
||||
}
|
||||
.whitespace {
|
||||
color: white;
|
||||
}
|
||||
.whitespace {
|
||||
color: white;
|
||||
}
|
||||
.whitespace {
|
||||
color: white;
|
||||
}
|
||||
.whitespace {
|
||||
color: white ;
|
||||
}
|
||||
.white,
|
||||
.space,
|
||||
.mania {
|
||||
color: white;
|
||||
}
|
||||
.no-semi-column {
|
||||
color: #ffffff;
|
||||
}
|
||||
.no-semi-column {
|
||||
color: white;
|
||||
white-space: pre;
|
||||
}
|
||||
.no-semi-column {
|
||||
border: 2px solid #ffffff;
|
||||
}
|
||||
.newlines {
|
||||
background: the,
|
||||
great,
|
||||
wall;
|
||||
border: 2px
|
||||
solid
|
||||
black;
|
||||
}
|
||||
.sel .newline_ws .tab_ws {
|
||||
color: white;
|
||||
background-position: 45 -23;
|
||||
}
|
||||
BIN
node_modules/less/test/data/data-uri-fail.png
generated
vendored
Normal file
BIN
node_modules/less/test/data/data-uri-fail.png
generated
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
1
node_modules/less/test/data/image.jpg
generated
vendored
Normal file
1
node_modules/less/test/data/image.jpg
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
not actually a jpeg file
|
||||
1
node_modules/less/test/data/page.html
generated
vendored
Normal file
1
node_modules/less/test/data/page.html
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
<h1>This page is 100% Awesome.</h1>
|
||||
214
node_modules/less/test/less-test.js
generated
vendored
Normal file
214
node_modules/less/test/less-test.js
generated
vendored
Normal file
@ -0,0 +1,214 @@
|
||||
var path = require('path'),
|
||||
fs = require('fs'),
|
||||
sys = require('util');
|
||||
|
||||
var less = require('../lib/less');
|
||||
var stylize = require('../lib/less/lessc_helper').stylize;
|
||||
|
||||
var globals = Object.keys(global);
|
||||
|
||||
var oneTestOnly = process.argv[2];
|
||||
|
||||
var totalTests = 0,
|
||||
failedTests = 0,
|
||||
passedTests = 0;
|
||||
|
||||
less.tree.functions.add = function (a, b) {
|
||||
return new(less.tree.Dimension)(a.value + b.value);
|
||||
};
|
||||
less.tree.functions.increment = function (a) {
|
||||
return new(less.tree.Dimension)(a.value + 1);
|
||||
};
|
||||
less.tree.functions._color = function (str) {
|
||||
if (str.value === "evil red") { return new(less.tree.Color)("600") }
|
||||
};
|
||||
|
||||
sys.puts("\n" + stylize("LESS", 'underline') + "\n");
|
||||
|
||||
runTestSet({strictMath: true, relativeUrls: true, silent: true});
|
||||
|
||||
runTestSet({strictMath: true, strictUnits: true}, "errors/", function(name, err, compiledLess, doReplacements) {
|
||||
fs.readFile(path.join('test/less/', name) + '.txt', 'utf8', function (e, expectedErr) {
|
||||
sys.print("- " + name + ": ");
|
||||
expectedErr = doReplacements(expectedErr, 'test/less/errors/');
|
||||
if (!err) {
|
||||
if (compiledLess) {
|
||||
fail("No Error", 'red');
|
||||
} else {
|
||||
fail("No Error, No Output");
|
||||
}
|
||||
} else {
|
||||
var errMessage = less.formatError(err);
|
||||
if (errMessage === expectedErr) {
|
||||
ok('OK');
|
||||
} else {
|
||||
difference("FAIL", expectedErr, errMessage);
|
||||
}
|
||||
}
|
||||
sys.puts("");
|
||||
});}, null, function(input, directory) {
|
||||
return input.replace(
|
||||
"{path}", path.join(process.cwd(), "/test/less/errors/"))
|
||||
.replace("{pathrel}", path.join("test", "less", "errors/"))
|
||||
.replace("{pathhref}", "")
|
||||
.replace("{404status}", "")
|
||||
.replace(/\r\n/g, '\n');
|
||||
});
|
||||
|
||||
runTestSet({strictMath: true, dumpLineNumbers: 'comments'}, "debug/", null,
|
||||
function(name) { return name + '-comments'; });
|
||||
runTestSet({strictMath: true, dumpLineNumbers: 'mediaquery'}, "debug/", null,
|
||||
function(name) { return name + '-mediaquery'; });
|
||||
runTestSet({strictMath: true, dumpLineNumbers: 'all'}, "debug/", null,
|
||||
function(name) { return name + '-all'; });
|
||||
runTestSet({strictMath: true, relativeUrls: false, rootpath: "folder (1)/"}, "static-urls/");
|
||||
runTestSet({strictMath: true, compress: true}, "compression/");
|
||||
runTestSet({strictMath: false}, "legacy/");
|
||||
testNoOptions();
|
||||
|
||||
function globalReplacements(input, directory) {
|
||||
var p = path.join(process.cwd(), directory),
|
||||
pathimport = path.join(process.cwd(), directory + "import/"),
|
||||
pathesc = p.replace(/[.:/\\]/g, function(a) { return '\\' + (a=='\\' ? '\/' : a); }),
|
||||
pathimportesc = pathimport.replace(/[.:/\\]/g, function(a) { return '\\' + (a=='\\' ? '\/' : a); });
|
||||
|
||||
return input.replace(/\{path\}/g, p)
|
||||
.replace(/\{pathesc\}/g, pathesc)
|
||||
.replace(/\{pathimport\}/g, pathimport)
|
||||
.replace(/\{pathimportesc\}/g, pathimportesc)
|
||||
.replace(/\r\n/g, '\n');
|
||||
}
|
||||
|
||||
function checkGlobalLeaks() {
|
||||
return Object.keys(global).filter(function(v) {
|
||||
return globals.indexOf(v) < 0;
|
||||
});
|
||||
}
|
||||
|
||||
function runTestSet(options, foldername, verifyFunction, nameModifier, doReplacements) {
|
||||
foldername = foldername || "";
|
||||
|
||||
if(!doReplacements)
|
||||
doReplacements = globalReplacements;
|
||||
|
||||
fs.readdirSync(path.join('test/less/', foldername)).forEach(function (file) {
|
||||
if (! /\.less/.test(file)) { return }
|
||||
|
||||
var name = foldername + path.basename(file, '.less');
|
||||
|
||||
if (oneTestOnly && name !== oneTestOnly) { return; }
|
||||
|
||||
totalTests++;
|
||||
|
||||
toCSS(options, path.join('test/less/', foldername + file), function (err, less) {
|
||||
|
||||
if (verifyFunction) {
|
||||
return verifyFunction(name, err, less, doReplacements);
|
||||
}
|
||||
var css_name = name;
|
||||
if(nameModifier) css_name=nameModifier(name);
|
||||
fs.readFile(path.join('test/css', css_name) + '.css', 'utf8', function (e, css) {
|
||||
sys.print("- " + css_name + ": ")
|
||||
|
||||
css = css && doReplacements(css, 'test/less/' + foldername);
|
||||
if (less === css) { ok('OK'); }
|
||||
else if (err) {
|
||||
fail("ERROR: " + (err && err.message));
|
||||
} else {
|
||||
difference("FAIL", css, less);
|
||||
}
|
||||
sys.puts("");
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function diff(left, right) {
|
||||
sys.puts("");
|
||||
require('diff').diffLines(left, right).forEach(function(item) {
|
||||
if(item.added || item.removed) {
|
||||
sys.print(stylize(item.value, item.added ? 'green' : 'red'));
|
||||
} else {
|
||||
sys.print(item.value);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function fail(msg) {
|
||||
sys.print(stylize(msg, 'red'));
|
||||
failedTests++;
|
||||
endTest();
|
||||
}
|
||||
|
||||
function difference(msg, left, right) {
|
||||
sys.print(stylize(msg, 'yellow'));
|
||||
failedTests++;
|
||||
|
||||
diff(left, right);
|
||||
endTest();
|
||||
}
|
||||
|
||||
function ok(msg) {
|
||||
sys.print(stylize(msg, 'green'));
|
||||
passedTests++;
|
||||
endTest();
|
||||
}
|
||||
|
||||
function endTest() {
|
||||
var leaked = checkGlobalLeaks();
|
||||
if (failedTests + passedTests === totalTests) {
|
||||
sys.puts("");
|
||||
sys.puts("");
|
||||
if (failedTests > 0) {
|
||||
sys.print(failedTests);
|
||||
sys.print(stylize(" Failed", "red"));
|
||||
sys.print(", " + passedTests + " passed");
|
||||
} else {
|
||||
sys.print(stylize("All Passed ", "green"));
|
||||
sys.print(passedTests + " run");
|
||||
}
|
||||
if (leaked.length > 0) {
|
||||
sys.puts("");
|
||||
sys.puts("");
|
||||
sys.print(stylize("Global leak detected: ", "red") + leaked.join(', '));
|
||||
sys.print("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function toCSS(options, path, callback) {
|
||||
var tree, css;
|
||||
options = options || {};
|
||||
fs.readFile(path, 'utf8', function (e, str) {
|
||||
if (e) { return callback(e) }
|
||||
|
||||
options.paths = [require('path').dirname(path)];
|
||||
options.filename = require('path').resolve(process.cwd(), path);
|
||||
options.optimization = options.optimization || 0;
|
||||
|
||||
new(less.Parser)(options).parse(str, function (err, tree) {
|
||||
if (err) {
|
||||
callback(err);
|
||||
} else {
|
||||
try {
|
||||
css = tree.toCSS(options);
|
||||
callback(null, css);
|
||||
} catch (e) {
|
||||
callback(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function testNoOptions() {
|
||||
totalTests++;
|
||||
try {
|
||||
sys.print("- Integration - creating parser without options: ");
|
||||
new(less.Parser);
|
||||
} catch(e) {
|
||||
fail(stylize("FAIL\n", "red"));
|
||||
return;
|
||||
}
|
||||
ok(stylize("OK\n", "green"));
|
||||
}
|
||||
3
node_modules/less/test/less/charsets.less
generated
vendored
Normal file
3
node_modules/less/test/less/charsets.less
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
@import "import/import-charset-test";
|
||||
92
node_modules/less/test/less/colors.less
generated
vendored
Normal file
92
node_modules/less/test/less/colors.less
generated
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
#yelow {
|
||||
#short {
|
||||
color: #fea;
|
||||
}
|
||||
#long {
|
||||
color: #ffeeaa;
|
||||
}
|
||||
#rgba {
|
||||
color: rgba(255, 238, 170, 0.1);
|
||||
}
|
||||
#argb {
|
||||
color: argb(rgba(255, 238, 170, 0.1));
|
||||
}
|
||||
}
|
||||
|
||||
#blue {
|
||||
#short {
|
||||
color: #00f;
|
||||
}
|
||||
#long {
|
||||
color: #0000ff;
|
||||
}
|
||||
#rgba {
|
||||
color: rgba(0, 0, 255, 0.1);
|
||||
}
|
||||
#argb {
|
||||
color: argb(rgba(0, 0, 255, 0.1));
|
||||
}
|
||||
}
|
||||
|
||||
#alpha #hsla {
|
||||
color: hsla(11, 20%, 20%, 0.6);
|
||||
}
|
||||
|
||||
#overflow {
|
||||
.a { color: (#111111 - #444444); } // #000000
|
||||
.b { color: (#eee + #fff); } // #ffffff
|
||||
.c { color: (#aaa * 3); } // #ffffff
|
||||
.d { color: (#00ee00 + #009900); } // #00ff00
|
||||
}
|
||||
|
||||
#grey {
|
||||
color: rgb(200, 200, 200);
|
||||
}
|
||||
|
||||
#333333 {
|
||||
color: rgb(20%, 20%, 20%);
|
||||
}
|
||||
|
||||
#808080 {
|
||||
color: hsl(50, 0%, 50%);
|
||||
}
|
||||
|
||||
#00ff00 {
|
||||
color: hsl(120, 100%, 50%);
|
||||
}
|
||||
|
||||
.lightenblue {
|
||||
color: lighten(blue, 10%);
|
||||
}
|
||||
|
||||
.darkenblue {
|
||||
color: darken(blue, 10%);
|
||||
}
|
||||
|
||||
.unknowncolors {
|
||||
color: blue2;
|
||||
border: 2px solid superred;
|
||||
}
|
||||
|
||||
.transparent {
|
||||
color: transparent;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
#alpha {
|
||||
@colorvar: rgba(150, 200, 150, 0.7);
|
||||
#fromvar {
|
||||
opacity: alpha(@colorvar);
|
||||
}
|
||||
#short {
|
||||
opacity: alpha(#aaa);
|
||||
}
|
||||
#long {
|
||||
opacity: alpha(#bababa);
|
||||
}
|
||||
#rgba {
|
||||
opacity: alpha(rgba(50, 120, 95, 0.2));
|
||||
}
|
||||
#hsl {
|
||||
opacity: alpha(hsl(120, 100%, 50%));
|
||||
}
|
||||
}
|
||||
77
node_modules/less/test/less/comments.less
generated
vendored
Normal file
77
node_modules/less/test/less/comments.less
generated
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
/******************\
|
||||
* *
|
||||
* Comment Header *
|
||||
* *
|
||||
\******************/
|
||||
|
||||
/*
|
||||
|
||||
Comment
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* Comment Test
|
||||
*
|
||||
* - cloudhead (http://cloudhead.net)
|
||||
*
|
||||
*/
|
||||
|
||||
////////////////
|
||||
@var: "content";
|
||||
////////////////
|
||||
|
||||
/* Colors
|
||||
* ------
|
||||
* #EDF8FC (background blue)
|
||||
* #166C89 (darkest blue)
|
||||
*
|
||||
* Text:
|
||||
* #333 (standard text) // A comment within a comment!
|
||||
* #1F9EC9 (standard link)
|
||||
*
|
||||
*/
|
||||
|
||||
/* @group Variables
|
||||
------------------- */
|
||||
#comments /* boo */ {
|
||||
/**/ // An empty comment
|
||||
color: red; /* A C-style comment */ /* A C-style comment */
|
||||
background-color: orange; // A little comment
|
||||
font-size: 12px;
|
||||
|
||||
/* lost comment */ content: @var;
|
||||
|
||||
border: 1px solid black;
|
||||
|
||||
// padding & margin //
|
||||
padding: 0; // }{ '"
|
||||
margin: 2em;
|
||||
} //
|
||||
|
||||
/* commented out
|
||||
#more-comments {
|
||||
color: grey;
|
||||
}
|
||||
*/
|
||||
|
||||
.selector /* .with */, .lots, /* of */ .comments {
|
||||
color: grey, /* blue */ orange;
|
||||
-webkit-border-radius: 2px /* webkit only */;
|
||||
-moz-border-radius: (2px * 4) /* moz only with operation */;
|
||||
}
|
||||
|
||||
.mixin_def_with_colors(@a: white, // in
|
||||
@b: 1px //put in @b - causes problems! --->
|
||||
) // the
|
||||
when (@a = white) {
|
||||
.test {
|
||||
color: @b;
|
||||
}
|
||||
}
|
||||
.mixin_def_with_colors();
|
||||
|
||||
#last { color: blue }
|
||||
//
|
||||
|
||||
/* *//* { *//* *//* *//* */#div { color:#A33; }/* } */
|
||||
16
node_modules/less/test/less/compression/compression.less
generated
vendored
Normal file
16
node_modules/less/test/less/compression/compression.less
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
#colours {
|
||||
color1: #fea;
|
||||
color2: #ffeeaa;
|
||||
color3: rgba(255, 238, 170, 0.1);
|
||||
@color1: #fea;
|
||||
string: "@{color1}";
|
||||
}
|
||||
dimensions {
|
||||
val: 0.1px;
|
||||
val: 0em;
|
||||
val: 4cm;
|
||||
val: 0.2;
|
||||
val: 5;
|
||||
angles-must-have-unit: 0deg;
|
||||
width: auto\9;
|
||||
}
|
||||
114
node_modules/less/test/less/css-3.less
generated
vendored
Normal file
114
node_modules/less/test/less/css-3.less
generated
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
.comma-delimited {
|
||||
text-shadow: -1px -1px 1px red, 6px 5px 5px yellow;
|
||||
-moz-box-shadow: 0pt 0pt 2px rgba(255, 255, 255, 0.4) inset,
|
||||
0pt 4px 6px rgba(255, 255, 255, 0.4) inset;
|
||||
-webkit-transform: rotate(-0.0000000001deg);
|
||||
}
|
||||
@font-face {
|
||||
font-family: Headline;
|
||||
unicode-range: U+??????, U+0???, U+0-7F, U+A5;
|
||||
}
|
||||
.other {
|
||||
-moz-transform: translate(0, 11em) rotate(-90deg);
|
||||
transform: rotateX(45deg);
|
||||
}
|
||||
.item[data-cra_zy-attr1b-ut3=bold] {
|
||||
font-weight: bold;
|
||||
}
|
||||
p:not([class*="lead"]) {
|
||||
color: black;
|
||||
}
|
||||
|
||||
input[type="text"].class#id[attr=32]:not(1) {
|
||||
color: white;
|
||||
}
|
||||
|
||||
div#id.class[a=1][b=2].class:not(1) {
|
||||
color: white;
|
||||
}
|
||||
|
||||
ul.comma > li:not(:only-child)::after {
|
||||
color: white;
|
||||
}
|
||||
|
||||
ol.comma > li:nth-last-child(2)::after {
|
||||
color: white;
|
||||
}
|
||||
|
||||
li:nth-child(4n+1),
|
||||
li:nth-child(-5n),
|
||||
li:nth-child(-n+2) {
|
||||
color: white;
|
||||
}
|
||||
|
||||
a[href^="http://"] {
|
||||
color: black;
|
||||
}
|
||||
|
||||
a[href$="http://"] {
|
||||
color: black;
|
||||
}
|
||||
|
||||
form[data-disabled] {
|
||||
color: black;
|
||||
}
|
||||
|
||||
p::before {
|
||||
color: black;
|
||||
}
|
||||
|
||||
#issue322 {
|
||||
-webkit-animation: anim2 7s infinite ease-in-out;
|
||||
}
|
||||
|
||||
@-webkit-keyframes frames {
|
||||
0% { border: 1px }
|
||||
5.5% { border: 2px }
|
||||
100% { border: 3px }
|
||||
}
|
||||
|
||||
@keyframes fontbulger1 {
|
||||
to {
|
||||
font-size: 15px;
|
||||
}
|
||||
from,to {
|
||||
font-size: 12px;
|
||||
}
|
||||
0%,100% {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.units {
|
||||
font: 1.2rem/2rem;
|
||||
font: 8vw/9vw;
|
||||
font: 10vh/12vh;
|
||||
font: 12vm/15vm;
|
||||
font: 12vmin/15vmin;
|
||||
font: 1.2ch/1.5ch;
|
||||
}
|
||||
|
||||
@supports ( box-shadow: 2px 2px 2px black ) or
|
||||
( -moz-box-shadow: 2px 2px 2px black ) {
|
||||
.outline {
|
||||
box-shadow: 2px 2px 2px black;
|
||||
-moz-box-shadow: 2px 2px 2px black;
|
||||
}
|
||||
}
|
||||
|
||||
@-x-document url-prefix(""github.com"") {
|
||||
h1 {
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
|
||||
@viewport {
|
||||
font-size: 10px;
|
||||
}
|
||||
@namespace foo url(http://www.example.com);
|
||||
|
||||
foo|h1 { color: blue; }
|
||||
foo|* { color: yellow; }
|
||||
|h1 { color: red; }
|
||||
*|h1 { color: green; }
|
||||
h1 { color: green; }
|
||||
33
node_modules/less/test/less/css-escapes.less
generated
vendored
Normal file
33
node_modules/less/test/less/css-escapes.less
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
@ugly: fuchsia;
|
||||
|
||||
.escape\|random\|char {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.mixin\!tUp {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
// class="404"
|
||||
.\34 04 {
|
||||
background: red;
|
||||
|
||||
strong {
|
||||
color: @ugly;
|
||||
.mixin\!tUp;
|
||||
}
|
||||
}
|
||||
|
||||
.trailingTest\+ {
|
||||
color: red;
|
||||
}
|
||||
|
||||
/* This hideous test of hideousness checks for the selector "blockquote" with various permutations of hex escapes */
|
||||
\62\6c\6f \63 \6B \0071 \000075o\74 e {
|
||||
color: silver;
|
||||
}
|
||||
|
||||
[ng\:cloak],
|
||||
ng\:form {
|
||||
display: none;
|
||||
}
|
||||
108
node_modules/less/test/less/css.less
generated
vendored
Normal file
108
node_modules/less/test/less/css.less
generated
vendored
Normal file
@ -0,0 +1,108 @@
|
||||
@charset "utf-8";
|
||||
div { color: black; }
|
||||
div { width: 99%; }
|
||||
|
||||
* {
|
||||
min-width: 45em;
|
||||
}
|
||||
|
||||
h1, h2 > a > p, h3 {
|
||||
color: none;
|
||||
}
|
||||
|
||||
div.class {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
div#id {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.class#id {
|
||||
color: purple;
|
||||
}
|
||||
|
||||
.one.two.three {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
@media print {
|
||||
* {
|
||||
font-size: 3em;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen {
|
||||
* {
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Garamond Pro';
|
||||
}
|
||||
|
||||
a:hover, a:link {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
p, p:first-child {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
q:lang(no) {
|
||||
quotes: none;
|
||||
}
|
||||
|
||||
p + h1 {
|
||||
font-size: +2.2em;
|
||||
}
|
||||
|
||||
#shorthands {
|
||||
border: 1px solid #000;
|
||||
font: 12px/16px Arial;
|
||||
font: 100%/16px Arial;
|
||||
margin: 1px 0;
|
||||
padding: 0 auto;
|
||||
}
|
||||
|
||||
#more-shorthands {
|
||||
margin: 0;
|
||||
padding: 1px 0 2px 0;
|
||||
font: normal small/20px 'Trebuchet MS', Verdana, sans-serif;
|
||||
font: 0/0 a;
|
||||
border-radius: 5px / 10px;
|
||||
}
|
||||
|
||||
.misc {
|
||||
-moz-border-radius: 2px;
|
||||
display: -moz-inline-stack;
|
||||
width: .1em;
|
||||
background-color: #009998;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(red), to(blue));
|
||||
margin: ;
|
||||
.nested-multiple {
|
||||
multiple-semi-colons: yes;;;;;;
|
||||
};
|
||||
filter: alpha(opacity=100);
|
||||
width: auto\9;
|
||||
}
|
||||
|
||||
#important {
|
||||
color: red !important;
|
||||
width: 100%!important;
|
||||
height: 20px ! important;
|
||||
}
|
||||
|
||||
.def-font(@name) {
|
||||
@font-face {
|
||||
font-family: @name
|
||||
}
|
||||
}
|
||||
|
||||
.def-font(font-a);
|
||||
.def-font(font-b);
|
||||
|
||||
.æøå {
|
||||
margin: 0;
|
||||
}
|
||||
25
node_modules/less/test/less/debug/import/test.less
generated
vendored
Normal file
25
node_modules/less/test/less/debug/import/test.less
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
@charset "ISO-8859-1";
|
||||
|
||||
.mixin_import1() {
|
||||
@media all {
|
||||
.tst {
|
||||
color: black;
|
||||
@media screen {
|
||||
color: red;
|
||||
.tst3 {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mixin_import2() {
|
||||
.tst2 {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
.tst3 {
|
||||
color: grey;
|
||||
}
|
||||
23
node_modules/less/test/less/debug/linenumbers.less
generated
vendored
Normal file
23
node_modules/less/test/less/debug/linenumbers.less
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
@import "import/test.less";
|
||||
|
||||
.start() {
|
||||
.test2 {
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
|
||||
.mix() {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.test1 {
|
||||
.mix();
|
||||
}
|
||||
|
||||
.start();
|
||||
|
||||
.mixin_import1();
|
||||
|
||||
.mixin_import2();
|
||||
3
node_modules/less/test/less/errors/add-mixed-units.less
generated
vendored
Normal file
3
node_modules/less/test/less/errors/add-mixed-units.less
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.a {
|
||||
error: (1px + 3em);
|
||||
}
|
||||
2
node_modules/less/test/less/errors/add-mixed-units.txt
generated
vendored
Normal file
2
node_modules/less/test/less/errors/add-mixed-units.txt
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
SyntaxError: Incompatible units. Change the units or use the unit function. Bad units: 'px' and 'em'. in {path}add-mixed-units.less on line null, column 0:
|
||||
1 error: (1px + 3em);
|
||||
3
node_modules/less/test/less/errors/add-mixed-units2.less
generated
vendored
Normal file
3
node_modules/less/test/less/errors/add-mixed-units2.less
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.a {
|
||||
error: ((1px * 2px) + (3em * 3px));
|
||||
}
|
||||
2
node_modules/less/test/less/errors/add-mixed-units2.txt
generated
vendored
Normal file
2
node_modules/less/test/less/errors/add-mixed-units2.txt
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
SyntaxError: Incompatible units. Change the units or use the unit function. Bad units: 'px*px' and 'em*px'. in {path}add-mixed-units2.less on line null, column 0:
|
||||
1 error: ((1px * 2px) + (3em * 3px));
|
||||
1
node_modules/less/test/less/errors/bad-variable-declaration1.less
generated
vendored
Normal file
1
node_modules/less/test/less/errors/bad-variable-declaration1.less
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
@@demo: "hi";
|
||||
2
node_modules/less/test/less/errors/bad-variable-declaration1.txt
generated
vendored
Normal file
2
node_modules/less/test/less/errors/bad-variable-declaration1.txt
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
ParseError: Unrecognised input in {path}bad-variable-declaration1.less on line 1, column 1:
|
||||
1 @@demo: "hi";
|
||||
3
node_modules/less/test/less/errors/color-operation-error.less
generated
vendored
Normal file
3
node_modules/less/test/less/errors/color-operation-error.less
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.a {
|
||||
prop: (3 / #fff);
|
||||
}
|
||||
2
node_modules/less/test/less/errors/color-operation-error.txt
generated
vendored
Normal file
2
node_modules/less/test/less/errors/color-operation-error.txt
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
OperationError: Can't substract or divide a color from a number in {path}color-operation-error.less on line null, column 0:
|
||||
1 prop: (3 / #fff);
|
||||
1
node_modules/less/test/less/errors/comment-in-selector.less
generated
vendored
Normal file
1
node_modules/less/test/less/errors/comment-in-selector.less
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
#gaga /* Comment */ span { color: red }
|
||||
2
node_modules/less/test/less/errors/comment-in-selector.txt
generated
vendored
Normal file
2
node_modules/less/test/less/errors/comment-in-selector.txt
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
ParseError: Unrecognised input in {path}comment-in-selector.less on line 1, column 21:
|
||||
1 #gaga /* Comment */ span { color: red }
|
||||
3
node_modules/less/test/less/errors/divide-mixed-units.less
generated
vendored
Normal file
3
node_modules/less/test/less/errors/divide-mixed-units.less
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.a {
|
||||
error: (1px / 3em);
|
||||
}
|
||||
4
node_modules/less/test/less/errors/divide-mixed-units.txt
generated
vendored
Normal file
4
node_modules/less/test/less/errors/divide-mixed-units.txt
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
SyntaxError: Multiple units in dimension. Correct the units or use the unit function. Bad unit: px/em in {path}divide-mixed-units.less on line 2, column 3:
|
||||
1 .a {
|
||||
2 error: (1px / 3em);
|
||||
3 }
|
||||
3
node_modules/less/test/less/errors/extend-no-selector.less
generated
vendored
Normal file
3
node_modules/less/test/less/errors/extend-no-selector.less
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
:extend(.a all) {
|
||||
property: red;
|
||||
}
|
||||
3
node_modules/less/test/less/errors/extend-no-selector.txt
generated
vendored
Normal file
3
node_modules/less/test/less/errors/extend-no-selector.txt
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
SyntaxError: Extend must be used to extend a selector, it cannot be used on its own in {path}extend-no-selector.less on line 1, column 17:
|
||||
1 :extend(.a all) {
|
||||
2 property: red;
|
||||
3
node_modules/less/test/less/errors/extend-not-at-end.less
generated
vendored
Normal file
3
node_modules/less/test/less/errors/extend-not-at-end.less
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.a:extend(.b all).c {
|
||||
property: red;
|
||||
}
|
||||
3
node_modules/less/test/less/errors/extend-not-at-end.txt
generated
vendored
Normal file
3
node_modules/less/test/less/errors/extend-not-at-end.txt
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
SyntaxError: Extend can only be used at the end of selector in {path}extend-not-at-end.less on line 1, column 21:
|
||||
1 .a:extend(.b all).c {
|
||||
2 property: red;
|
||||
6
node_modules/less/test/less/errors/import-missing.less
generated
vendored
Normal file
6
node_modules/less/test/less/errors/import-missing.less
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
.a {
|
||||
color: green;
|
||||
// tests line number for import reference is correct
|
||||
}
|
||||
|
||||
@import "file-does-not-exist.less";
|
||||
3
node_modules/less/test/less/errors/import-missing.txt
generated
vendored
Normal file
3
node_modules/less/test/less/errors/import-missing.txt
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
FileError: '{pathhref}file-does-not-exist.less' wasn't found{404status} in {path}import-missing.less on line 6, column 1:
|
||||
5
|
||||
6 @import "file-does-not-exist.less";
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user