v1.6.3~dfsg/0000755000000000000000000000000012606003643011451 5ustar rootrootv1.6.3~dfsg/README.md0000644000000000000000000002111712275460205012735 0ustar rootroot# [Less.js v1.6.3](http://lesscss.org) > The **dynamic** stylesheet language. [http://lesscss.org](http://lesscss.org). This is the JavaScript, and now official, stable version of LESS. ## Getting Started Options for adding Less.js to your project: * Install with [NPM](https://npmjs.org/): `npm install less` * [Download the latest release][download] * Clone the repo: `git clone git://github.com/less/less.js.git` ## Feature Highlights LESS extends CSS with dynamic features such as: * [nesting](#nesting) * [variables](#variables) * [operations](#operations) * [mixins](#mixins) * [extend](#extend) (selector inheritance) To learn about the many other features Less.js has to offer please visit [http://lesscss.org](http://lesscss.org) and [the Less.js wiki][wiki] ### Examples #### nesting Take advantage of nesting to make code more readable and maintainable. This: ```less .nav > li > a { border: 1px solid #f5f5f5; &:hover { border-color: #ddd; } } ``` renders to: ```css .nav > li > a { border: 1px solid #f5f5f5; } .nav > li > a:hover { border-color: #ddd; } ``` #### variables Updated commonly used values from a single location. ```less // Variables ("inline" comments like this can be used) @link-color: #428bca; // appears as "sea blue" /* Or "block comments" that span multiple lines, like this */ a { color: @link-color; // use the variable in styles } ``` Variables can also be used in `@import` statements, URLs, selector names, and more. #### operations Continuing with the same example above, we can use our variables even easier to maintain with _operations_, which enables the use of addition, subraction, multiplication and division in your styles: ```less // Variables @link-color: #428bca; @link-color-hover: darken(@link-color, 10%); // Styles a { color: @link-color; } a:hover { color: @link-color-hover; } ``` renders to: ```css a { color: #428bca; } a:hover { color: #3071a9; } ``` #### mixins ##### "implicit" mixins Mixins enable you to apply the styles of one selector inside another selector like this: ```less // Variables @link-color: #428bca; // Any "regular" class... .link { color: @link-color; } a { font-weight: bold; .link; // ...can be used as an "implicit" mixin } ``` renders to: ```css .link { color: #428bca; } a { font-weight: bold; color: #428bca; } ``` So any selector can be an "implicit mixin". We'll show you a DRYer way to do this below. ##### parametric mixins Mixins can also accept parameters: ```less // Transition mixin .transition(@transition) { -webkit-transition: @transition; -moz-transition: @transition; -o-transition: @transition; transition: @transition; } ``` used like this: ```less // Variables @link-color: #428bca; @link-color-hover: darken(@link-color, 10%); //Transition mixin would be anywhere here a { font-weight: bold; color: @link-color; .transition(color .2s ease-in-out); // Hover state &:hover { color: @link-color-hover; } } ``` renders to: ```css a { font-weight: bold; color: #428bca; -webkit-transition: color 0.2s ease-in-out; -moz-transition: color 0.2s ease-in-out; -o-transition: color 0.2s ease-in-out; transition: color 0.2s ease-in-out; } a:hover { color: #3071a9; } ``` #### extend The `extend` feature can be thought of as the _inverse_ of mixins. It accomplishes the goal of "borrowing styles", but rather than copying all the rules of _Selector A_ over to _Selector B_, `extend` copies the name of the _inheriting selector_ (_Selector B_) over to the _extending selector_ (_Selector A_). So continuing with the example used for [mixins](#mixins) above, extend works like this: ```less // Variables @link-color: #428bca; .link { color: @link-color; } a:extend(.link) { font-weight: bold; } // Can also be written as a { &:extend(.link); font-weight: bold; } ``` renders to: ```css .link, a { color: #428bca; } a { font-weight: bold; } ``` ## Usage ### Compiling and Parsing Invoke the compiler from node: ```javascript var less = require('less'); less.render('.class { width: (1 + 1) }', function (e, css) { console.log(css); }); ``` Outputs: ```css .class { width: 2; } ``` You may also manually invoke the parser and compiler: ```javascript var parser = new(less.Parser); parser.parse('.class { width: (1 + 1) }', function (err, tree) { if (err) { return console.error(err) } console.log(tree.toCSS()); }); ``` ### Configuration You may also pass options to the compiler: ```javascript var parser = new(less.Parser)({ paths: ['.', './src/less'], // Specify search paths for @import directives filename: 'style.less' // Specify a filename, for better error messages }); parser.parse('.class { width: (1 + 1) }', function (e, tree) { tree.toCSS({ compress: true }); // Minify CSS output }); ``` ## More information For general information on the language, configuration options or usage visit [lesscss.org](http://lesscss.org) or [the less wiki][wiki]. Here are other resources for using Less.js: * [stackoverflow.com][so] is a great place to get answers about Less. * [node.js tools](https://github.com/less/less.js/wiki/Converting-LESS-to-CSS) for converting Less to CSS * [GUI compilers for Less](https://github.com/less/less.js/wiki/GUI-compilers-that-use-LESS.js) * [Less.js Issues][issues] for reporting bugs ## Contributing Please read [CONTRIBUTING.md](./CONTRIBUTING.md). Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/). ### Reporting Issues Before opening any issue, please search for existing issues and read the [Issue Guidelines](https://github.com/necolas/issue-guidelines), written by [Nicolas Gallagher](https://github.com/necolas/). After that if you find a bug or would like to make feature request, [please open a new issue][issues]. Please report documentation issues in [the documentation project](https://github.com/less/less-docs). ### Development #### Install Less.js Start by either [downloading this project][download] manually, or in the command line: ```shell git clone https://github.com/less/less.js.git "less" ``` and then `cd less`. #### Install dependencies To install all the dependencies for less development, run: ```shell npm install ``` If you haven't run grunt before, install grunt-cli globally so you can just run `grunt` ```shell npm install grunt-cli -g ``` You should now be able to build Less.js, run tests, benchmarking, and other tasks listed in the Gruntfile. ## Using Less.js Grunt Tests, benchmarking and building is done using Grunt `~0.4.1`. If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to install and use Grunt plugins, which are necessary for development with Less.js. The Less.js [Gruntfile](Gruntfile.js) is configured with the following "convenience tasks" : #### test - `grunt` Runs jshint, nodeunit and headless jasmine tests using [phantomjs](http://code.google.com/p/phantomjs/). You must have phantomjs installed for the jasmine tests to run. #### test - `grunt benchmark` Runs the benchmark suite. #### build for testing browser - 'grunt browser' This builds less.js and puts it in 'test/browser/less.js' #### build - `grunt stable | grunt beta | grunt alpha` Builds Less.js from from the `/lib/less` source files. This is done by the developer releasing a new release, do not do this if you are creating a pull request. #### readme - `grunt readme` Build the README file from [a template](build/README.md) to ensure that metadata is up-to-date and (more likely to be) correct. Please review the [Gruntfile](Gruntfile.js) to become acquainted with the other available tasks. **Please note** that if you have any issues installing dependencies or running any of the Gruntfile commands, please make sure to uninstall any previous versions, both in the local node_modules directory, and clear your global npm cache, and then try running `npm install` again. After that if you still have issues, please let us know about it so we can help. ## Release History See the [changelog](CHANGELOG.md) ## [License](LICENSE) Copyright (c) 2009-2014 [Alexis Sellier](http://cloudhead.io/) & The Core Less Team Licensed under the [Apache License](LICENSE). [so]: http://stackoverflow.com/questions/tagged/twitter-bootstrap+less "StackOverflow.com" [issues]: https://github.com/less/less.js/issues "GitHub Issues for Less.js" [wiki]: https://github.com/less/less.js/wiki "The official wiki for Less.js" [download]: https://github.com/less/less.js/zipball/master "Download Less.js"v1.6.3~dfsg/build.gradle0000644000000000000000000002433712275460205013744 0ustar rootrootimport groovy.io.FileType import org.apache.tools.ant.taskdefs.condition.Os import org.gradle.api.tasks.Exec buildscript { repositories { mavenCentral() jcenter() } dependencies { classpath 'com.eriwen:gradle-js-plugin:1.8.0' classpath 'com.moowork.gradle:gradle-grunt-plugin:0.2' } } apply plugin: 'js' apply plugin: 'grunt' repositories { mavenCentral() } configurations { rhino } dependencies { rhino 'org.mozilla:rhino:1.7R4' } project.ext { packageProps = new groovy.json.JsonSlurper().parseText(new File("package.json").toURL().text) failures = 0; rhinoTestSrc = "out/rhino-test-${packageProps.version}.js" testSrc = 'test/less' testOut = 'out/test' } task runGruntRhino(type: GruntTask) { gruntArgs = "rhino" } combineJs { dependsOn runGruntRhino source = ["dist/less-rhino-${packageProps.version}.js", "test/rhino/test-header.js","dist/lessc-rhino-${packageProps.version}.js"] dest = file(rhinoTestSrc) } task testRhino(type: AllRhinoTests) { // dependsOn 'testRhinoBase' dependsOn 'testRhinoBase', 'testRhinoErrors', 'testRhinoLegacy', 'testRhinoStaticUrls', 'testRhinoCompression', 'testRhinoDebugAll', 'testRhinoDebugComments', 'testRhinoDebugMediaquery', 'testRhinoNoJsError', 'testRhinoSourceMap' } task testRhinoBase(type: RhinoTest) { options = [ '--strict-math=true', '--relative-urls' ] } task testRhinoDebugAll(type: DebugRhinoTest) { options = [ '--strict-math=true', '--line-numbers=all' ] testDir = 'debug' + fs suffix = "-all" } task testRhinoDebugComments(type: DebugRhinoTest) { options = [ '--strict-math=true', '--line-numbers=comments' ] testDir = 'debug' + fs suffix = "-comments" } task testRhinoDebugMediaquery(type: DebugRhinoTest) { options = [ '--strict-math=true', '--line-numbers=mediaquery' ] testDir = 'debug' + fs suffix = "-mediaquery" } task testRhinoErrors(type: RhinoTest) { options = [ '--strict-math=true', '--strict-units=true' ] testDir = 'errors/' expectErrors = true } task testRhinoChyby(type: RhinoTest) { options = [ '--strict-math=true', '--strict-units=true' ] testDir = 'chyby/' // expectErrors = true } task testRhinoNoJsError(type: RhinoTest) { options = [ '--strict-math=true', '--strict-units=true', '--no-js' ] testDir = 'no-js-errors/' expectErrors = true } task testRhinoLegacy(type: RhinoTest) { testDir = 'legacy/' } task testRhinoStaticUrls(type: RhinoTest) { options = [ '--strict-math=true', '--rootpath=folder (1)/' ] testDir = 'static-urls/' } task testRhinoCompression(type: RhinoTest) { options = [ '--compress=true' ] testDir = 'compression/' } task testRhinoSourceMap(type: SourceMapRhinoTest) { options = [ '--strict-math=true', '--strict-units=true'] testDir = 'sourcemaps/' } task setupTest { dependsOn combineJs doLast { file(testOut).deleteDir() } } task clean << { file(rhinoTestSrc).delete() file(testOut).deleteDir() } class SourceMapRhinoTest extends RhinoTest { // helper to get the output map file def getOutputMap(lessFile) { def outFile = project.file(lessFile.path.replace('test/less', project.testOut).replace('.less', '.css')) return project.file(outFile.path + ".map"); } // callback to add SourceMap options to the options list def postProcessOptions(options, lessFile) { def outFile = getOutputMap(lessFile) project.file(outFile.parent).mkdirs() options << "--source-map=${testDir}${lessFile.name.replace('.less','.css')}" options << "--source-map-basepath=${lessRootDir}" options << "--source-map-rootpath=testweb/" options << "--source-map-output-map-file=${outFile}" options } // Callback to validate output def handleResult(exec, out, lessFile) { def actualFile = getOutputMap(lessFile) def expectedFile = project.file(projectDir + fs + "test" + fs + testDir + fs + lessFile.name.replace(".less", ".json")) assert actualFile.text == expectedFile.text } } class DebugRhinoTest extends RhinoTest { def escapeIt(it) { return it.replaceAll("\\\\", "\\\\\\\\").replaceAll("/", "\\\\/").replaceAll(":", "\\\\:").replaceAll("\\.", "\\\\."); } def globalReplacements(input, directory) { def pDirectory = toPlatformFs(directory) def p = lessRootDir + fs + pDirectory def pathimport = p + toPlatformFs("import/") def pathesc = escapeIt(p) def pathimportesc = escapeIt(pathimport) def result = input.replace("{path}", p).replace("{pathesc}", pathesc).replace("{pathimport}", pathimport) return result.replace("{pathimportesc}", pathimportesc).replace("\r\n", "\n") } } class RhinoTest extends DefaultTask { RhinoTest() { dependsOn 'setupTest' } def suffix = "" def testDir = '' def options = [] def expectErrors = false def fs = File.separator; def projectDir = toUpperCaseDriveLetter(System.getProperty("user.dir")); def lessRootDir = projectDir + fs + "test" + fs + "less" def toUpperCaseDriveLetter(path) { if (path.charAt(1)==':' && path.charAt(2)=='\\') { return path.substring(0,1).toUpperCase() + path.substring(1); } return path; } def toPlatformFs(path) { return path.replace('\\', fs).replace('/', fs); } def expectedCssPath(lessFilePath) { lessFilePath.replace('.less', "${suffix}.css").replace("${fs}less${fs}", "${fs}css${fs}"); } def globalReplacements(input, directory) { return input; } def stylize(str, style) { def styles = [ reset : [0, 0], bold : [1, 22], inverse : [7, 27], underline : [4, 24], yellow : [33, 39], green : [32, 39], red : [31, 39], grey : [90, 39] ]; return '\033[' + styles[style][0] + 'm' + str + '\033[' + styles[style][1] + 'm'; } // Callback for subclasses to make any changes to the options def postProcessOptions(options, lessFile) { options } // Callback to validate output def handleResult(exec, out, lessFile) { def actual = out.toString().trim() def actualResult = project.file(lessFile.path.replace('test/less', project.testOut).replace('.less', '.css')) project.file(actualResult.parent).mkdirs() actualResult << actual def expected if (expectErrors) { assert exec.exitValue != 0 expected = project.file(lessFile.path.replace('.less', '.txt')).text.trim(). replace('{path}', lessFile.parent + '/'). replace('{pathhref}', ''). replace('{404status}', '') } else { assert exec.exitValue == 0 def expectedFile = expectedCssPath(lessFile.path) expected = project.file(expectedFile).text.trim() expected = globalReplacements(expected, testDir) } actual=actual.trim() actual = actual.replace('\r\n', '\n') expected = expected.replace('\r\n', '\n') actual = actual.replace("/","\\") expected = expected.replace("/","\\") // println "* actual *" // println actual // new File("actual.txt").write(actual) // println "* expected *" // println expected // new File("expected.txt").write(expected) assert actual == expected actualResult.delete() } @TaskAction def runTest() { int testSuccesses = 0, testFailures = 0, testErrors = 0 project.file('test/less/' + testDir).eachFileMatch(FileType.FILES, ~/.*\.less/) { lessFile -> println "lessfile: $lessFile" if (!project.hasProperty('test') || lessFile.name.startsWith(project.test)) { def out = new java.io.ByteArrayOutputStream() def processedOptions = postProcessOptions([project.rhinoTestSrc, lessFile] + options, lessFile) def execOptions = { main = 'org.mozilla.javascript.tools.shell.Main' // main = 'org.mozilla.javascript.tools.debugger.Main' classpath = project.configurations.rhino args = processedOptions standardOutput = out ignoreExitValue = true } println "rhinoTestSrc: ${project.rhinoTestSrc}" try { def exec = project.javaexec(execOptions) handleResult(exec, out, lessFile) testSuccesses++ println stylize(' ok', 'green') } catch (ex) { println ex println() testErrors++; } catch (AssertionError ae) { println stylize(' failed', 'red') println ae testFailures++ } } else { println stylize(' skipped', 'yellow') } } println stylize(testSuccesses + ' ok', 'green') println stylize(testFailures + ' assertion failed', testFailures == 0 ? 'green' : 'red') println stylize(testErrors + ' errors', testErrors == 0 ? 'green' : 'red') if (testFailures != 0 || testErrors != 0) { project.failures++; } } } class AllRhinoTests extends DefaultTask { AllRhinoTests() { } @TaskAction def runTest() { println stylize(project.failures + ' test suites failed', project.failures == 0 ? 'green' : 'red') } def stylize(str, style) { def styles = [ reset : [0, 0], bold : [1, 22], inverse : [7, 27], underline : [4, 24], yellow : [33, 39], green : [32, 39], red : [31, 39], grey : [90, 39] ]; return '\033[' + styles[style][0] + 'm' + str + '\033[' + styles[style][1] + 'm'; } } class GruntTask extends Exec { private String gruntExecutable = Os.isFamily(Os.FAMILY_WINDOWS) ? "grunt.cmd" : "grunt" private String switches = "--no-color" String gruntArgs = "" public GruntTask() { super() this.setExecutable(gruntExecutable) } public void setGruntArgs(String gruntArgs) { this.args = "$switches $gruntArgs".trim().split(" ") as List } } v1.6.3~dfsg/bin/0000755000000000000000000000000012275460205012224 5ustar rootrootv1.6.3~dfsg/bin/lessc0000755000000000000000000003061512275460205013270 0ustar rootroot#!/usr/bin/env node var path = require('path'), fs = require('fs'), sys = require('util'), os = require('os'), mkdirp; var less = require('../lib/less'); var args = process.argv.slice(1); var options = { depends: false, compress: false, cleancss: false, max_line_len: -1, optimization: 1, silent: false, verbose: false, lint: false, paths: [], color: true, strictImports: false, insecure: false, rootpath: '', relativeUrls: false, ieCompat: true, strictMath: false, strictUnits: false, globalVariables: '', modifyVariables: '', urlArgs: '' }; var cleancssOptions = {}; var continueProcessing = true, currentErrorcode; // calling process.exit does not flush stdout always // so use this to set the exit code process.on('exit', function() { process.reallyExit(currentErrorcode) }); var checkArgFunc = function(arg, option) { if (!option) { console.log(arg + " option requires a parameter"); continueProcessing = false; return false; } return true; }; var checkBooleanArg = function(arg) { var onOff = /^((on|t|true|y|yes)|(off|f|false|n|no))$/i.exec(arg); if (!onOff) { console.log(" unable to parse "+arg+" as a boolean. use one of on/t/true/y/yes/off/f/false/n/no"); continueProcessing = false; return false; } return Boolean(onOff[2]); }; var parseVariableOption = function(option) { var parts = option.split('=', 2); return '@' + parts[0] + ': ' + parts[1] + ';\n'; }; var warningMessages = ""; var sourceMapFileInline = false; args = args.filter(function (arg) { var match; if (match = arg.match(/^-I(.+)$/)) { options.paths.push(match[1]); return false; } if (match = arg.match(/^--?([a-z][0-9a-z-]*)(?:=(.*))?$/i)) { arg = match[1] } else { return arg } switch (arg) { case 'v': case 'version': console.log("lessc " + less.version.join('.') + " (LESS Compiler) [JavaScript]"); continueProcessing = false; case 'verbose': options.verbose = true; break; case 's': case 'silent': options.silent = true; break; case 'l': case 'lint': options.lint = true; break; case 'strict-imports': options.strictImports = true; break; case 'h': case 'help': require('../lib/less/lessc_helper').printUsage(); continueProcessing = false; case 'x': case 'compress': options.compress = true; break; case 'insecure': options.insecure = true; break; case 'M': case 'depends': options.depends = true; break; case 'yui-compress': warningMessages += "yui-compress option has been removed. ignoring."; break; case 'clean-css': options.cleancss = true; break; case 'max-line-len': if (checkArgFunc(arg, match[2])) { options.maxLineLen = parseInt(match[2], 10); if (options.maxLineLen <= 0) { options.maxLineLen = -1; } } break; case 'no-color': options.color = false; break; case 'no-ie-compat': options.ieCompat = false; break; case 'no-js': options.javascriptEnabled = false; break; case 'include-path': if (checkArgFunc(arg, match[2])) { options.paths = match[2].split(os.type().match(/Windows/) ? ';' : ':') .map(function(p) { if (p) { return path.resolve(process.cwd(), p); } }); } break; case 'O0': options.optimization = 0; break; case 'O1': options.optimization = 1; break; case 'O2': options.optimization = 2; break; case 'line-numbers': if (checkArgFunc(arg, match[2])) { options.dumpLineNumbers = match[2]; } break; case 'source-map': if (!match[2]) { options.sourceMap = true; } else { options.sourceMap = match[2]; } break; case 'source-map-rootpath': if (checkArgFunc(arg, match[2])) { options.sourceMapRootpath = match[2]; } break; case 'source-map-basepath': if (checkArgFunc(arg, match[2])) { options.sourceMapBasepath = match[2]; } break; case 'source-map-map-inline': sourceMapFileInline = true; options.sourceMap = true; break; case 'source-map-less-inline': options.outputSourceFiles = true; break; case 'source-map-url': if (checkArgFunc(arg, match[2])) { options.sourceMapURL = match[2]; } break; case 'rp': case 'rootpath': if (checkArgFunc(arg, match[2])) { options.rootpath = match[2].replace(/\\/g, '/'); } break; case "ru": case "relative-urls": options.relativeUrls = true; break; case "sm": case "strict-math": if (checkArgFunc(arg, match[2])) { options.strictMath = checkBooleanArg(match[2]); } break; case "su": case "strict-units": if (checkArgFunc(arg, match[2])) { options.strictUnits = checkBooleanArg(match[2]); } break; case "global-var": if (checkArgFunc(arg, match[2])) { options.globalVariables += parseVariableOption(match[2]); } break; case "modify-var": if (checkArgFunc(arg, match[2])) { options.modifyVariables += parseVariableOption(match[2]); } break; case "clean-option": var cleanOptionArgs = match[2].split(":"); switch(cleanOptionArgs[0]) { case "--keep-line-breaks": case "-b": cleancssOptions.keepBreaks = true; break; case "--s0": cleancssOptions.keepSpecialComments = 0; break; case "--s1": cleancssOptions.keepSpecialComments = 1; break; case "--skip-advanced": cleancssOptions.noAdvanced = true; break; case "--advanced": cleancssOptions.noAdvanced = false; break; case "--selectors-merge-mode": cleancssOptions.selectorsMergeMode = cleanOptionArgs[1]; break; default: console.log("unrecognised clean-css option '" + cleanOptionArgs[0] + "'"); console.log("we support only arguments that make sense for less, '--keep-line-breaks', '-b'"); console.log("'--s0', '--s1', '--advanced', '--skip-advanced', '--selectors-merge-mode'"); continueProcessing = false; currentErrorcode = 1; break; } break; case 'url-args': if (checkArgFunc(arg, match[2])) { options.urlArgs = match[2]; } break; default: require('../lib/less/lessc_helper').printUsage(); continueProcessing = false; currentErrorcode = 1; break; } }); if (!continueProcessing) { return; } var input = args[1]; var inputbase = args[1]; if (input && input != '-') { input = path.resolve(process.cwd(), input); } var output = args[2]; var outputbase = args[2]; if (output) { options.sourceMapOutputFilename = output; output = path.resolve(process.cwd(), output); if (warningMessages) { console.log(warningMessages); } } options.sourceMapBasepath = options.sourceMapBasepath || (input ? path.dirname(input) : process.cwd()); if (options.sourceMap === true) { if (!output && !sourceMapFileInline) { console.log("the sourcemap option only has an optional filename if the css filename is given"); return; } options.sourceMapFullFilename = options.sourceMapOutputFilename + ".map"; options.sourceMap = path.basename(options.sourceMapFullFilename); } if (options.cleancss && options.sourceMap) { console.log("the sourcemap option is not compatible with sourcemap support at the moment. See Issue #1656"); return; } if (! input) { console.log("lessc: no input files"); console.log(""); require('../lib/less/lessc_helper').printUsage(); currentErrorcode = 1; return; } var ensureDirectory = function (filepath) { var dir = path.dirname(filepath), cmd, existsSync = fs.existsSync || path.existsSync; if (!existsSync(dir)) { if (mkdirp === undefined) { try {mkdirp = require('mkdirp');} catch(e) { mkdirp = null; } } cmd = mkdirp && mkdirp.sync || fs.mkdirSync; cmd(dir); } }; if (options.depends) { if (!outputbase) { sys.print("option --depends requires an output path to be specified"); return; } sys.print(outputbase + ": "); } if (!sourceMapFileInline) { var writeSourceMap = function(output) { var filename = options.sourceMapFullFilename || options.sourceMap; ensureDirectory(filename); fs.writeFileSync(filename, output, 'utf8'); }; } var parseLessFile = function (e, data) { if (e) { console.log("lessc: " + e.message); currentErrorcode = 1; return; } data = options.globalVariables + data + options.modifyVariables; options.paths = [path.dirname(input)].concat(options.paths); options.filename = input; var parser = new(less.Parser)(options); parser.parse(data, function (err, tree) { if (err) { less.writeError(err, options); currentErrorcode = 1; return; } else if (options.depends) { for(var file in parser.imports.files) { sys.print(file + " ") } sys.print("\n"); } else if(!options.lint) { try { var css = tree.toCSS({ silent: options.silent, verbose: options.verbose, ieCompat: options.ieCompat, compress: options.compress, cleancss: options.cleancss, cleancssOptions: cleancssOptions, sourceMap: Boolean(options.sourceMap), sourceMapFilename: options.sourceMap, sourceMapURL: options.sourceMapURL, sourceMapOutputFilename: options.sourceMapOutputFilename, sourceMapBasepath: options.sourceMapBasepath, sourceMapRootpath: options.sourceMapRootpath || "", outputSourceFiles: options.outputSourceFiles, writeSourceMap: writeSourceMap, maxLineLen: options.maxLineLen, strictMath: options.strictMath, strictUnits: options.strictUnits, urlArgs: options.urlArgs }); if (output) { ensureDirectory(output); fs.writeFileSync(output, css, 'utf8'); if (options.verbose) { console.log('lessc: wrote ' + output); } } else { sys.print(css); } } catch (e) { less.writeError(e, options); currentErrorcode = 2; return; } } }); }; if (input != '-') { fs.readFile(input, 'utf8', parseLessFile); } else { process.stdin.resume(); process.stdin.setEncoding('utf8'); var buffer = ''; process.stdin.on('data', function(data) { buffer += data; }); process.stdin.on('end', function() { parseLessFile(false, buffer); }); } v1.6.3~dfsg/.npmignore0000644000000000000000000000001712275460205013451 0ustar rootroot.gitattributes v1.6.3~dfsg/gradle/0000755000000000000000000000000012275460205012712 5ustar rootrootv1.6.3~dfsg/gradle/wrapper/0000755000000000000000000000000012606003643014367 5ustar rootrootv1.6.3~dfsg/gradle/wrapper/gradle-wrapper.properties0000644000000000000000000000034512275460205021426 0ustar rootroot#Sun Oct 27 15:19:43 CET 2013 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip v1.6.3~dfsg/benchmark/0000755000000000000000000000000012275460205013406 5ustar rootrootv1.6.3~dfsg/benchmark/less-benchmark.js0000644000000000000000000000234512275460205016646 0ustar rootrootvar path = require('path'), fs = require('fs'), sys = require('util'); var less = require('../lib/less'); var file = path.join(__dirname, 'benchmark.less'); if (process.argv[2]) { file = path.join(process.cwd(), process.argv[2]) } fs.readFile(file, 'utf8', function (e, data) { var tree, css, start, end, total; console.log("Benchmarking...\n", path.basename(file) + " (" + parseInt(data.length / 1024) + " KB)", ""); start = new(Date); new(less.Parser)({ optimization: 2 }).parse(data, function (err, tree) { end = new Date(); total = end - start; console.log("Parsing: " + total + " ms (" + Number(1000 / total * data.length / 1024) + " KB\/s)"); start = new Date(); css = tree.toCSS(); end = new Date(); console.log("Generation: " + (end - start) + " ms (" + parseInt(1000 / (end - start) * data.length / 1024) + " KB\/s)"); total += end - start; console.log("Total: " + total + "ms (" + Number(1000 / total * data.length / 1024) + " KB/s)"); if (err) { less.writeError(err); process.exit(3); } }); }); v1.6.3~dfsg/benchmark/benchmark.less0000644000000000000000000027504512275460205016245 0ustar rootroot@bg: #f01; @white: #fff; @grey: #eee; @black: #000; @blue: #000; @accent_colour: #000; @light_grey: #eee; @dark_grey: #eee; @yellow: #422; @red: #ff0000; @colour_positive: #ff0000; @colour_negative: #ff0000; .box_shadow (...) { } .text_shadow (...) { } .border_radius (...) { } .border_radius_top_left (...) { } .border_radius_top_right (...) { } .border_radius_bottom_right (...) { } .border_radius_bottom_left (...) { } .border_radius_top (...) { } .border_radius_right (...) { } .border_radius_bottom (...) { } .border_radius_left (...) { } div.browse { margin: 0 0 20px; &.class { padding: 0; } div.header { padding: 10px 10px 9px; text-align: left; background: @bg url('/images/panel_header_bg.png') repeat-x top left; border-bottom: 1px solid (@bg * 0.66 + @black * 0.33); line-height: 1; height: 18px; .border_radius_top(3); color: @light_grey; h3 { font-size: 16px; margin: 0; color: @white; .text_shadow(1, 1, 0, @bg * 0.66 + @black * 0.33); } span.filter { float: left; display: block; overflow: hidden; position: relative; z-index: 5; a { margin: 0 1px 0 0; display: block; float: left; padding: 0 8px; height: 18px; font-weight: bold; font-size: 10px; line-height: 18px; text-transform: uppercase; background: url('/images/transparent_backgrounds/black_50.png'); color: @light_grey; text-decoration: none; position: relative; z-index: 3; .active { background: @white; color: @black; z-index: 4; :hover { color: @black; } } :hover { color: @white; } :first-child { .border_radius_left(2); } :last-child { .border_radius_right(2); margin-right: 0; } } } span.filter.dropdown { margin: 0; position: relative; overflow: visible; a { .border_radius(2); background: @white; color: @black; margin: 0; position: relative; padding-right: 25px; img { float: left; margin: 4px 5px 0 0; } b.arrow { float: right; display: block; height: 0; width: 0; border: 5px solid transparent; border-top: 5px solid @black; border-bottom: none; position: absolute; top: 6px; right: 10px; } :hover { background: @accent_colour; color: @white; b.arrow { border-top: 5px solid @white; } } } ul { position: absolute; top: 100%; left: 0; margin: 1px 0 0; padding: 0; background: @white; .border_radius(2); .box_shadow(0, 1, 1, @black); li { list-style: none; display: block; padding: 0; margin: 0; a { display: block; height: 18px; line-height: 18px; color: @black; font-size: 10px; text-transform: uppercase; background: transparent; border-bottom: 1px solid (@light_grey * 0.66 + @white * 0.33); float: none; margin: 0; .border_radius(0); white-space: nowrap; :hover { background: url('/images/transparent_backgrounds/accent_colour_25.png'); color: @black; } } :last-child { a { border: none; } } } } } span.filter.dropdown.sort { float: left; margin: 0 0 0 10px; } span.filter.dropdown.localisation { float: left; margin: 0 0 0 10px; } a.more { float: right; color: @white; .text_shadow(1, 1, 0, @bg * 0.66 + @black * 0.33); font-size: 14px; font-weight: bold; position: relative; top: 2px; :hover { text-decoration: none; } } } > ul { margin: 0; background: @white; padding: 10px 0 0 10px; .border_radius(3); position: relative; li { display: block; float: left; list-style: none; margin: 0 10px 10px 0; padding: 5px; position: relative; background: @white; width: 130px; border: 1px solid (@light_grey * 0.33 + @white * 0.66); .border_radius(2); a.remove { position: absolute; height: 16px; width: 16px; padding: 3px; background: @accent_colour; .border_radius(99); display: none; z-index: 3; top: -8px; right: -8px; img { vertical-align: middle; } } div.thumbnail { .border_radius_top(3); position: relative; z-index: 3; .marker { position: absolute; padding: 2px; .border_radius(2); z-index: 3; background: url('/images/transparent_backgrounds/white_75.png'); height: 12px; width: 12px; } .marker.coupon { height: auto; width: auto; top: 10px; right: -3px; padding: 0; background: transparent; overflow: hidden; position: absolute; b { display: block; height: 0; width: 0; float: left; border: 14px solid transparent; border-top: 14px solid @accent_colour; border-bottom: none; border-right: none; float: left; } span { color: @white; font-size: 10px; font-weight: bold; text-transform: uppercase; height: 14px; line-height: 14px; display: block; padding: 0 4px 0 2px; background: @accent_colour; .text_shadow(1, 1, 0px, (@accent_colour * 0.75 + @black * 0.25)); margin: 0 0 0 14px; } } .marker.video { position: absolute; left: 50%; top: 50%; background: @white; width: 10px; height: 10px; b { display: block; width: 0; height: 0; border: 5px solid transparent; border-left: 10px solid @black; border-right: none; } } .marker.endorsed_by_me { background: none; padding: 0; right: 0; bottom: -32px; .border_radius(2); background: @white; } a.thumbnail { display: block; overflow: hidden; position: relative; text-align: center; img { position: relative; display: block; margin: auto; } } } div.text { margin: 3px 0 0; display: block; a { text-decoration: none; } a.title { display: block; text-decoration: none; font-weight: bold; font-size: 12px; line-height: 16px; white-space: nowrap; height: 16px; overflow: hidden; :before { display: block; height: 32px; width: 20px; content: " "; float: right; right: -15px; top: -8px; background: @white; position: relative; z-index: 1; .box_shadow(-5, 0, 10, @white); } } small { font-size: 11px; line-height: 13px; color: @grey; display: block; height: 13px; overflow: hidden; white-space: nowrap; a { font-weight: bold; } :before { display: block; height: 32px; width: 20px; content: " "; float: right; right: -15px; top: -8px; background: @white; position: relative; z-index: 1; .box_shadow(-5, 0, 10, @white); } } } :hover { background: @accent_colour; a.remove { display: block; } div.thumbnail { a.marker.remove, a.marker.video { b { display: inline-block; } } a.marker.video { .box_shadow(0, 0, 2, @black); } } div.text { a { color: @white; } a.title:before { background: @accent_colour; .box_shadow(-5, 0, 10, @accent_colour); } small { color: @white * 0.75 + @accent_colour * 0.25; :before { background: @accent_colour; .box_shadow(-5, 0, 10, @accent_colour); } } } div.footer a { color: @white; } } } > li.ad div.thumbnail a.thumbnail { width: 130px; height: 97px; img { width: 100%; height: 100%; } } > li.brand div.thumbnail a.thumbnail { width: 120px; height: 87px; padding: 5px; background: @white; .border_radius(2); img { max-width: 120px; max-height: 87px; } } li.paginate { margin-bottom: 0; a { display: block; position: relative; text-decoration: none; height: 131px; div.arrow { background: #81c153 url('/images/button_bg.png') repeat-x left top; border: 1px solid (@accent_colour * 0.75 + @black * 0.25); height: 44px; .border_radius(99); width: 44px; margin: 0 auto; position: relative; top: 32px; b { text-indent: -9000px; display: block; border: 10px solid transparent; width: 0; height: 0; position: relative; top: 12px; } } div.label { position: absolute; bottom: 5px; left: 0; right: 0; line-height: 13px; color: @accent_colour * 0.85 + @black * 0.15; text-decoration: none; font-weight: bold; font-size: 12px; text-align: center; } :hover { div.arrow { background: #abd56e url('/images/button_bg.png') repeat-x left -44px; } } } :hover { background: transparent; } } li.paginate.previous a div b { border-right: 15px solid @white; border-left: none; left: 12px; } li.paginate.next a div b { border-left: 15px solid @white; border-right: none; left: 16px; } } > div.footer { padding: 9px 10px 10px; background: @light_grey * 0.75 + @white * 0.25; overflow: hidden; border-top: 1px solid @light_grey; .border_radius_bottom(3); div.info { float: left; color: @grey; strong { color: @black; font-weight: normal; } } div.pagination { float: right; > * { display: inline-block; line-height: 1; padding: 0 6px; line-height: 18px; height: 18px; background: @white; .border_radius(3); text-decoration: none; font-weight: bold; font-size: 10px; text-transform: uppercase; } a { color: @grey; } a:hover { color: @black; } span.disabled { color: @light_grey; } span.current { color: @white; background: @bg; border: none; } span.current:hover { color: @white; } } } } div.browse.with_categories { margin: 0 0 0 160px; } div.browse.with_options > ul { .border_radius_top(0); } div.browse.with_footer > ul { .border_radius_bottom(0); } /* Browse List */ div.browse.list { > ul { margin: 0; min-height: 320px; padding: 10px 0 0 10px; overflow: hidden; > li { display: block; list-style: none; margin: 0 10px 10px 0; padding: 5px; .border_radius(3); position: relative; line-height: normal; .marker { position: absolute; padding: 2px; .border_radius(2); background: url('/images/transparent_backgrounds/white_75.png'); img { height: 12px; width: 12px; } } img.marker { height: 12px; width: 12px; } span.marker.new { color: black; left: -5px; top: -5px; background: none; background-color: @white * 0.1 + @yellow * 0.6 + @red * 0.3; line-height: 1; padding: 2px 5px; font-weight: bold; } a.marker.media_type { display: inline-block; text-decoration: none; top: 39px; left: 8px; font-size: 10px; b { font-weight: normal; margin: 0 0 0 2px; line-height: 1; display: none; } img { vertical-align: middle; } } a.thumbnail { float: left; width: 68px; display: block; overflow: hidden; border: 1px solid @light_grey; :hover { border-color: @accent_colour; } } span.title_brand { display: block; margin: 0 0 2px 75px; a { margin: 0; display: inline; } a.brand_name { font-weight: normal; font-size: 12px; } } a.ad_title { font-weight: bold; font-size: 14px; margin: 0 0 0 75px; display: block; } a.brand_name { font-weight: bold; font-size: 14px; margin: 0 0 0 75px; display: block; } small { display: block; color: @grey; margin: 0 0 0 75px; font-size: 12px; } small.brand_name { display: inline; margin: 0; } ul.chart { margin: 0 0 0 80px; height: 39px; } ul.networks { margin: 3px 0 0 75px; padding: 0; overflow: hidden; li { display: block; float: left; margin: 0 5px 0 0; line-height: 1; } } div.points { display: none; font-size: 12px; text-align: right; label { color: @grey; } } a.remove { bottom: -3px; right: -3px; } } li.ad { a.thumbnail { height: 51px; } span.title_brand { small.brand_name { display: block; } } } li.brand { a.thumbnail { height: 68px; } } } } div.browse.list.with_options ul { .border_radius_top(0); } div.browse.list.with_footer ul { .border_radius_bottom(0); } div.browse.list.cols_2 { > ul { > li { width: 285px; float: left; :hover { background: @white; } } } } div.browse.ads.list { > ul { > li { height: 53px; a.thumbnail { height: 51px; } } } } div.browse.brands.list { > ul { > li { height: 68px; a.thumbnail { height: 66px; } } } } /* Categories List */ #categories { margin: 40px 0 0; width: 160px; float: left; position: relative; z-index: 1; ul { margin: 0; padding: 10px 0 0; li { list-style: none; margin: 0; padding: 0; font-size: 14px; a { color: @grey; display: block; padding: 5px 10px 5px 15px; text-decoration: none; .border_radius_left(3); } a:hover { color: @black; background: @light_grey * 0.15 + @white * 0.85; } } .all a { font-weight: bold; } .current a { background: @white; color: @black; border: 1px solid (@light_grey * 0.25 + @white * 0.75); border-right: none; border-left: 5px solid @bg; padding-left: 10px; } } } /* Ads > Show */ #ad { div.header { overflow: hidden; h3 { font-size: 16px; margin: 0 0 3px; } small { a.category { font-weight: bold; color: @accent_colour; } span.networks img { position: relative; top: 3px; } } span.brand { float: right; color: @white; a.brand_name { font-weight: bold; color: @accent_colour; } } } div.content { padding: 0; position: relative; a.toggle_size { display: block; .border_radius(3); background-color: @black; padding: 0 5px 0 26px; background-position: 5px center; background-repeat: no-repeat; text-decoration: none; margin: 5px 5px 0 0; position: absolute; top: 0; right: 0; line-height: 25px; z-index: 45; } img.creative { margin: 0 auto; max-width: 540px; display: block; } object { position: relative; z-index: 44; } object.video { line-height: 0; font-size: 0; } object embed { position: relative; z-index: 45; line-height: 0; font-size: 0; } } div.content.not_video { padding: 40px; text-align: center; * { margin-left: auto; margin-right: auto; } object.flash { margin-bottom: 0; } } div.footer { padding: 0; div.vote_views { padding: 5px 10px; overflow: hidden; div.share { float: right; margin: 2px 0 0 0; } #login_register_msg, #encourage_vote_msg { line-height: 22px; font-weight: bold; color: @black; } } } } #sidebar { #meta { table { margin: 0; tr:last-child td { padding-bottom: 0; } td { padding: 0 0 5px; ul.networks { margin: 0; padding: 0; li { list-style: none; display: inline; } li { } } } td.label { color: @grey; white-space: nowrap; width: 1%; text-align: right; padding-right: 5px; } } } } /* Voting */ div.voted { font-size: 12px; line-height: 22px; color: @black; display: inline-block; font-weight: bold; img { float: left; margin-right: 5px; padding: 3px; .border_radius(3); } } #voted_up { img { background: @colour_positive * 0.66 + @bg * 0.15; } } #voted_down { img { background: @colour_negative * 0.66 + @bg * 0.15; } } #encourage_comment { display: inline-block; line-height: 22px; font-weight: bold; } #vote { overflow: hidden; font-size: 12px; line-height: 22px; color: @black; float: left; a { color: @white; font-weight: bold; overflow: hidden; display: block; width: 16px; text-decoration: none; text-align: center; font-size: 10px; padding: 3px; text-transform: uppercase; } a.up { float: left; background: @colour_positive * 0.66 + @bg * 0.15; .border_radius_left(3); :hover { background: @colour_positive * 0.85 + @bg * 0.15; } } a.down { float: left; background: @colour_negative * 0.66 + @bg * 0.15; .border_radius_right(3); margin: 0 5px 0 1px; :hover { background: @colour_negative * 0.85 + @bg * 0.15; } } } #vote.disabled { a.up { background: (@colour_positive * 0.66 + @bg * 0.15) * 0.15 + @grey * 0.85; :hover { background: (@colour_positive * 0.85 + @bg * 0.15) * 0.25 + @grey * 0.75; } } a.down { background: (@colour_negative * 0.66 + @bg * 0.15) * 0.15 + @grey * 0.85; :hover { background: (@colour_negative * 0.85 + @bg * 0.15) * 0.25 + @grey * 0.75; } } } /* Panels */ div.panel { margin: 0 0 20px; position: relative; .box_shadow(0, 0, 3, @light_grey * 0.66 + @white * 0.33); .border_radius(3); > div.header { background: @bg url('/images/panel_header_bg.png') repeat-x top left; border-bottom: 1px solid (@bg * 0.66 + @black * 0.33); padding: 5px 10px 4px; .border_radius_top(3); min-height: 18px; h2 { font-size: 16px; margin: 0; color: @white; .text_shadow(1, 1, 0, @bg * 0.66 + @black * 0.33); } h3 { color: @white; font-size: 14px; margin: 0; line-height: 18px; .text_shadow(1, 1, 0, @bg * 0.66 + @black * 0.33); } small { display: block; font-size: 12px; color: @light_grey * 0.25 + @white * 0.75; } span.filter { float: left; display: block; overflow: hidden; position: relative; z-index: 5; a { margin: 0 1px 0 0; display: block; float: left; padding: 0 8px; height: 18px; font-weight: bold; font-size: 10px; line-height: 18px; text-transform: uppercase; background: url('/images/transparent_backgrounds/black_50.png'); color: @light_grey; text-decoration: none; position: relative; z-index: 3; } a:first-child { .border_radius_left(2); } a:last-child { .border_radius_right(2); margin-right: 0; } a.active { background: @white; color: @black; z-index: 4; } a:hover { color: @white; } a.active:hover { color: @black; } } span.filter.dropdown { margin: 0; position: relative; overflow: visible; a { .border_radius(2); background: @white; color: @black; margin: 0; position: relative; padding-right: 25px; img { float: left; margin: 4px 5px 0 0; } b.arrow { float: right; display: block; height: 0; width: 0; border: 5px solid transparent; border-top: 5px solid @black; border-bottom: none; position: absolute; top: 6px; right: 10px; } :hover { background: @accent_colour; color: @white; b.arrow { border-top: 5px solid @white; } } } ul { position: absolute; top: 100%; left: 0; margin: 1px 0 0; padding: 0; background: @white; .border_radius(2); .box_shadow(0, 1, 1, @black); li { list-style: none; display: block; padding: 0; margin: 0; a { display: block; height: 18px; line-height: 18px; color: @black; font-size: 10px; text-transform: uppercase; background: transparent; border-bottom: 1px solid (@light_grey * 0.66 + @white * 0.33); float: none; margin: 0; .border_radius(0); white-space: nowrap; :hover { background: url('/images/transparent_backgrounds/accent_colour_25.png'); color: @black; } } } li:last-child { a { border: none; } } } } span.filter.dropdown.sort { float: left; margin: 0 0 0 10px; } span.filter.dropdown.localisation { float: left; margin: 0 0 0 10px; } a.more { float: right; color: @white; .text_shadow(1, 1, 0, @bg * 0.66 + @black * 0.33); font-size: 14px; font-weight: bold; position: relative; top: 2px; :hover { text-decoration: none; } } } > div.content { background: @white; padding: 10px; .no_padding { padding: 0; } } > div.footer { background: @light_grey * 0.33 + @white * 0.66; border-top: 1px solid (@light_grey * 0.5 + @white * 0.5); padding: 4px 10px 5px; .border_radius_bottom(3); } } div.panel.no_footer div.content { .border_radius_bottom(3); } div.panel.no_header div.content { .border_radius_top(3); } div.panel.collapsable { div.header { cursor: pointer; b.toggle { float: right; border: 5px solid transparent; border-bottom: 5px solid @white; border-top: none; display: block; width: 0; height: 0; margin: 6px 0 0 0; } } div.header:hover { background-color: @bg * 0.75 + @white * 0.25; } } div.panel.collapsed { div.header { border-bottom: none; .border_radius(3); b.toggle { border-bottom: none; border-top: 5px solid @white; } } div.blank { border-bottom: none; .border_radius_bottom(3); } div.content, div.footer { display: none; } } /* Sidebar Actions */ #sidebar { #actions { .box_shadow(0, 0, 0, transparent); div.content { background: url('/images/transparent_backgrounds/accent_colour_10.png'); text-align: center; p.endorsement { margin: 0 0 10px; font-size: 14px; font-weight: bold; small { font-weight: normal; line-height: inherit; margin: 10px 0 0; } :last-child { margin: 0; } } div.share { margin: 5px 0 0; } a.button { font-size: 16px; line-height: normal; height: auto; padding: 5px 10px 5px 35px; font-weight: bold; margin: 0; position: relative; img { position: absolute; top: 3px; left: 6px; } } div.flash.notice { margin: 10px 0 0; font-size: 22px; small { font-weight: normal; margin: 0 0 10px; } } div.flash.notice.done { margin: 0; } small { display: block; margin: 10px 0 0; font-size: 11px; color: #808080; line-height: 12px; img.favicon { vertical-align: middle; } } div.blank { border: none; background: none; padding: 10px 0 0; border-top: 1px solid (@accent_colour * 0.5 + @white * 0.5); margin: 10px 0 0; } } } } /* People Lists */ ul.people { margin: 0; padding: 10px 0 0 10px; background: @white; > li { display: block; margin: 0 10px 10px 0; float: left; padding: 2px; width: 57px; position: relative; .border_radius(2); background: @white; list-style: none; border: 1px solid (@light_grey * 0.33 + @white * 0.66); a.avatar { display: block; width: 59px; height: 59px; overflow: hidden; img { width: 100%; height: 100%; } } a.name { display: block; font-size: 10px; text-align: center; } :hover { background: @accent_colour; a.name { color: @white; } } } } ul.people.list { padding: 0; > li { margin: 0 0 10px; padding: 0 0 10px; overflow: hidden; float: none; width: auto; .border_radius(0); border: none; border-bottom: 1px solid (@light_grey * 0.33 + @white * 0.66); span.points { float: right; display: block; padding: 5px; background: @light_grey * 0.15 + @white * 0.85; line-height: 1; text-align: center; width: 50px; height: 30px; .border_radius(3); margin: 0 0 0 10px; strong { display: block; color: @black; font-size: 16px; margin: 2px 0 0; } label { color: @grey; text-transform: uppercase; font-size: 10px; } label.long { display: block; } label.short { display: none; } } a.avatar { float: left; width: 40px; height: 40px; } a.name { font-size: 14px; font-weight: bold; margin: 0 0 0 50px; text-align: left; } a.name.long { display: inline; } a.name.short { display: none; } span.networks { display: block; margin: 0 0 0 50px; img.favicon { vertical-align: middle; } } :hover { background: transparent; a.name { color: @accent_colour * 0.85 + @black * 0.15; } } :last-child { padding-bottom: 0; border-bottom: none; margin-bottom: 0; } } } ul.people.list.small { > li { span.points { padding: 3px 6px; height: 18px; font-size: 9px; line-height: 17px; width: 60px; strong { font-size: 12px; margin: 0; display: inline; } label { font-size: 9px; } label.long { display: none; } label.short { display: inline; } } a.avatar { width: 24px; height: 24px; } a.name { display: inline; line-height: 24px; margin: 0 0 0 5px; font-size: 12px; height: 24px; } a.name.long { display: none; } a.name.short { display: inline; } span.networks { display: inline; margin: 0; } :last-child { padding-bottom: 0; border-bottom: none; margin-bottom: 0; } } } ul.people.tiled { > li { width: 28px; padding: 2px; a.avatar { width: 24px; height: 24px; background: @white; padding: 2px; } a.name, small, span.networks, span.points { display: none; } } } /* Comments */ #comments { ul { margin: 0 0 20px; padding: 0; li { display: block; list-style: none; padding: 0; margin: 0 0 10px; span.meta { margin: 0; overflow: hidden; display: block; small { font-size: 12px; color: @light_grey; float: right; line-height: 16px; display: inline-block; } a.avatar { display: inline-block; height: 16px; width: 16px; position: relative; top: 3px; img { height: 100%; width: 100%; } } a.name { font-weight: bold; line-height: 16px; display: inline-block; } span.inactive { color: @grey; font-weight: bold; line-height: 16px; display: inline-block; } } b.tail { display: block; width: 0; height: 0; margin: 3px 0 0 10px; border: 5px solid transparent; border-top: none; border-bottom: 5px solid @white; position: relative; z-index: 2; } blockquote { margin: 0; padding: 10px; .border_radius(3); font-style: normal; background: @white; color: @dark_grey; .box_shadow(0, 0, 3, @light_grey * 0.66 + @white * 0.33); } } } form { margin: 0; textarea { width: 500px; } } } /* Sidebar Categories */ #sidebar { #categories { margin: 0 0 20px; width: auto; p { margin: 0; } } } #sidebar { #ads > ul li, #recommendations > ul li { width: 81px; div.thumbnail { a.thumbnail { height: 60px; width: 81px; } } div.text { a.title { font-size: 11px; height: 14px; line-height: 14px; } small { display: none; } } } #brands > ul li { width: 55px; div.thumbnail { a.thumbnail { height: 45px; width: 45px; img { max-height: 45px; max-width: 45px; } } } div.text { display: none; } } } /* My Account */ #accounts_controller { #top { #page_title { #page_options { a.button.public_profile { float: right; font-size: 16px; line-height: 1; height: auto; padding: 8px 35px 8px 15px; position: relative; b.arrow { display: block; height: 0; width: 0; position: absolute; top: 10px; right: 15px; border: 6px solid transparent; border-right: none; border-left: 6px solid @white; margin: 0; } } a.button.goto_dashboard { float: right; font-size: 16px; line-height: 1; height: auto; padding: 8px 15px 8px 35px; margin-right: 5px; position: relative; b.arrow { display: block; height: 0; width: 0; position: absolute; top: 10px; left: 15px; border: 6px solid transparent; border-left: none; border-right: 6px solid @white; margin: 0; } } } } } #account_nav { float: left; width: 200px; margin: 0 20px 0 0; ul.nav { margin: 0; padding: 0; li { margin: 0 0 5px; display: block; list-style: none; padding: 0; a { display: block; height: 30px; text-decoration: none; color: @white; b { border: 15px solid transparent; border-right: none; border-left: 10px solid transparent; width: 0; height: 0; float: right; display: none; } span { .border_radius(3); background: @bg; display: block; line-height: 30px; padding: 0 10px; font-size: 14px; font-weight: bold; margin: 0 10px 0 0; } } :hover { a { color: @white; b { border-left-color: @bg; display: block; } span { background: @bg; .border_radius_right(0); } } } } li.current a { b { border-left-color: @accent_colour; display: block; } span { background: @accent_colour; color: @white; .border_radius_right(0); } } } } #main { > div { margin: 0 0 20px; form { margin: 0; } } #profile { a.avatar { float: left; display: block; width: 70px; overflow: hidden; position: relative; text-decoration: none; img { width: 100%; } span { display: block; line-height: 1; padding: 3px; margin: 5px 0 0; color: @white; background: @accent_colour; .border_radius(3); .text_shadow(1, 1, 0, @grey); text-align: center; font-size: 10px; font-weight: bold; text-transform: uppercase; } } form { margin: 0 0 0 90px; h4 { margin: 10px 0 20px; border-bottom: 1px solid (@light_grey * 0.5 + @white * 0.5); padding: 0; color: @bg; font-size: 16px; } ul.choices { li { width: 30%; } } div.extra { margin-top: 20px; } } } #networks { ul { margin: 0 -10px -10px 0; padding: 0; overflow: hidden; li:hover { background: @light_grey; display: block; float: left; width: 180px; padding: 10px; margin: 0 10px 10px 0; list-style: none; .border_radius(3); position: relative; * { line-height: normal; } img { vertical-align: middle; float: left; } .name { font-weight: bold; font-size: 14px; display: block; margin: -2px 0 0 42px; } small { font-size: 12px; color: @grey; display: block; margin-left: 42px; strong { color: @black; font-weight: normal; } } :hover { } } li.installed { background: @white; border: 2px solid @accent_colour; padding: 8px; } li.unavailable { .name { color: @black; } :hover { background: @light_grey; } } li:hover { background: @light_grey * 0.5 + @white * 0.5; } } } } } /* Shopping Style Panel */ #shopping_style { div.header a.button.small { float: right; } div.content { p { margin: 0 0 10px; label { text-transform: uppercase; font-size: 11px; display: block; color: @bg; font-weight: bold; } span { color: @black; } span.toggle { white-space: nowrap; color: @grey; } :last-child { margin: 0; } } p.more { text-align: left; font-weight: normal; } p.less { display: none; margin: 0; } } } /* People Controller */ #people_controller.index { #main { div.panel { float: left; width: 300px; margin: 0 20px 0 0; :last-child { margin-right: 0; } } } } #people_controller.show { #person_overview, #shopping_style { a.button.small { } } #content { #shopping_style { float: left; width: 240px; margin: 0 20px 0 0; } #main { width: 360px; } } } /* Search Results */ #search_results { margin: 0 0 20px; li { :hover { small { color: @white * 0.75 + @accent_colour * 0.25; } } } } #search { div.content { padding: 20px; form { margin: 0; float: none; span.submit_and_options { display: block; } } p { margin: 0 0 15px; } h4 { font-weight: normal; margin: 0 0 5px; } } } /* Recommendations */ #recommendations { div.browse { margin: 0; padding: 0; background: none; ul { min-height: 0; .border_radius(0); } } } /* Blank States */ div.blank { padding: 20px; background: @bg * 0.05 + @blue * 0.05 + @white * 0.9; position: relative; border: 1px solid (@bg * 0.1 + @blue * 0.1 + @white * 0.8); z-index: 1; h4 { font-size: 18px; margin: 0 0 10px; } h4:last-child { margin: 0; } p { font-size: 16px; margin: 0 0 10px; } p:last-child { margin: 0; } p.with_list_number.large { span { margin-left: 48px; display: block; color: @white; } } p.earn span { font-size: 22px; color: @white; line-height: 48px; font-weight: bold; } a { white-space: nowrap; } a.hide { position: absolute; top: -5px; right: -5px; display: block; height: 16px; width: 16px; padding: 3px; background: #E7E9F6; .border_radius(99); } } div.blank.small { padding: 10px 20px; h4 { font-weight: normal; font-size: 16px; } p { margin: 0; } } div.blank.tiny { padding: 10px 20px; h4 { font-weight: normal; font-size: 14px; } p { margin: 0; font-size: 12px; } } div.blank.rounded { .border_radius(3); margin: 0 0 20px; } div.blank.rounded.bottom { .border_radius_top(0); } div.blank.with_border_bottom { border-bottom: 1px solid (@bg * 0.1 + @blue * 0.1 + @white * 0.8); } div.blank.no_border_top { border-top: none; } div.blank.no_border_bottom { border-bottom: none; } div.blank.no_side_borders { border-right: none; border-left: none; } div.panel { div.blank { padding: 10px 20px; overflow: hidden; margin: 0; h4 { font-weight: normal; font-size: 14px; } p, ul { margin: 0 0 10px; font-size: 12px; } p:last-child, ul:last-child { margin: 0; } } } /* Sidebar Browse */ #sidebar { div.panel { div.content.browse { padding: 0; margin: 0; > ul { min-height: 0; .border_radius(0); > li { div.thumbnail { a.thumbnail { padding: 5px; } img.marker.media_type { top: 48px; left: 8px; } } div.footer { a.title, a.name { font-size: 11px; font-weight: normal; } } } } } div.content.browse.ads > ul > li { width: 93px; > div.thumbnail a.thumbnail { width: 83px; height: 62px; } } div.content.browse.brands { .border_radius(3); > ul { background: none; > li { width: 52px; > div.thumbnail { padding: 3px; a.thumbnail { width: 42px; height: 42px; padding: 2px; } } li.active { background: @accent_colour; } } } } div.footer { div.info { float: none; } div.pagination { float: none; margin: 3px 0 0; } } } } /* List Numbers */ label.list_number { float: left; background: url('/images/transparent_backgrounds/black_15.png'); padding: 2px; width: 24px; height: 24px; display: block; .border_radius(99); b { display: block; font-weight: bold; font-size: 14px; color: @white; background: @accent_colour; height: 20px; width: 20px; line-height: 20px; text-align: center; .border_radius(99); .text_shadow(1, 1, 0px, (@accent_colour * 0.75 + @black * 0.25)); border: 2px solid @white; } } label.list_number.large { padding: 4px; width: 48px; height: 48px; .border_radius(99); position: relative; left: -10px; b { font-size: 28px; height: 40px; width: 40px; .border_radius(99); line-height: 40px; .text_shadow(2, 2, 0px, (@accent_colour * 0.75 + @black * 0.25)); border-width: 4px; } } /* Dashboard */ #dashboard_controller { #ads { span.filter.state { float: right; } } #sidebar { #shopping_style div.content { p.less { display: block; } p.more { display: none; } } #influences { div.header { padding-bottom: 0; ul.tabs { position: relative; top: 1px; z-index: 3; li { margin: 0 5px 0 0; a { border: none; background: url('/images/transparent_backgrounds/white_75.png'); :hover { color: @black; } } } li.active { a { background: @white; border: none; :hover { color: @black; } } } } } div.tab_content { overflow: hidden; padding: 0; > ul { padding: 10px 10px 0; max-height: 280px; min-height: 120px; overflow-y: scroll; .border_radius_bottom(3px); } } div.footer { form { p { margin: 0 0 5px; img.marker { float: right; margin: 5px 0 0 0; } span.invitee { line-height: 26px; padding: 3px 3px 0; font-size: 14px; small { color: @grey; font-size: 12px; } } } p.indent { margin-left: 36px; } p.submit { margin-top: 10px; } } } } } div.panel.full { > div.content { margin: 0; padding: 0; background: none; ul { li { width: 148px; div.thumbnail { img.marker.media_type { top: 90px; } a.thumbnail { width: 138px; height: 104px; } } } } } } #people { form { padding: 0 0 5px; input { width: 225px; float: left; margin: 0 5px 0 0; } a.button { height: 23px; line-height: 23px; width: 60px; padding: 0; text-align: center; } } } } /* Remove Pages Titles when Browsing */ #ads_controller, #brands_controller { #page_title { display: none; } } /* Brands > Show */ #brands_controller.show { #ads { div.filters { h3 { font-size: 16px; margin: 0; } span.show { float: right; } span.filter.dropdown.localisation { float: right; margin: 0 0 0 10px; } span.filter.state { float: right; margin: 0 0 0 10px; } } } } /* FAQ */ #pages_controller.faq { #answers { h3 { margin-top: 20px; padding-top: 20px; border-top: 1px solid (@light_grey * 0.75 + @white * 0.25); } h3.first { margin-top: 0; padding-top: 0; border: none; } } #questions { div.content { padding: 20px; ul { margin: 0; padding: 0; li { margin: 0 0 10px; list-style: none; display: block; padding: 0; a { font-size: 14px; } } li:last-child { margin: 0; } } } } } /* Person Overview */ #person_overview { padding: 20px 10px; position: relative; z-index: 25; #person { float: left; width: 620px; a.avatar { display: block; float: left; width: 60px; height: 60px; img { height: 100%; width: 100%; } } > div { margin: 0 0 0 75px; color: @white; font-size: 14px; .text_shadow(1, 1, 0, @bg * 0.66 + @black * 0.33); } div.name { h2 { margin: 0 0 5px; display: inline; a { font-size: 20px; font-weight: bold; .text_shadow(1, 1, 0, @bg * 0.66 + @black * 0.33); line-height: 1; color: @white; text-decoration: none; :hover { text-decoration: underline; } } a.button.small { font-size: 10px; :hover { text-decoration: none; } } } span.points { float: right; display: block; padding: 5px 10px; .border_radius(2); text-align: center; background: @white; position: relative; min-width: 45px; strong { color: @black; font-weight: bold; font-size: 24px; line-height: 1; display: block; .text_shadow(0, 0, 0, transparent); } label { font-size: 9px; text-transform: uppercase; color: @grey; display: block; .text_shadow(0, 0, 0, transparent); font-weight: bold; } } span.points.with_redeem { .border_radius_bottom(0); a.button { display: block; text-align: center; .border_radius_top(0); font-size: 10px; font-weight: bold; padding: 0; position: absolute; height: 18px; left: 0; right: 0; bottom: -19px; line-height: 18px; text-transform: uppercase; border: none; } } div.options { margin: 0; } } div.meta { color: @white * 0.66 + @bg * 0.33; span { color: @white; } label { color: @white * 0.66 + @bg * 0.33; } ul.networks { display: inline; margin: 0; padding: 0; li { display: inline; line-height: 1; img { position: relative; vertical-align: middle; top: -1px; } } } } div.extra { font-size: 12px; margin-top: 20px; margin-bottom: 20px; span.toggle { .text_shadow(1, 1, 0, @bg * 0.66 + @black * 0.33); a { font-size: 10px; font-weight: bold; text-transform: uppercase; text-decoration: none; color: @accent_colour; } b.arrow { display: inline-block; width: 0; height: 0; border: 5px solid transparent; position: relative; top: -2px; } } #less_info { span.toggle { b.arrow { border-top: 5px solid @accent_colour; border-bottom: 0; } } } #more_info { span.toggle { float: right; b.arrow { border-bottom: 5px solid @accent_colour; border-top: 0; } } h4 { color: @white; margin: 0 0 10px 0; border-bottom: 1px solid (@white * 0.25 + @bg * 0.75); .text_shadow(1, 1, 0, @bg * 0.66 + @black * 0.33); span { font-size: 12px; } } p { margin: 0 0 5px; label { display: block; float: left; width: 120px; color: @white * 0.66 + @bg * 0.33; } span { display: block; margin: 0 0 0 130px; } } p:last-child { margin: 0; } } } div.login { margin: 0 0 0 75px; a.button { font-weight: bold; } } } } /* Dashboard Nav */ #dashboard_nav { position: absolute; bottom: 0; left: 10px; margin: 0; padding: 0; overflow: hidden; li { display: block; float: left; margin: 0 5px 0 0; a { display: block; height: 28px; padding: 0 10px; line-height: 28px; .border_radius_top(2); text-decoration: none; color: @white; background: url('/images/transparent_backgrounds/accent_colour_30.png'); font-size: 14px; font-weight: bold; :hover { background: url('/images/transparent_backgrounds/accent_colour_45.png'); } } } li.active { a { background: @white; color: @black; :hover { color: @black; } } } } /* Dwellometer */ #dwellometer { z-index: 45; float: right; .box_shadow(0, 0, 0, transparent); margin: 0; div.content { text-align: center; position: relative; object, object embed { position: relative; z-index: 46; line-height: 0; } div.title { position: absolute; bottom: 10px; left: 0; right: 0; z-index: 50; img { width: 120px; display: block; margin: 0 auto; position: relative; left: -5px; } } } } /* Activity Stream */ #activity { div.content { ul.events { padding: 0; margin: 0 0 -10px; li { margin: 0; padding: 10px 0; border-bottom: 1px solid (@light_grey * 0.33 + @white * 0.66); list-style: none; overflow: hidden; small.meta { font-size: 12px; color: @light_grey; float: right; } a.button { float: right; margin: 0 0 10px 10px; } a.avatar, a.logo, a.thumbnail { height: 32px; display: block; float: left; img { width: 100%; height: 100%; } } a.avatar, a.logo, a.icon { width: 32px; } a.thumbnail { width: 42px; } div.symbols { float: left; overflow: hidden; b { display: block; float: left; margin: 10px 5px 0; img { height: 12px; width: 12px; } } b.voted { margin: 10px 3px 0; padding: 2px; .border_radius(2); } b.voted.for { background: @colour_positive * 0.33 + @white * 0.66; } b.voted.against { background: @colour_negative * 0.33 + @white * 0.66; } } /* Temporarily removed avatar and symbol */ /* div.symbols a.agent, b { display: none; }*/ div.description { font-size: 12px; color: @grey; a.agent { font-weight: bold; } } div.comment { margin-top: 2px; b.tail { display: block; margin: 0 0 0 10px; width: 0; height: 0; border: 5px solid transparent; border-top: none; border-bottom: 5px solid (@light_grey * 0.25 + @white * 0.75); } blockquote { margin: 0; font-style: normal; color: @dark_grey; .border_radius(3); background: @light_grey * 0.25 + @white * 0.75; padding: 5px 10px; span.view_comment { color: @grey; } } } div.content { overflow: hidden; } } li.new_comment.ad, li.endorsed.ad, li.voted { div.description, div.content { margin-left: 106px; } /* div.description, div.content { margin-left: 53px; }*/ } li.new_comment.brand, li.replied_to, li.endorsed.brand, li.connected, li.sn_setup { div.description, div.content { margin-left: 96px; } /* div.description, div.content { margin-left: 43px; }*/ } li.replied_to { div.content { a.thumbnail, a.logo { margin-top: 7px; } } } li.replied_to.ad { div.content { div.comment { margin-left: 52px; } } } li.replied_to.brand { div.content { div.comment { margin-left: 42px; } } } li.voted div.description span.action { .border_radius(2); color: @dark_grey; padding: 0 3px; white-space: nowrap; } li.voted.for div.description span.action { background: @colour_positive * 0.15 + @white * 0.85; } li.voted.against div.description span.action { background: @colour_negative * 0.15 + @white * 0.85; } li:first-child { padding-top: 0; } li:last-child { border-bottom: none; } li:hover div.content div.comment blockquote span.view_comment { } } } } /* Login/Register Modal */ #login_register { div.location_select, div.location_search { margin-left: 130px; } h3 { small { font-size: 14px; font-weight: normal; display: block; color: @grey; text-align: left; margin: 0; display: block; } } } /* Contact Form in Pages */ #pages_controller { #sidebar { #contact { margin: 15px 0 0; form { label { text-align: left; float: none; width: auto; font-size: 12px; font-weight: bold; line-height: 1; margin: 0 0 5px; } p.submit.indent { margin: 0; span.with_cancel { display: none; } } } } } } /* Exclusive Offers */ #offers { div.content { a.gift { display: block; text-align: center; img { height: 100px; } } } } div.browse { margin: 0 0 20px; &.class { padding: 0; } div.header { padding: 10px 10px 9px; text-align: left; background: @bg url('/images/panel_header_bg.png') repeat-x top left; border-bottom: 1px solid (@bg * 0.66 + @black * 0.33); line-height: 1; height: 18px; .border_radius_top(3); color: @light_grey; h3 { font-size: 16px; margin: 0; color: @white; .text_shadow(1, 1, 0, @bg * 0.66 + @black * 0.33); } span.filter { float: left; display: block; overflow: hidden; position: relative; z-index: 5; a { margin: 0 1px 0 0; display: block; float: left; padding: 0 8px; height: 18px; font-weight: bold; font-size: 10px; line-height: 18px; text-transform: uppercase; background: url('/images/transparent_backgrounds/black_50.png'); color: @light_grey; text-decoration: none; position: relative; z-index: 3; .active { background: @white; color: @black; z-index: 4; :hover { color: @black; } } :hover { color: @white; } :first-child { .border_radius_left(2); } :last-child { .border_radius_right(2); margin-right: 0; } } } span.filter.dropdown { margin: 0; position: relative; overflow: visible; a { .border_radius(2); background: @white; color: @black; margin: 0; position: relative; padding-right: 25px; img { float: left; margin: 4px 5px 0 0; } b.arrow { float: right; display: block; height: 0; width: 0; border: 5px solid transparent; border-top: 5px solid @black; border-bottom: none; position: absolute; top: 6px; right: 10px; } :hover { background: @accent_colour; color: @white; b.arrow { border-top: 5px solid @white; } } } ul { position: absolute; top: 100%; left: 0; margin: 1px 0 0; padding: 0; background: @white; .border_radius(2); .box_shadow(0, 1, 1, @black); li { list-style: none; display: block; padding: 0; margin: 0; a { display: block; height: 18px; line-height: 18px; color: @black; font-size: 10px; text-transform: uppercase; background: transparent; border-bottom: 1px solid (@light_grey * 0.66 + @white * 0.33); float: none; margin: 0; .border_radius(0); white-space: nowrap; :hover { background: url('/images/transparent_backgrounds/accent_colour_25.png'); color: @black; } } :last-child { a { border: none; } } } } } span.filter.dropdown.sort { float: left; margin: 0 0 0 10px; } span.filter.dropdown.localisation { float: left; margin: 0 0 0 10px; } a.more { float: right; color: @white; .text_shadow(1, 1, 0, @bg * 0.66 + @black * 0.33); font-size: 14px; font-weight: bold; position: relative; top: 2px; :hover { text-decoration: none; } } } > ul { margin: 0; background: @white; padding: 10px 0 0 10px; .border_radius(3); position: relative; li { display: block; float: left; list-style: none; margin: 0 10px 10px 0; padding: 5px; position: relative; background: @white; width: 130px; border: 1px solid (@light_grey * 0.33 + @white * 0.66); .border_radius(2); a.remove { position: absolute; height: 16px; width: 16px; padding: 3px; background: @accent_colour; .border_radius(99); display: none; z-index: 3; top: -8px; right: -8px; img { vertical-align: middle; } } div.thumbnail { .border_radius_top(3); position: relative; z-index: 3; .marker { position: absolute; padding: 2px; .border_radius(2); z-index: 3; background: url('/images/transparent_backgrounds/white_75.png'); height: 12px; width: 12px; } .marker.coupon { height: auto; width: auto; top: 10px; right: -3px; padding: 0; background: transparent; overflow: hidden; position: absolute; b { display: block; height: 0; width: 0; float: left; border: 14px solid transparent; border-top: 14px solid @accent_colour; border-bottom: none; border-right: none; float: left; } span { color: @white; font-size: 10px; font-weight: bold; text-transform: uppercase; height: 14px; line-height: 14px; display: block; padding: 0 4px 0 2px; background: @accent_colour; .text_shadow(1, 1, 0px, (@accent_colour * 0.75 + @black * 0.25)); margin: 0 0 0 14px; } } .marker.video { position: absolute; left: 50%; top: 50%; background: @white; width: 10px; height: 10px; b { display: block; width: 0; height: 0; border: 5px solid transparent; border-left: 10px solid @black; border-right: none; } } .marker.endorsed_by_me { background: none; padding: 0; right: 0; bottom: -32px; .border_radius(2); background: @white; } a.thumbnail { display: block; overflow: hidden; position: relative; text-align: center; img { position: relative; display: block; margin: auto; } } } div.text { margin: 3px 0 0; display: block; a { text-decoration: none; } a.title { display: block; text-decoration: none; font-weight: bold; font-size: 12px; line-height: 16px; white-space: nowrap; height: 16px; overflow: hidden; :before { display: block; height: 32px; width: 20px; content: " "; float: right; right: -15px; top: -8px; background: @white; position: relative; z-index: 1; .box_shadow(-5, 0, 10, @white); } } small { font-size: 11px; line-height: 13px; color: @grey; display: block; height: 13px; overflow: hidden; white-space: nowrap; a { font-weight: bold; } :before { display: block; height: 32px; width: 20px; content: " "; float: right; right: -15px; top: -8px; background: @white; position: relative; z-index: 1; .box_shadow(-5, 0, 10, @white); } } } :hover { background: @accent_colour; a.remove { display: block; } div.thumbnail { a.marker.remove, a.marker.video { b { display: inline-block; } } a.marker.video { .box_shadow(0, 0, 2, @black); } } div.text { a { color: @white; } a.title:before { background: @accent_colour; .box_shadow(-5, 0, 10, @accent_colour); } small { color: @white * 0.75 + @accent_colour * 0.25; :before { background: @accent_colour; .box_shadow(-5, 0, 10, @accent_colour); } } } div.footer a { color: @white; } } } > li.ad div.thumbnail a.thumbnail { width: 130px; height: 97px; img { width: 100%; height: 100%; } } > li.brand div.thumbnail a.thumbnail { width: 120px; height: 87px; padding: 5px; background: @white; .border_radius(2); img { max-width: 120px; max-height: 87px; } } li.paginate { margin-bottom: 0; a { display: block; position: relative; text-decoration: none; height: 131px; div.arrow { background: #81c153 url('/images/button_bg.png') repeat-x left top; border: 1px solid (@accent_colour * 0.75 + @black * 0.25); height: 44px; .border_radius(99); width: 44px; margin: 0 auto; position: relative; top: 32px; b { text-indent: -9000px; display: block; border: 10px solid transparent; width: 0; height: 0; position: relative; top: 12px; } } div.label { position: absolute; bottom: 5px; left: 0; right: 0; line-height: 13px; color: @accent_colour * 0.85 + @black * 0.15; text-decoration: none; font-weight: bold; font-size: 12px; text-align: center; } :hover { div.arrow { background: #abd56e url('/images/button_bg.png') repeat-x left -44px; } } } :hover { background: transparent; } } li.paginate.previous a div b { border-right: 15px solid @white; border-left: none; left: 12px; } li.paginate.next a div b { border-left: 15px solid @white; border-right: none; left: 16px; } } > div.footer { padding: 9px 10px 10px; background: @light_grey * 0.75 + @white * 0.25; overflow: hidden; border-top: 1px solid @light_grey; .border_radius_bottom(3); div.info { float: left; color: @grey; strong { color: @black; font-weight: normal; } } div.pagination { float: right; > * { display: inline-block; line-height: 1; padding: 0 6px; line-height: 18px; height: 18px; background: @white; .border_radius(3); text-decoration: none; font-weight: bold; font-size: 10px; text-transform: uppercase; } a { color: @grey; } a:hover { color: @black; } span.disabled { color: @light_grey; } span.current { color: @white; background: @bg; border: none; } span.current:hover { color: @white; } } } } div.browse.with_categories { margin: 0 0 0 160px; } div.browse.with_options > ul { .border_radius_top(0); } div.browse.with_footer > ul { .border_radius_bottom(0); } /* Browse List */ div.browse.list { > ul { margin: 0; min-height: 320px; padding: 10px 0 0 10px; overflow: hidden; > li { display: block; list-style: none; margin: 0 10px 10px 0; padding: 5px; .border_radius(3); position: relative; line-height: normal; .marker { position: absolute; padding: 2px; .border_radius(2); background: url('/images/transparent_backgrounds/white_75.png'); img { height: 12px; width: 12px; } } img.marker { height: 12px; width: 12px; } span.marker.new { color: black; left: -5px; top: -5px; background: none; background-color: @white * 0.1 + @yellow * 0.6 + @red * 0.3; line-height: 1; padding: 2px 5px; font-weight: bold; } a.marker.media_type { display: inline-block; text-decoration: none; top: 39px; left: 8px; font-size: 10px; b { font-weight: normal; margin: 0 0 0 2px; line-height: 1; display: none; } img { vertical-align: middle; } } a.thumbnail { float: left; width: 68px; display: block; overflow: hidden; border: 1px solid @light_grey; :hover { border-color: @accent_colour; } } span.title_brand { display: block; margin: 0 0 2px 75px; a { margin: 0; display: inline; } a.brand_name { font-weight: normal; font-size: 12px; } } a.ad_title { font-weight: bold; font-size: 14px; margin: 0 0 0 75px; display: block; } a.brand_name { font-weight: bold; font-size: 14px; margin: 0 0 0 75px; display: block; } small { display: block; color: @grey; margin: 0 0 0 75px; font-size: 12px; } small.brand_name { display: inline; margin: 0; } ul.chart { margin: 0 0 0 80px; height: 39px; } ul.networks { margin: 3px 0 0 75px; padding: 0; overflow: hidden; li { display: block; float: left; margin: 0 5px 0 0; line-height: 1; } } div.points { display: none; font-size: 12px; text-align: right; label { color: @grey; } } a.remove { bottom: -3px; right: -3px; } } li.ad { a.thumbnail { height: 51px; } span.title_brand { small.brand_name { display: block; } } } li.brand { a.thumbnail { height: 68px; } } } } div.browse.list.with_options ul { .border_radius_top(0); } div.browse.list.with_footer ul { .border_radius_bottom(0); } div.browse.list.cols_2 { > ul { > li { width: 285px; float: left; :hover { background: @white; } } } } div.browse.ads.list { > ul { > li { height: 53px; a.thumbnail { height: 51px; } } } } div.browse.brands.list { > ul { > li { height: 68px; a.thumbnail { height: 66px; } } } } /* Categories List */ #categories { margin: 40px 0 0; width: 160px; float: left; position: relative; z-index: 1; ul { margin: 0; padding: 10px 0 0; li { list-style: none; margin: 0; padding: 0; font-size: 14px; a { color: @grey; display: block; padding: 5px 10px 5px 15px; text-decoration: none; .border_radius_left(3); } a:hover { color: @black; background: @light_grey * 0.15 + @white * 0.85; } } .all a { font-weight: bold; } .current a { background: @white; color: @black; border: 1px solid (@light_grey * 0.25 + @white * 0.75); border-right: none; border-left: 5px solid @bg; padding-left: 10px; } } } /* Ads > Show */ #ad { div.header { overflow: hidden; h3 { font-size: 16px; margin: 0 0 3px; } small { a.category { font-weight: bold; color: @accent_colour; } span.networks img { position: relative; top: 3px; } } span.brand { float: right; color: @white; a.brand_name { font-weight: bold; color: @accent_colour; } } } div.content { padding: 0; position: relative; a.toggle_size { display: block; .border_radius(3); background-color: @black; padding: 0 5px 0 26px; background-position: 5px center; background-repeat: no-repeat; text-decoration: none; margin: 5px 5px 0 0; position: absolute; top: 0; right: 0; line-height: 25px; z-index: 45; } img.creative { margin: 0 auto; max-width: 540px; display: block; } object { position: relative; z-index: 44; } object.video { line-height: 0; font-size: 0; } object embed { position: relative; z-index: 45; line-height: 0; font-size: 0; } } div.content.not_video { padding: 40px; text-align: center; * { margin-left: auto; margin-right: auto; } object.flash { margin-bottom: 0; } } div.footer { padding: 0; div.vote_views { padding: 5px 10px; overflow: hidden; div.share { float: right; margin: 2px 0 0 0; } #login_register_msg, #encourage_vote_msg { line-height: 22px; font-weight: bold; color: @black; } } } } #sidebar { #meta { table { margin: 0; tr:last-child td { padding-bottom: 0; } td { padding: 0 0 5px; ul.networks { margin: 0; padding: 0; li { list-style: none; display: inline; } li { } } } td.label { color: @grey; white-space: nowrap; width: 1%; text-align: right; padding-right: 5px; } } } } /* Voting */ div.voted { font-size: 12px; line-height: 22px; color: @black; display: inline-block; font-weight: bold; img { float: left; margin-right: 5px; padding: 3px; .border_radius(3); } } #voted_up { img { background: @colour_positive * 0.66 + @bg * 0.15; } } #voted_down { img { background: @colour_negative * 0.66 + @bg * 0.15; } } #encourage_comment { display: inline-block; line-height: 22px; font-weight: bold; } #vote { overflow: hidden; font-size: 12px; line-height: 22px; color: @black; float: left; a { color: @white; font-weight: bold; overflow: hidden; display: block; width: 16px; text-decoration: none; text-align: center; font-size: 10px; padding: 3px; text-transform: uppercase; } a.up { float: left; background: @colour_positive * 0.66 + @bg * 0.15; .border_radius_left(3); :hover { background: @colour_positive * 0.85 + @bg * 0.15; } } a.down { float: left; background: @colour_negative * 0.66 + @bg * 0.15; .border_radius_right(3); margin: 0 5px 0 1px; :hover { background: @colour_negative * 0.85 + @bg * 0.15; } } } #vote.disabled { a.up { background: (@colour_positive * 0.66 + @bg * 0.15) * 0.15 + @grey * 0.85; :hover { background: (@colour_positive * 0.85 + @bg * 0.15) * 0.25 + @grey * 0.75; } } a.down { background: (@colour_negative * 0.66 + @bg * 0.15) * 0.15 + @grey * 0.85; :hover { background: (@colour_negative * 0.85 + @bg * 0.15) * 0.25 + @grey * 0.75; } } } #sidebar { #ads > ul li, #recommendations > ul li { width: 81px; div.thumbnail { a.thumbnail { height: 60px; width: 81px; } } div.text { a.title { font-size: 11px; height: 14px; line-height: 14px; } small { display: none; } } } #brands > ul li { width: 55px; div.thumbnail { a.thumbnail { height: 45px; width: 45px; img { max-height: 45px; max-width: 45px; } } } div.text { display: none; } } } /* My Account */ #accounts_controller { #top { #page_title { #page_options { a.button.public_profile { float: right; font-size: 16px; line-height: 1; height: auto; padding: 8px 35px 8px 15px; position: relative; b.arrow { display: block; height: 0; width: 0; position: absolute; top: 10px; right: 15px; border: 6px solid transparent; border-right: none; border-left: 6px solid @white; margin: 0; } } a.button.goto_dashboard { float: right; font-size: 16px; line-height: 1; height: auto; padding: 8px 15px 8px 35px; margin-right: 5px; position: relative; b.arrow { display: block; height: 0; width: 0; position: absolute; top: 10px; left: 15px; border: 6px solid transparent; border-left: none; border-right: 6px solid @white; margin: 0; } } } } } #account_nav { float: left; width: 200px; margin: 0 20px 0 0; ul.nav { margin: 0; padding: 0; li { margin: 0 0 5px; display: block; list-style: none; padding: 0; a { display: block; height: 30px; text-decoration: none; color: @white; b { border: 15px solid transparent; border-right: none; border-left: 10px solid transparent; width: 0; height: 0; float: right; display: none; } span { .border_radius(3); background: @bg; display: block; line-height: 30px; padding: 0 10px; font-size: 14px; font-weight: bold; margin: 0 10px 0 0; } } :hover { a { color: @white; b { border-left-color: @bg; display: block; } span { background: @bg; .border_radius_right(0); } } } } li.current a { b { border-left-color: @accent_colour; display: block; } span { background: @accent_colour; color: @white; .border_radius_right(0); } } } } #main { > div { margin: 0 0 20px; form { margin: 0; } } #profile { a.avatar { float: left; display: block; width: 70px; overflow: hidden; position: relative; text-decoration: none; img { width: 100%; } span { display: block; line-height: 1; padding: 3px; margin: 5px 0 0; color: @white; background: @accent_colour; .border_radius(3); .text_shadow(1, 1, 0, @grey); text-align: center; font-size: 10px; font-weight: bold; text-transform: uppercase; } } form { margin: 0 0 0 90px; h4 { margin: 10px 0 20px; border-bottom: 1px solid (@light_grey * 0.5 + @white * 0.5); padding: 0; color: @bg; font-size: 16px; } ul.choices { li { width: 30%; } } div.extra { margin-top: 20px; } } } #networks { ul { margin: 0 -10px -10px 0; padding: 0; overflow: hidden; li:hover { background: @light_grey; display: block; float: left; width: 180px; padding: 10px; margin: 0 10px 10px 0; list-style: none; .border_radius(3); position: relative; * { line-height: normal; } img { vertical-align: middle; float: left; } .name { font-weight: bold; font-size: 14px; display: block; margin: -2px 0 0 42px; } small { font-size: 12px; color: @grey; display: block; margin-left: 42px; strong { color: @black; font-weight: normal; } } :hover { } } li.installed { background: @white; border: 2px solid @accent_colour; padding: 8px; } li.unavailable { .name { color: @black; } :hover { background: @light_grey; } } li:hover { background: @light_grey * 0.5 + @white * 0.5; } } } } } /* Shopping Style Panel */ #shopping_style { div.header a.button.small { float: right; } div.content { p { margin: 0 0 10px; label { text-transform: uppercase; font-size: 11px; display: block; color: @bg; font-weight: bold; } span { color: @black; } span.toggle { white-space: nowrap; color: @grey; } :last-child { margin: 0; } } p.more { text-align: left; font-weight: normal; } p.less { display: none; margin: 0; } } } /* People Controller */ #people_controller.index { #main { div.panel { float: left; width: 300px; margin: 0 20px 0 0; :last-child { margin-right: 0; } } } } #people_controller.show { #person_overview, #shopping_style { a.button.small { } } #content { #shopping_style { float: left; width: 240px; margin: 0 20px 0 0; } #main { width: 360px; } } } /* Search Results */ #search_results { margin: 0 0 20px; li { :hover { small { color: @white * 0.75 + @accent_colour * 0.25; } } } } #search { div.content { padding: 20px; form { margin: 0; float: none; span.submit_and_options { display: block; } } p { margin: 0 0 15px; } h4 { font-weight: normal; margin: 0 0 5px; } } } /* Recommendations */ #recommendations { div.browse { margin: 0; padding: 0; background: none; ul { min-height: 0; .border_radius(0); } } } /* Blank States */ div.blank { padding: 20px; background: @bg * 0.05 + @blue * 0.05 + @white * 0.9; position: relative; border: 1px solid (@bg * 0.1 + @blue * 0.1 + @white * 0.8); z-index: 1; h4 { font-size: 18px; margin: 0 0 10px; } h4:last-child { margin: 0; } p { font-size: 16px; margin: 0 0 10px; } p:last-child { margin: 0; } p.with_list_number.large { span { margin-left: 48px; display: block; color: @white; } } p.earn span { font-size: 22px; color: @white; line-height: 48px; font-weight: bold; } a { white-space: nowrap; } a.hide { position: absolute; top: -5px; right: -5px; display: block; height: 16px; width: 16px; padding: 3px; background: #E7E9F6; .border_radius(99); } } div.blank.small { padding: 10px 20px; h4 { font-weight: normal; font-size: 16px; } p { margin: 0; } } div.blank.tiny { padding: 10px 20px; h4 { font-weight: normal; font-size: 14px; } p { margin: 0; font-size: 12px; } } div.blank.rounded { .border_radius(3); margin: 0 0 20px; } div.blank.rounded.bottom { .border_radius_top(0); } div.blank.with_border_bottom { border-bottom: 1px solid (@bg * 0.1 + @blue * 0.1 + @white * 0.8); } div.blank.no_border_top { border-top: none; } div.blank.no_border_bottom { border-bottom: none; } div.blank.no_side_borders { border-right: none; border-left: none; } div.panel { div.blank { padding: 10px 20px; overflow: hidden; margin: 0; h4 { font-weight: normal; font-size: 14px; } p, ul { margin: 0 0 10px; font-size: 12px; } p:last-child, ul:last-child { margin: 0; } } } #yelow { #short { color: #fea; } #long { color: #ffeeaa; } #rgba { color: rgba(255, 238, 170, 0.1); } } #blue { #short { color: #00f; } #long { color: #0000ff; } #rgba { color: rgba(0, 0, 255, 0.1); } } #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); } #808080 { color: hsl(50, 0%, 50%); } #00ff00 { color: hsl(120, 100%, 50%); } /******************\ * * * 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 */ 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; } */ #last { color: blue } // .comma-delimited { background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg); 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; } @font-face { font-family: Headline; src: local(Futura-Medium), url(fonts.svg#MyGeometricModern) format("svg"); } .other { -moz-transform: translate(0, 11em) rotate(-90deg); } 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; } @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'; src: url("/fonts/garamond-pro.ttf"); } 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; margin: 1px 0; padding: 0 auto; background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px; } #more-shorthands { margin: 0; padding: 1px 0 2px 0; font: normal small/20px 'Trebuchet MS', Verdana, sans-serif; } .misc { -moz-border-radius: 2px; display: -moz-inline-stack; width: .1em; background-color: #009998; background-image: url(images/image.jpg); background: -webkit-gradient(linear, left top, left bottom, from(red), to(blue)); margin: ; } #important { color: red !important; width: 100%!important; height: 20px ! important; } #functions { @var: 10; color: color("red"); width: increment(15); height: undefined("self"); border-width: add(2, 3); variable: increment(@var); } #built-in { @r: 32; escaped: e("-Some::weird(#thing, y)"); lighten: lighten(#ff0000, 50%); darken: darken(#ff0000, 50%); saturate: saturate(#29332f, 20%); desaturate: desaturate(#203c31, 20%); greyscale: greyscale(#203c31); format: %("rgb(%d, %d, %d)", @r, 128, 64); format-string: %("hello %s", "world"); eformat: e(%("rgb(%d, %d, %d)", @r, 128, 64)); } @var: @a; @a: 100%; .lazy-eval { width: @var; } .mixin (@a: 1px, @b: 50%) { width: @a * 5; height: @b - 1%; } .mixina (@style, @width, @color: black) { border: @width @style @color; } .mixiny (@a: 0, @b: 0) { margin: @a; padding: @b; } .hidden() { color: transparent; } .two-args { color: blue; .mixin(2px, 100%); .mixina(dotted, 2px); } .one-arg { .mixin(3px); } .no-parens { .mixin; } .no-args { .mixin(); } .var-args { @var: 9; .mixin(@var, @var * 2); } .multi-mix { .mixin(2px, 30%); .mixiny(4, 5); } .maxa(@arg1: 10, @arg2: #f00) { padding: @arg1 * 2px; color: @arg2; } body { .maxa(15); } @glob: 5; .global-mixin(@a:2) { width: @glob + @a; } .scope-mix { .global-mixin(3); } .nested-ruleset (@width: 200px) { width: @width; .column { margin: @width; } } .content { .nested-ruleset(600px); } // .same-var-name2(@radius) { radius: @radius; } .same-var-name(@radius) { .same-var-name2(@radius); } #same-var-name { .same-var-name(5px); } // .var-inside () { @var: 10px; width: @var; } #var-inside { .var-inside; } .mix-inner (@var) { border-width: @var; } .mix (@a: 10) { .inner { height: @a * 10; .innest { width: @a; .mix-inner(@a * 2); } } } .class { .mix(30); } .mixin () { zero: 0; } .mixin (@a: 1px) { one: 1; } .mixin (@a) { one-req: 1; } .mixin (@a: 1px, @b: 2px) { two: 2; } .mixin (@a, @b, @c) { three-req: 3; } .mixin (@a: 1px, @b: 2px, @c: 3px) { three: 3; } .zero { .mixin(); } .one { .mixin(1); } .two { .mixin(1, 2); } .three { .mixin(1, 2, 3); } // .mixout ('left') { left: 1; } .mixout ('right') { right: 1; } .left { .mixout('left'); } .right { .mixout('right'); } // .border (@side, @width) { color: black; .border-side(@side, @width); } .border-side (left, @w) { border-left: @w; } .border-side (right, @w) { border-right: @w; } .border-right { .border(right, 4px); } .border-left { .border(left, 4px); } // .border-radius (@r) { both: @r * 10; } .border-radius (@r, left) { left: @r; } .border-radius (@r, right) { right: @r; } .only-right { .border-radius(33, right); } .only-left { .border-radius(33, left); } .left-right { .border-radius(33); } .mixin { border: 1px solid black; } .mixout { border-color: orange; } .borders { border-style: dashed; } #namespace { .borders { border-style: dotted; } .biohazard { content: "death"; .man { color: transparent; } } } #theme { > .mixin { background-color: grey; } } #container { color: black; .mixin; .mixout; #theme > .mixin; } #header { .milk { color: white; .mixin; #theme > .mixin; } #cookie { .chips { #namespace .borders; .calories { #container; } } .borders; } } .secure-zone { #namespace .biohazard .man; } .direct { #namespace > .borders; } #operations { color: #110000 + #000011 + #001100; // #111111 height: 10px / 2px + 6px - 1px * 2; // 9px width: 2 * 4 - 5em; // 3em .spacing { height: 10px / 2px+6px-1px*2; width: 2 * 4-5em; } substraction: 20 - 10 - 5 - 5; // 0 division: 20 / 5 / 4; // 1 } @x: 4; @y: 12em; .with-variables { height: @x + @y; // 16em width: 12 + @y; // 24em size: 5cm - @x; // 1cm } @z: -2; .negative { height: 2px + @z; // 0px width: 2px - @z; // 4px } .shorthands { padding: -1px 2px 0 -4px; // } .colors { color: #123; // #112233 border-color: #234 + #111111; // #334455 background-color: #222222 - #fff; // #000000 .other { color: 2 * #111; // #222222 border-color: #333333 / 3 + #111; // #222222 } } .parens { @var: 1px; border: (@var * 2) solid black; margin: (@var * 1) (@var + 2) (4 * 4) 3; width: (6 * 6); padding: 2px (6px * 6px); } .more-parens { @var: (2 * 2); padding: (2 * @var) 4 4 (@var * 1px); width: (@var * @var) * 6; height: (7 * 7) + (8 * 8); margin: 4 * (5 + 5) / 2 - (@var * 2); //margin: (6 * 6)px; } .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: (2px + 4px) 1em 2px 2; } #first > .one { > #second .two > #deux { width: 50%; #third { &:focus { color: black; #fifth { > #sixth { .seventh #eighth { + #ninth { color: purple; } } } } } height: 100%; } #fourth, #five, #six { color: #110000; .seven, .eight > #nine { border: 1px solid black; } #ten { color: red; } } } font-size: 2em; } @x: blue; @z: transparent; @mix: none; .mixin { @mix: #989; } .tiny-scope { color: @mix; // #989 .mixin; } .scope1 { @y: orange; @z: black; color: @x; // blue border-color: @z; // black .hidden { @x: #131313; } .scope2 { @y: red; color: @x; // blue .scope3 { @local: white; color: @y; // red border-color: @z; // black background-color: @local; // white } } }h1, h2, h3 { a, 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; } #strings { background-image: url("http://son-of-a-banana.com"); quotes: "~" "~"; content: "#*%:&^,)!.(~*})"; empty: ""; brackets: "{" "}"; } #comments { content: "/* hello */ // not-so-secret"; } #single-quote { quotes: "'" "'"; content: '""#!&""'; empty: ''; } @a: 2; @x: @a * @a; @y: @x + 1; @z: @x * 2 + @y; .variables { width: @z + 1cm; // 14cm } @b: @a * 10; @c: #888; @fonts: "Trebuchet MS", Verdana, sans-serif; @f: @fonts; @quotes: "~" "~"; @q: @quotes; .variables { height: @b + @x + 0px; // 24px color: @c; font-family: @f; quotes: @q; } .redefinition { @var: 4; @var: 2; @var: 3; three: @var; } .values { @a: 'Trebuchet'; font-family: @a, @a, @a; } .whitespace { color: white; } .whitespace { color: white; } .whitespace { color: white; } .whitespace{color:white;} .whitespace { color : white ; } .white, .space, .mania { color: white; } .no-semi-column { color: white } .no-semi-column { color: white; white-space: pre } .no-semi-column {border: 2px solid white} .newlines { background: the, great, wall; border: 2px solid black; } .empty { } #yelow { #short { color: #fea; } #long { color: #ffeeaa; } #rgba { color: rgba(255, 238, 170, 0.1); } } #blue { #short { color: #00f; } #long { color: #0000ff; } #rgba { color: rgba(0, 0, 255, 0.1); } } #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); } #808080 { color: hsl(50, 0%, 50%); } #00ff00 { color: hsl(120, 100%, 50%); } /******************\ * * * 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 */ 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; } */ #last { color: blue } // .comma-delimited { background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg); 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; } @font-face { font-family: Headline; src: local(Futura-Medium), url(fonts.svg#MyGeometricModern) format("svg"); } .other { -moz-transform: translate(0, 11em) rotate(-90deg); } 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; } @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'; src: url("/fonts/garamond-pro.ttf"); } 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; margin: 1px 0; padding: 0 auto; background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px; } #more-shorthands { margin: 0; padding: 1px 0 2px 0; font: normal small/20px 'Trebuchet MS', Verdana, sans-serif; } .misc { -moz-border-radius: 2px; display: -moz-inline-stack; width: .1em; background-color: #009998; background-image: url(images/image.jpg); background: -webkit-gradient(linear, left top, left bottom, from(red), to(blue)); margin: ; } #important { color: red !important; width: 100%!important; height: 20px ! important; } #functions { @var: 10; color: color("red"); width: increment(15); height: undefined("self"); border-width: add(2, 3); variable: increment(@var); } #built-in { @r: 32; escaped: e("-Some::weird(#thing, y)"); lighten: lighten(#ff0000, 50%); darken: darken(#ff0000, 50%); saturate: saturate(#29332f, 20%); desaturate: desaturate(#203c31, 20%); greyscale: greyscale(#203c31); format: %("rgb(%d, %d, %d)", @r, 128, 64); format-string: %("hello %s", "world"); eformat: e(%("rgb(%d, %d, %d)", @r, 128, 64)); } @var: @a; @a: 100%; .lazy-eval { width: @var; } .mixin (@a: 1px, @b: 50%) { width: @a * 5; height: @b - 1%; } .mixina (@style, @width, @color: black) { border: @width @style @color; } .mixiny (@a: 0, @b: 0) { margin: @a; padding: @b; } .hidden() { color: transparent; } .two-args { color: blue; .mixin(2px, 100%); .mixina(dotted, 2px); } .one-arg { .mixin(3px); } .no-parens { .mixin; } .no-args { .mixin(); } .var-args { @var: 9; .mixin(@var, @var * 2); } .multi-mix { .mixin(2px, 30%); .mixiny(4, 5); } .maxa(@arg1: 10, @arg2: #f00) { padding: @arg1 * 2px; color: @arg2; } body { .maxa(15); } @glob: 5; .global-mixin(@a:2) { width: @glob + @a; } .scope-mix { .global-mixin(3); } .nested-ruleset (@width: 200px) { width: @width; .column { margin: @width; } } .content { .nested-ruleset(600px); } // .same-var-name2(@radius) { radius: @radius; } .same-var-name(@radius) { .same-var-name2(@radius); } #same-var-name { .same-var-name(5px); } // .var-inside () { @var: 10px; width: @var; } #var-inside { .var-inside; } .mix-inner (@var) { border-width: @var; } .mix (@a: 10) { .inner { height: @a * 10; .innest { width: @a; .mix-inner(@a * 2); } } } .class { .mix(30); } .mixin () { zero: 0; } .mixin (@a: 1px) { one: 1; } .mixin (@a) { one-req: 1; } .mixin (@a: 1px, @b: 2px) { two: 2; } .mixin (@a, @b, @c) { three-req: 3; } .mixin (@a: 1px, @b: 2px, @c: 3px) { three: 3; } .zero { .mixin(); } .one { .mixin(1); } .two { .mixin(1, 2); } .three { .mixin(1, 2, 3); } // .mixout ('left') { left: 1; } .mixout ('right') { right: 1; } .left { .mixout('left'); } .right { .mixout('right'); } // .border (@side, @width) { color: black; .border-side(@side, @width); } .border-side (left, @w) { border-left: @w; } .border-side (right, @w) { border-right: @w; } .border-right { .border(right, 4px); } .border-left { .border(left, 4px); } // .border-radius (@r) { both: @r * 10; } .border-radius (@r, left) { left: @r; } .border-radius (@r, right) { right: @r; } .only-right { .border-radius(33, right); } .only-left { .border-radius(33, left); } .left-right { .border-radius(33); } .mixin { border: 1px solid black; } .mixout { border-color: orange; } .borders { border-style: dashed; } #namespace { .borders { border-style: dotted; } .biohazard { content: "death"; .man { color: transparent; } } } #theme { > .mixin { background-color: grey; } } #container { color: black; .mixin; .mixout; #theme > .mixin; } #header { .milk { color: white; .mixin; #theme > .mixin; } #cookie { .chips { #namespace .borders; .calories { #container; } } .borders; } } .secure-zone { #namespace .biohazard .man; } .direct { #namespace > .borders; } #operations { color: #110000 + #000011 + #001100; // #111111 height: 10px / 2px + 6px - 1px * 2; // 9px width: 2 * 4 - 5em; // 3em .spacing { height: 10px / 2px+6px-1px*2; width: 2 * 4-5em; } substraction: 20 - 10 - 5 - 5; // 0 division: 20 / 5 / 4; // 1 } @x: 4; @y: 12em; .with-variables { height: @x + @y; // 16em width: 12 + @y; // 24em size: 5cm - @x; // 1cm } @z: -2; .negative { height: 2px + @z; // 0px width: 2px - @z; // 4px } .shorthands { padding: -1px 2px 0 -4px; // } .colors { color: #123; // #112233 border-color: #234 + #111111; // #334455 background-color: #222222 - #fff; // #000000 .other { color: 2 * #111; // #222222 border-color: #333333 / 3 + #111; // #222222 } } .parens { @var: 1px; border: (@var * 2) solid black; margin: (@var * 1) (@var + 2) (4 * 4) 3; width: (6 * 6); padding: 2px (6px * 6px); } .more-parens { @var: (2 * 2); padding: (2 * @var) 4 4 (@var * 1px); width: (@var * @var) * 6; height: (7 * 7) + (8 * 8); margin: 4 * (5 + 5) / 2 - (@var * 2); //margin: (6 * 6)px; } .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: (2px + 4px) 1em 2px 2; } #first > .one { > #second .two > #deux { width: 50%; #third { &:focus { color: black; #fifth { > #sixth { .seventh #eighth { + #ninth { color: purple; } } } } } height: 100%; } #fourth, #five, #six { color: #110000; .seven, .eight > #nine { border: 1px solid black; } #ten { color: red; } } } font-size: 2em; } @x: blue; @z: transparent; @mix: none; .mixin { @mix: #989; } .tiny-scope { color: @mix; // #989 .mixin; } .scope1 { @y: orange; @z: black; color: @x; // blue border-color: @z; // black .hidden { @x: #131313; } .scope2 { @y: red; color: @x; // blue .scope3 { @local: white; color: @y; // red border-color: @z; // black background-color: @local; // white } } }h1, h2, h3 { a, 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; } #strings { background-image: url("http://son-of-a-banana.com"); quotes: "~" "~"; content: "#*%:&^,)!.(~*})"; empty: ""; brackets: "{" "}"; } #comments { content: "/* hello */ // not-so-secret"; } #single-quote { quotes: "'" "'"; content: '""#!&""'; empty: ''; } @a: 2; @x: @a * @a; @y: @x + 1; @z: @x * 2 + @y; .variables { width: @z + 1cm; // 14cm } @b: @a * 10; @c: #888; @fonts: "Trebuchet MS", Verdana, sans-serif; @f: @fonts; @quotes: "~" "~"; @q: @quotes; .variables { height: @b + @x + 0px; // 24px color: @c; font-family: @f; quotes: @q; } .redefinition { @var: 4; @var: 2; @var: 3; three: @var; } .values { @a: 'Trebuchet'; font-family: @a, @a, @a; } .whitespace { color: white; } .whitespace { color: white; } .whitespace { color: white; } .whitespace{color:white;} .whitespace { color : white ; } .white, .space, .mania { color: white; } .no-semi-column { color: white } .no-semi-column { color: white; white-space: pre } .no-semi-column {border: 2px solid white} .newlines { background: the, great, wall; border: 2px solid black; } .empty { } #yelow { #short { color: #fea; } #long { color: #ffeeaa; } #rgba { color: rgba(255, 238, 170, 0.1); } } #blue { #short { color: #00f; } #long { color: #0000ff; } #rgba { color: rgba(0, 0, 255, 0.1); } } #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); } #808080 { color: hsl(50, 0%, 50%); } #00ff00 { color: hsl(120, 100%, 50%); } /******************\ * * * 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 */ 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; } */ #last { color: blue } // .comma-delimited { background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg); 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; } @font-face { font-family: Headline; src: local(Futura-Medium), url(fonts.svg#MyGeometricModern) format("svg"); } .other { -moz-transform: translate(0, 11em) rotate(-90deg); } 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; } @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'; src: url("/fonts/garamond-pro.ttf"); } 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; margin: 1px 0; padding: 0 auto; background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px; } #more-shorthands { margin: 0; padding: 1px 0 2px 0; font: normal small/20px 'Trebuchet MS', Verdana, sans-serif; } .misc { -moz-border-radius: 2px; display: -moz-inline-stack; width: .1em; background-color: #009998; background-image: url(images/image.jpg); background: -webkit-gradient(linear, left top, left bottom, from(red), to(blue)); margin: ; } #important { color: red !important; width: 100%!important; height: 20px ! important; } #functions { @var: 10; color: color("red"); width: increment(15); height: undefined("self"); border-width: add(2, 3); variable: increment(@var); } #built-in { @r: 32; escaped: e("-Some::weird(#thing, y)"); lighten: lighten(#ff0000, 50%); darken: darken(#ff0000, 50%); saturate: saturate(#29332f, 20%); desaturate: desaturate(#203c31, 20%); greyscale: greyscale(#203c31); format: %("rgb(%d, %d, %d)", @r, 128, 64); format-string: %("hello %s", "world"); eformat: e(%("rgb(%d, %d, %d)", @r, 128, 64)); } @var: @a; @a: 100%; .lazy-eval { width: @var; } .mixin (@a: 1px, @b: 50%) { width: @a * 5; height: @b - 1%; } .mixina (@style, @width, @color: black) { border: @width @style @color; } .mixiny (@a: 0, @b: 0) { margin: @a; padding: @b; } .hidden() { color: transparent; } .two-args { color: blue; .mixin(2px, 100%); .mixina(dotted, 2px); } .one-arg { .mixin(3px); } .no-parens { .mixin; } .no-args { .mixin(); } .var-args { @var: 9; .mixin(@var, @var * 2); } .multi-mix { .mixin(2px, 30%); .mixiny(4, 5); } .maxa(@arg1: 10, @arg2: #f00) { padding: @arg1 * 2px; color: @arg2; } body { .maxa(15); } @glob: 5; .global-mixin(@a:2) { width: @glob + @a; } .scope-mix { .global-mixin(3); } .nested-ruleset (@width: 200px) { width: @width; .column { margin: @width; } } .content { .nested-ruleset(600px); } // .same-var-name2(@radius) { radius: @radius; } .same-var-name(@radius) { .same-var-name2(@radius); } #same-var-name { .same-var-name(5px); } // .var-inside () { @var: 10px; width: @var; } #var-inside { .var-inside; } .mix-inner (@var) { border-width: @var; } .mix (@a: 10) { .inner { height: @a * 10; .innest { width: @a; .mix-inner(@a * 2); } } } .class { .mix(30); } .mixin () { zero: 0; } .mixin (@a: 1px) { one: 1; } .mixin (@a) { one-req: 1; } .mixin (@a: 1px, @b: 2px) { two: 2; } .mixin (@a, @b, @c) { three-req: 3; } .mixin (@a: 1px, @b: 2px, @c: 3px) { three: 3; } .zero { .mixin(); } .one { .mixin(1); } .two { .mixin(1, 2); } .three { .mixin(1, 2, 3); } // .mixout ('left') { left: 1; }v1.6.3~dfsg/CONTRIBUTING.md0000644000000000000000000000677312275460205013722 0ustar rootroot# Contributing to Less.js > We welcome feature requests and bug reports. Please read these guidelines before submitting one. **Words that begin with the at sign (`@`) must be wrapped in backticks!** . As a courtesy to avoid sending notifications to any user that might have the `@username` being referenced, please remember that GitHub usernames also start with the at sign. If you don't wrap them in backticks, users will get unintended notifications from you. GitHub has other great markdown features as well, [go here to learn more about them](https://help.github.com/articles/github-flavored-markdown). ## Reporting Issues We only accept issues that are bug reports or feature requests. Bugs must be isolated and reproducible problems that we can fix within the Less.js core. Please read the following guidelines before opening any issue. 1. **Search for existing issues.** We get a lot of duplicate issues, and you'd help us out a lot by first checking if someone else has reported the same issue. Moreover, the issue may have already been resolved with a fix available. 2. **Create an isolated and reproducible test case.** Be sure the problem exists in Less.js's code with [reduced test cases](http://css-tricks.com/reduced-test-cases/) that should be included in each bug report. 3. **Test with the latest version**. We get a lot of issues that could be resolved by updating your version of Less.js. 3. **Include a live example.** Please use [less2css.org](http://less2css.org/) for sharing your isolated test cases. 4. **Share as much information as possible.** Include operating system and version. Describe how you use Less. If you use it in the browser, please include browser and version, and the version of Less.js you're using. Let us know if you're using the command line (`lessc`) or an external tool. And try to include steps to reproduce the bug. 5. If you have a solution or suggestion for how to fix the bug you're reporting, please include it, or make a pull request - don't assume the maintainers know how to fix it just because you do. Please report documentation issues in [the documentation project](https://github.com/less/less-docs). ## Feature Requests * Please search for existing feature requests first to see if something similar already exists. * Include a clear and specific use-case. We love new ideas, but we do not add language features without a reason. * Consider whether or not your language feature would be better as a function or implemented in a 3rd-party build system such as [assemble-less](http://github.com/assemble/assemble-less). ## Pull Requests _Pull requests are encouraged!_ * Start by adding a feature request to get feedback and see how your idea is received. * If your pull request solves an existing issue, but it's different in some way, _please create a new issue_ and make sure to discuss it with the core contributors. Otherwise you risk your hard work being rejected. * Do not change the **./dist/** folder, we do this when releasing * _Please add tests_ for your work. Tests are invoked using `grunt test` command. It will run both node.js tests and browser ([PhantomJS](http://phantomjs.org/)) tests. ### Coding Standards * Always use spaces, never tabs * End lines in semi-colons. * Loosely aim towards jsHint standards ## Developing If you want to take an issue just add a small comment saying you are having a go at something, so we don't get duplication. Learn more about [developing Less.js](https://github.com/less/less.js/wiki/Developing-less.js). v1.6.3~dfsg/CHANGELOG.md0000644000000000000000000003026112275460205013267 0ustar rootroot# 1.6.3 2014-02-08 - Fix issue with calling toCSS twice not working in some situations (like with bootstrap 2) # 1.6.2 2014-02-02 - The Rhino release is fixed! - ability to use uppercase colours - Fix a nasty bug causing syntax errors when selector interpolation is preceded by a long comment (and some other cases) - Fix a major bug with the variable scope in guards on selectors (e.g. not mixins) - Fold in `& when () {` to the current selector rather than duplicating it - fix another issue with array prototypes - add a url-args option which adds a value to all urls (for cache busting) - Round numbers to 8 decimal places - thereby stopping javascript precision errors - some improvements to the default() function in more complex scenarios - improved missing '{' and '(' detection # 1.6.1 2014-01-12 - support ^ and ^^ shadow dom selectors - fix sourcemap selector (used to report end of the element or selector) and directive position (previously not supported) - fix parsing empty less files - error on (currently) ambiguous guards on multiple css selectors - older environments - protect against typeof regex returning function - Do not use default keyword - use innerHTML in tests, not innerText - protect for-in in case Array and Object prototypes have custom fields # 1.6.0 2014-01-01 - Properties can be interpolated, e.g. @{prefix}-property: value; - a default function has been added only valid in mixin definitions to determine if no other mixins have been matched - Added a plugins option that allows specifying an array of visitors run on the less AST - Performance improvements that may result in approx 20-40% speed up - Javascript evaluations returning numbers can now be used in calculations/functions - fixed issue when adding colours, taking the alpha over 1 and breaking when used in colour functions - when adding together 2 colours with non zero alpha, the alpha will now be combined rather than added - the advanced colour functions no longer ignore transparency, they blend that too - Added --clean-option and cleancssOptions to allow passing in clean css options - rgba declarations are now always clamped e.g. rgba(-1,258,258, -1) becomes rgba(0, 255, 255, 0) - Fix possible issue with import reference not bringing in styles (may not be a bugfix, just a code tidy) - Fix some issues with urls() being prefixed twice and unquoted urls in mixins being processed each time they are called - Fixed error messages for undefined variables in javascript evaluation - Fixed line/column numbers from math errors # 1.5.1 2013-11-17 - Added source-map-URL option - Fixed a bug which meant the minimised 1.5.0 browser version was not wrapped, meaning it interfered with require js - Fixed a bug where the browser version assume port was specified - Added the ability to specify variables on the command line - Upgraded clean-css and fixed it from trying to import - correct a bug meaning imports weren't synchronous (syncImport option available for full synchronous behaviour) - better mixin matching behaviour with calling multiple classes e.g. .a.b.c; # 1.5.0 2013-10-21 - sourcemap support - support for import inline option to include css that you do NOT want less to parse e.g. `@import (inline) "file.css";` - better support for modifyVars (refresh styles with new variables, using a file cache), is now more resiliant - support for import reference option to reference external css, but not output it. Any mixin calls or extend's will be output. - support for guards on selectors (currently only if you have a single selector) - allow property merging through the +: syntax - Added min/max functions - Added length function and improved extract to work with comma seperated values - when using import multiple, sub imports are imported multiple times into final output - fix bad spaces between namespace operators - do not compress comment if it begins with an exclamation mark - Fix the saturate function to pass through when using the CSS syntax - Added svg-gradient function - Added no-js option to lessc (in browser, use javascriptEnabled: false) which disallows JavaScript in less files - switched from the little supported and buggy cssmin (previously ycssmin) to clean-css - support transparent as a color, but not convert between rgba(0, 0, 0, 0) and transparent - remove sys.puts calls to stop deprecation warnings in future node.js releases - Browser: added logLevel option to control logging (2 = everything, 1 = errors only, 0 = no logging) - Browser: added errorReporting option which can be "html" (default) or "console" or a function - Now uses grunt for building and testing - A few bug fixes for media queries, extends, scoping, compression and import once. # 1.4.2 2013-07-20 - if you don't pass a strict maths option, font size/line height options are output correctly again - npmignore now include .gitattributes - property names may include capital letters - various windows path fixes (capital letters, multiple // in a path) # 1.4.1 2013-07-05 - fix syncImports and yui-compress option, as they were being ignored - fixed several global variable leaks - handle getting null or undefined passed as the options object # 1.4.0 2013-06-05 - fix passing of strict maths option # 1.4.0 Beta 4 2013-05-04 - change strictMaths to strictMath. Enable this with --strict-math=on in lessc and strictMath:true in JavaScript. - change lessc option for strict units to --strict-units=off # 1.4.0 Beta 3 2013-04-30 - strictUnits now defaults to false and the true case now gives more useful but less correct results, e.g. 2px/1px = 2px - Process ./ when having relative paths - add isunit function for mixin guards and non basic units - extends recognise attributes - exception errors extend the JavaScript Error - remove es-5-shim as standard from the browser - Fix path issues with windows/linux local paths # 1.4.0 Beta 1 & 2 2013-03-07 - support for `:extend()` in selectors (e.g. `input:extend(.button) {}`) and `&:extend();` in ruleset (e.g. `input { &:extend(.button all); }`) - maths is now only done inside brackets. This means font: statements, media queries and the calc function can use a simpler format without being escaped. Disable this with --strict-maths-off in lessc and strictMaths:false in JavaScript. - units are calculated, e.g. 200cm+1m = 3m, 3px/1px = 3. If you use units inconsistently you will get an error. Suppress this error with --strict-units-off in lessc or strictUnits:false in JavaScript - `(~"@var")` selector interpolation is removed. Use @{var} in selectors to have variable selectors - default behaviour of import is to import each file once. `@import-once` has been removed. - You can specify options on imports to force it to behave as css or less `@import (less) "file.css"` will process the file as less - variables in mixins no longer 'leak' into their calling scope - added data-uri function which will inline an image into the output css. If ieCompat option is true and file is too large, it will fallback to a url() - significant bug fixes to our debug options - other parameters can be used as defaults in mixins e.g. .a(@a, @b:@a) - an error is shown if properties are used outside of a ruleset - added extract function which picks a value out of a list, e.g. extract(12 13 14, 3) => 14 - added luma, hsvhue, hsvsaturation, hsvvalue functions - added pow, pi, mod, tan, sin, cos, atan, asin, acos and sqrt math functions - added convert function, e.g. convert(1rad, deg) => value in degrees - lessc makes output directories if they don't exist - lessc `@import` supports https and 301's - lessc "-depends" option for lessc writes out the list of import files used in makefile format - lessc "-lint" option just reports errors - support for namespaces in attributes and selector interpolation in attributes - other bug fixes # 1.3.3 2012-12-30 - Fix critical bug with mixin call if using multiple brackets - when using the filter contrast function, the function is passed through if the first argument is not a color # 1.3.2 2012-12-28 - browser and server url re-writing is now aligned to not re-write (previous lessc behaviour) - url-rewriting can be made to re-write to be relative to the entry file using the relative-urls option (less.relativeUrls option) - rootpath option can be used to add a base path to every url - Support mixin argument seperator of ';' so you can pass comma seperated values. e.g. `.mixin(23px, 12px;);` - Fix lots of problems with named arguments in corner cases, not behaving as expected - hsv, hsva, unit functions - fixed lots more bad error messages - fix `@import-once` to use the full path, not the relative one for determining if an import has been imported already - support `:not(:nth-child(3))` - mixin guards take units into account - support unicode descriptors (`U+00A1-00A9`) - support calling mixins with a stack when using `&` (broken in 1.3.1) - support `@namespace` and namespace combinators - when using % with colour functions, take into account a colour is out of 256 - when doing maths with a % do not divide by 100 and keep the unit - allow url to contain % (e.g. %20 for a space) - if a mixin guard stops execution a default mixin is not required - units are output in strings (use the unit function if you need to get the value without unit) - do not infinite recurse when mixins call mixins of the same name - fix issue on important on mixin calls - fix issue with multiple comments being confused - tolerate multiple semi-colons on rules - ignore subsequant `@charset` - syncImport option for node.js to read files syncronously - write the output directory if it is missing - change dependency on cssmin to ycssmin - lessc can load files over http - allow calling less.watch() in non dev mode - don't cache in dev mode - less files cope with query parameters better - sass debug statements are now chrome compatible - modifyVars function added to re-render with different root variables # 1.3.1 2012-10-18 - Support for comment and @media debugging statements - bug fix for async access in chrome extensions - new functions tint, shade, multiply, screen, overlay, hardlight, difference, exclusion, average, negation, softlight, red, green, blue, contrast - allow escaped characters in attributes - in selectors support @{a} directly, e.g. .a.@{a} { color: black; } - add fraction parameter to round function - much better support for & selector - preserve order of link statements client side - lessc has better help - rhino version fixed - fix bugs in clientside error handling - support dpi, vmin, vm, dppx, dpcm units - Fix ratios in media statements - in mixin guards allow comparing colors and strings - support for -*-keyframes (for -khtml but now supports any) - in mix function, default weight to 50% - support @import-once - remove duplicate rules in output - implement named parameters when calling mixins - many numerous bug fixes # 1.3.0 2012-03-10 - @media bubbling - Support arbitrary entities as selectors - [Variadic argument support](https://gist.github.com/1933613) - Behaviour of zero-arity mixins has [changed](https://gist.github.com/1933613) - Allow `@import` directives in any selector - Media-query features can now be a variable - Automatic merging of media-query conditions - Fix global variable leaks - Fix error message on wrong-arity call - Fix an `@arguments` behaviour bug - Fix `::` selector output - Fix a bug when using @media with mixins # 1.2.1 2012-01-15 - Fix imports in browser - Improve error reporting in browser - Fix Runtime error reports from imported files - Fix `File not found` import error reporting # 1.2.0 2012-01-07 - Mixin guards - New function `percentage` - New `color` function to parse hex color strings - New type-checking stylesheet functions - Fix Rhino support - Fix bug in string arguments to mixin call - Fix error reporting when index is 0 - Fix browser support in WebKit and IE - Fix string interpolation bug when var is empty - Support `!important` after mixin calls - Support vanilla @keyframes directive - Support variables in certain css selectors, like `nth-child` - Support @media and @import features properly - Improve @import support with media features - Improve error reports from imported files - Improve function call error reporting - Improve error-reporting v1.6.3~dfsg/lib/0000755000000000000000000000000012606003643012217 5ustar rootrootv1.6.3~dfsg/lib/less/0000755000000000000000000000000012275460205013170 5ustar rootrootv1.6.3~dfsg/lib/less/source-map-output.js0000644000000000000000000001245012275460205017141 0ustar rootroot(function (tree) { tree.sourceMapOutput = function (options) { this._css = []; this._rootNode = options.rootNode; this._writeSourceMap = options.writeSourceMap; this._contentsMap = options.contentsMap; this._contentsIgnoredCharsMap = options.contentsIgnoredCharsMap; this._sourceMapFilename = options.sourceMapFilename; this._outputFilename = options.outputFilename; this._sourceMapURL = options.sourceMapURL; if (options.sourceMapBasepath) { this._sourceMapBasepath = options.sourceMapBasepath.replace(/\\/g, '/'); } this._sourceMapRootpath = options.sourceMapRootpath; this._outputSourceFiles = options.outputSourceFiles; this._sourceMapGeneratorConstructor = options.sourceMapGenerator || require("source-map").SourceMapGenerator; if (this._sourceMapRootpath && this._sourceMapRootpath.charAt(this._sourceMapRootpath.length-1) !== '/') { this._sourceMapRootpath += '/'; } this._lineNumber = 0; this._column = 0; }; tree.sourceMapOutput.prototype.normalizeFilename = function(filename) { filename = filename.replace(/\\/g, '/'); if (this._sourceMapBasepath && filename.indexOf(this._sourceMapBasepath) === 0) { filename = filename.substring(this._sourceMapBasepath.length); if (filename.charAt(0) === '\\' || filename.charAt(0) === '/') { filename = filename.substring(1); } } return (this._sourceMapRootpath || "") + filename; }; tree.sourceMapOutput.prototype.add = function(chunk, fileInfo, index, mapLines) { //ignore adding empty strings if (!chunk) { return; } var lines, sourceLines, columns, sourceColumns, i; if (fileInfo) { var inputSource = this._contentsMap[fileInfo.filename]; // remove vars/banner added to the top of the file if (this._contentsIgnoredCharsMap[fileInfo.filename]) { // adjust the index index -= this._contentsIgnoredCharsMap[fileInfo.filename]; if (index < 0) { index = 0; } // adjust the source inputSource = inputSource.slice(this._contentsIgnoredCharsMap[fileInfo.filename]); } inputSource = inputSource.substring(0, index); sourceLines = inputSource.split("\n"); sourceColumns = sourceLines[sourceLines.length-1]; } lines = chunk.split("\n"); columns = lines[lines.length-1]; if (fileInfo) { if (!mapLines) { this._sourceMapGenerator.addMapping({ generated: { line: this._lineNumber + 1, column: this._column}, original: { line: sourceLines.length, column: sourceColumns.length}, source: this.normalizeFilename(fileInfo.filename)}); } else { for(i = 0; i < lines.length; i++) { this._sourceMapGenerator.addMapping({ generated: { line: this._lineNumber + i + 1, column: i === 0 ? this._column : 0}, original: { line: sourceLines.length + i, column: i === 0 ? sourceColumns.length : 0}, source: this.normalizeFilename(fileInfo.filename)}); } } } if (lines.length === 1) { this._column += columns.length; } else { this._lineNumber += lines.length - 1; this._column = columns.length; } this._css.push(chunk); }; tree.sourceMapOutput.prototype.isEmpty = function() { return this._css.length === 0; }; tree.sourceMapOutput.prototype.toCSS = function(env) { this._sourceMapGenerator = new this._sourceMapGeneratorConstructor({ file: this._outputFilename, sourceRoot: null }); if (this._outputSourceFiles) { for(var filename in this._contentsMap) { if (this._contentsMap.hasOwnProperty(filename)) { var source = this._contentsMap[filename]; if (this._contentsIgnoredCharsMap[filename]) { source = source.slice(this._contentsIgnoredCharsMap[filename]); } this._sourceMapGenerator.setSourceContent(this.normalizeFilename(filename), source); } } } this._rootNode.genCSS(env, this); if (this._css.length > 0) { var sourceMapURL, sourceMapContent = JSON.stringify(this._sourceMapGenerator.toJSON()); if (this._sourceMapURL) { sourceMapURL = this._sourceMapURL; } else if (this._sourceMapFilename) { sourceMapURL = this.normalizeFilename(this._sourceMapFilename); } if (this._writeSourceMap) { this._writeSourceMap(sourceMapContent); } else { sourceMapURL = "data:application/json," + encodeURIComponent(sourceMapContent); } if (sourceMapURL) { this._css.push("/*# sourceMappingURL=" + sourceMapURL + " */"); } } return this._css.join(''); }; })(require('./tree')); v1.6.3~dfsg/lib/less/lessc_helper.js0000644000000000000000000001265112275460205016203 0ustar rootroot// lessc_helper.js // // helper functions for lessc var lessc_helper = { //Stylize a string stylize : function(str, style) { var styles = { 'reset' : [0, 0], 'bold' : [1, 22], 'inverse' : [7, 27], 'underline' : [4, 24], 'yellow' : [33, 39], 'green' : [32, 39], 'red' : [31, 39], 'grey' : [90, 39] }; return '\033[' + styles[style][0] + 'm' + str + '\033[' + styles[style][1] + 'm'; }, //Print command line options printUsage: function() { console.log("usage: lessc [option option=parameter ...] [destination]"); console.log(""); console.log("If source is set to `-' (dash or hyphen-minus), input is read from stdin."); console.log(""); console.log("options:"); console.log(" -h, --help Print help (this message) and exit."); console.log(" --include-path=PATHS Set include paths. Separated by `:'. Use `;' on Windows."); console.log(" -M, --depends Output a makefile import dependency list to stdout"); console.log(" --no-color Disable colorized output."); console.log(" --no-ie-compat Disable IE compatibility checks."); console.log(" --no-js Disable JavaScript in less files"); console.log(" -l, --lint Syntax check only (lint)."); console.log(" -s, --silent Suppress output of error messages."); console.log(" --strict-imports Force evaluation of imports."); console.log(" --insecure Allow imports from insecure https hosts."); console.log(" -v, --version Print version number and exit."); console.log(" -x, --compress Compress output by removing some whitespaces."); console.log(" --clean-css Compress output using clean-css"); console.log(" --clean-option=opt:val Pass an option to clean css, using CLI arguments from "); console.log(" https://github.com/GoalSmashers/clean-css e.g."); console.log(" --clean-option=--selectors-merge-mode:ie8"); console.log(" and to switch on advanced use --clean-option=--advanced"); console.log(" --source-map[=FILENAME] Outputs a v3 sourcemap to the filename (or output filename.map)"); console.log(" --source-map-rootpath=X adds this path onto the sourcemap filename and less file paths"); console.log(" --source-map-basepath=X Sets sourcemap base path, defaults to current working directory."); console.log(" --source-map-less-inline puts the less files into the map instead of referencing them"); console.log(" --source-map-map-inline puts the map (and any less files) into the output css file"); console.log(" --source-map-url=URL the complete url and filename put in the less file"); console.log(" -rp, --rootpath=URL Set rootpath for url rewriting in relative imports and urls."); console.log(" Works with or without the relative-urls option."); console.log(" -ru, --relative-urls re-write relative urls to the base less file."); console.log(" -sm=on|off Turn on or off strict math, where in strict mode, math"); console.log(" --strict-math=on|off requires brackets. This option may default to on and then"); console.log(" be removed in the future."); console.log(" -su=on|off Allow mixed units, e.g. 1px+1em or 1px*1px which have units"); console.log(" --strict-units=on|off that cannot be represented."); console.log(" --global-var='VAR=VALUE' Defines a variable that can be referenced by the file."); console.log(" --modify-var='VAR=VALUE' Modifies a variable already declared in the file."); console.log(""); console.log("-------------------------- Deprecated ----------------"); console.log(" -O0, -O1, -O2 Set the parser's optimization level. The lower"); console.log(" the number, the less nodes it will create in the"); console.log(" tree. This could matter for debugging, or if you"); console.log(" want to access the individual nodes in the tree."); console.log(" --line-numbers=TYPE Outputs filename and line numbers."); console.log(" TYPE can be either 'comments', which will output"); console.log(" the debug info within comments, 'mediaquery'"); console.log(" that will output the information within a fake"); console.log(" media query which is compatible with the SASS"); console.log(" format, and 'all' which will do both."); console.log(" --verbose Be verbose."); console.log(""); console.log("Report bugs to: http://github.com/less/less.js/issues"); console.log("Home page: "); } }; // Exports helper functions for (var h in lessc_helper) { if (lessc_helper.hasOwnProperty(h)) { exports[h] = lessc_helper[h]; }} v1.6.3~dfsg/lib/less/env.js0000644000000000000000000001265412275460205014326 0ustar rootroot(function (tree) { var parseCopyProperties = [ 'paths', // option - unmodified - paths to search for imports on 'optimization', // option - optimization level (for the chunker) 'files', // list of files that have been imported, used for import-once 'contents', // map - filename to contents of all the files 'contentsIgnoredChars', // map - filename to lines at the begining of each file to ignore 'relativeUrls', // option - whether to adjust URL's to be relative 'rootpath', // option - rootpath to append to URL's 'strictImports', // option - 'insecure', // option - whether to allow imports from insecure ssl hosts 'dumpLineNumbers', // option - whether to dump line numbers 'compress', // option - whether to compress 'processImports', // option - whether to process imports. if false then imports will not be imported 'syncImport', // option - whether to import synchronously 'javascriptEnabled',// option - whether JavaScript is enabled. if undefined, defaults to true 'mime', // browser only - mime type for sheet import 'useFileCache', // browser only - whether to use the per file session cache 'currentFileInfo' // information about the current file - for error reporting and importing and making urls relative etc. ]; //currentFileInfo = { // 'relativeUrls' - option - whether to adjust URL's to be relative // 'filename' - full resolved filename of current file // 'rootpath' - path to append to normal URLs for this node // 'currentDirectory' - path to the current file, absolute // 'rootFilename' - filename of the base file // 'entryPath' - absolute path to the entry file // 'reference' - whether the file should not be output and only output parts that are referenced tree.parseEnv = function(options) { copyFromOriginal(options, this, parseCopyProperties); if (!this.contents) { this.contents = {}; } if (!this.contentsIgnoredChars) { this.contentsIgnoredChars = {}; } if (!this.files) { this.files = {}; } if (!this.currentFileInfo) { var filename = (options && options.filename) || "input"; var entryPath = filename.replace(/[^\/\\]*$/, ""); if (options) { options.filename = null; } this.currentFileInfo = { filename: filename, relativeUrls: this.relativeUrls, rootpath: (options && options.rootpath) || "", currentDirectory: entryPath, entryPath: entryPath, rootFilename: filename }; } }; var evalCopyProperties = [ 'silent', // whether to swallow errors and warnings 'verbose', // whether to log more activity 'compress', // whether to compress 'yuicompress', // whether to compress with the outside tool yui compressor 'ieCompat', // whether to enforce IE compatibility (IE8 data-uri) 'strictMath', // whether math has to be within parenthesis 'strictUnits', // whether units need to evaluate correctly 'cleancss', // whether to compress with clean-css 'sourceMap', // whether to output a source map 'importMultiple', // whether we are currently importing multiple copies 'urlArgs' // whether to add args into url tokens ]; tree.evalEnv = function(options, frames) { copyFromOriginal(options, this, evalCopyProperties); this.frames = frames || []; }; tree.evalEnv.prototype.inParenthesis = function () { if (!this.parensStack) { this.parensStack = []; } this.parensStack.push(true); }; tree.evalEnv.prototype.outOfParenthesis = function () { this.parensStack.pop(); }; tree.evalEnv.prototype.isMathOn = function () { return this.strictMath ? (this.parensStack && this.parensStack.length) : true; }; tree.evalEnv.prototype.isPathRelative = function (path) { return !/^(?:[a-z-]+:|\/)/.test(path); }; tree.evalEnv.prototype.normalizePath = function( path ) { var segments = path.split("/").reverse(), segment; path = []; while (segments.length !== 0 ) { segment = segments.pop(); switch( segment ) { case ".": break; case "..": if ((path.length === 0) || (path[path.length - 1] === "..")) { path.push( segment ); } else { path.pop(); } break; default: path.push( segment ); break; } } return path.join("/"); }; //todo - do the same for the toCSS env //tree.toCSSEnv = function (options) { //}; var copyFromOriginal = function(original, destination, propertiesToCopy) { if (!original) { return; } for(var i = 0; i < propertiesToCopy.length; i++) { if (original.hasOwnProperty(propertiesToCopy[i])) { destination[propertiesToCopy[i]] = original[propertiesToCopy[i]]; } } }; })(require('./tree')); v1.6.3~dfsg/lib/less/tree.js0000644000000000000000000000514012275460205014465 0ustar rootroot(function (tree) { tree.debugInfo = function(env, ctx, lineSeperator) { var result=""; if (env.dumpLineNumbers && !env.compress) { switch(env.dumpLineNumbers) { case 'comments': result = tree.debugInfo.asComment(ctx); break; case 'mediaquery': result = tree.debugInfo.asMediaQuery(ctx); break; case 'all': result = tree.debugInfo.asComment(ctx) + (lineSeperator || "") + tree.debugInfo.asMediaQuery(ctx); break; } } return result; }; tree.debugInfo.asComment = function(ctx) { return '/* line ' + ctx.debugInfo.lineNumber + ', ' + ctx.debugInfo.fileName + ' */\n'; }; tree.debugInfo.asMediaQuery = function(ctx) { return '@media -sass-debug-info{filename{font-family:' + ('file://' + ctx.debugInfo.fileName).replace(/([.:\/\\])/g, function (a) { if (a == '\\') { a = '\/'; } return '\\' + a; }) + '}line{font-family:\\00003' + ctx.debugInfo.lineNumber + '}}\n'; }; tree.find = function (obj, fun) { for (var i = 0, r; i < obj.length; i++) { r = fun.call(obj, obj[i]); if (r) { return r; } } return null; }; tree.jsify = function (obj) { if (Array.isArray(obj.value) && (obj.value.length > 1)) { return '[' + obj.value.map(function (v) { return v.toCSS(false); }).join(', ') + ']'; } else { return obj.toCSS(false); } }; tree.toCSS = function (env) { var strs = []; this.genCSS(env, { add: function(chunk, fileInfo, index) { strs.push(chunk); }, isEmpty: function () { return strs.length === 0; } }); return strs.join(''); }; tree.outputRuleset = function (env, output, rules) { var ruleCnt = rules.length, i; env.tabLevel = (env.tabLevel | 0) + 1; // Compressed if (env.compress) { output.add('{'); for (i = 0; i < ruleCnt; i++) { rules[i].genCSS(env, output); } output.add('}'); env.tabLevel--; return; } // Non-compressed var tabSetStr = '\n' + Array(env.tabLevel).join(" "), tabRuleStr = tabSetStr + " "; if (!ruleCnt) { output.add(" {" + tabSetStr + '}'); } else { output.add(" {" + tabRuleStr); rules[0].genCSS(env, output); for (i = 1; i < ruleCnt; i++) { output.add(tabRuleStr); rules[i].genCSS(env, output); } output.add(tabSetStr + '}'); } env.tabLevel--; }; })(require('./tree')); v1.6.3~dfsg/lib/less/parser.js0000644000000000000000000022522112275460205015026 0ustar rootrootvar less, tree; // Node.js does not have a header file added which defines less if (less === undefined) { less = exports; tree = require('./tree'); less.mode = 'node'; } // // less.js - parser // // A relatively straight-forward predictive parser. // There is no tokenization/lexing stage, the input is parsed // in one sweep. // // To make the parser fast enough to run in the browser, several // optimization had to be made: // // - Matching and slicing on a huge input is often cause of slowdowns. // The solution is to chunkify the input into smaller strings. // The chunks are stored in the `chunks` var, // `j` holds the current chunk index, and `currentPos` holds // the index of the current chunk in relation to `input`. // This gives us an almost 4x speed-up. // // - In many cases, we don't need to match individual tokens; // for example, if a value doesn't hold any variables, operations // or dynamic references, the parser can effectively 'skip' it, // treating it as a literal. // An example would be '1px solid #000' - which evaluates to itself, // we don't need to know what the individual components are. // The drawback, of course is that you don't get the benefits of // syntax-checking on the CSS. This gives us a 50% speed-up in the parser, // and a smaller speed-up in the code-gen. // // // Token matching is done with the `$` function, which either takes // a terminal string or regexp, or a non-terminal function to call. // It also takes care of moving all the indices forwards. // // less.Parser = function Parser(env) { var input, // LeSS input string i, // current index in `input` j, // current chunk temp, // temporarily holds a chunk's state, for backtracking memo, // temporarily holds `i`, when backtracking furthest, // furthest index the parser has gone to chunks, // chunkified input current, // current chunk currentPos, // index of current chunk, in `input` parser, parsers, rootFilename = env && env.filename; // Top parser on an import tree must be sure there is one "env" // which will then be passed around by reference. if (!(env instanceof tree.parseEnv)) { env = new tree.parseEnv(env); } var imports = this.imports = { paths: env.paths || [], // Search paths, when importing queue: [], // Files which haven't been imported yet files: env.files, // Holds the imported parse trees contents: env.contents, // Holds the imported file contents contentsIgnoredChars: env.contentsIgnoredChars, // lines inserted, not in the original less mime: env.mime, // MIME type of .less files error: null, // Error in parsing/evaluating an import push: function (path, currentFileInfo, importOptions, callback) { var parserImports = this; this.queue.push(path); var fileParsedFunc = function (e, root, fullPath) { parserImports.queue.splice(parserImports.queue.indexOf(path), 1); // Remove the path from the queue var importedPreviously = fullPath in parserImports.files || fullPath === rootFilename; parserImports.files[fullPath] = root; // Store the root if (e && !parserImports.error) { parserImports.error = e; } callback(e, root, importedPreviously, fullPath); }; if (less.Parser.importer) { less.Parser.importer(path, currentFileInfo, fileParsedFunc, env); } else { less.Parser.fileLoader(path, currentFileInfo, function(e, contents, fullPath, newFileInfo) { if (e) {fileParsedFunc(e); return;} var newEnv = new tree.parseEnv(env); newEnv.currentFileInfo = newFileInfo; newEnv.processImports = false; newEnv.contents[fullPath] = contents; if (currentFileInfo.reference || importOptions.reference) { newFileInfo.reference = true; } if (importOptions.inline) { fileParsedFunc(null, contents, fullPath); } else { new(less.Parser)(newEnv).parse(contents, function (e, root) { fileParsedFunc(e, root, fullPath); }); } }, env); } } }; function save() { temp = current; memo = currentPos = i; } function restore() { current = temp; currentPos = i = memo; } function sync() { if (i > currentPos) { current = current.slice(i - currentPos); currentPos = i; } } function isWhitespace(str, pos) { var code = str.charCodeAt(pos | 0); return (code <= 32) && (code === 32 || code === 10 || code === 9); } // // Parse from a token, regexp or string, and move forward if match // function $(tok) { var tokType = typeof tok, match, length; // Either match a single character in the input, // or match a regexp in the current chunk (`current`). // if (tokType === "string") { if (input.charAt(i) !== tok) { return null; } skipWhitespace(1); return tok; } // regexp sync (); if (! (match = tok.exec(current))) { return null; } length = match[0].length; // The match is confirmed, add the match length to `i`, // and consume any extra white-space characters (' ' || '\n') // which come after that. The reason for this is that LeSS's // grammar is mostly white-space insensitive. // skipWhitespace(length); if(typeof(match) === 'string') { return match; } else { return match.length === 1 ? match[0] : match; } } // Specialization of $(tok) function $re(tok) { if (i > currentPos) { current = current.slice(i - currentPos); currentPos = i; } var m = tok.exec(current); if (!m) { return null; } skipWhitespace(m[0].length); if(typeof m === "string") { return m; } return m.length === 1 ? m[0] : m; } var _$re = $re; // Specialization of $(tok) function $char(tok) { if (input.charAt(i) !== tok) { return null; } skipWhitespace(1); return tok; } function skipWhitespace(length) { var oldi = i, oldj = j, curr = i - currentPos, endIndex = i + current.length - curr, mem = (i += length), inp = input, c; for (; i < endIndex; i++) { c = inp.charCodeAt(i); if (c > 32) { break; } if ((c !== 32) && (c !== 10) && (c !== 9) && (c !== 13)) { break; } } current = current.slice(length + i - mem + curr); currentPos = i; if (!current.length && (j < chunks.length - 1)) { current = chunks[++j]; skipWhitespace(0); // skip space at the beginning of a chunk return true; // things changed } return oldi !== i || oldj !== j; } function expect(arg, msg) { // some older browsers return typeof 'function' for RegExp var result = (Object.prototype.toString.call(arg) === '[object Function]') ? arg.call(parsers) : $(arg); if (result) { return result; } error(msg || (typeof(arg) === 'string' ? "expected '" + arg + "' got '" + input.charAt(i) + "'" : "unexpected token")); } // Specialization of expect() function expectChar(arg, msg) { if (input.charAt(i) === arg) { skipWhitespace(1); return arg; } error(msg || "expected '" + arg + "' got '" + input.charAt(i) + "'"); } function error(msg, type) { var e = new Error(msg); e.index = i; e.type = type || 'Syntax'; throw e; } // Same as $(), but don't change the state of the parser, // just return the match. function peek(tok) { if (typeof(tok) === 'string') { return input.charAt(i) === tok; } else { return tok.test(current); } } // Specialization of peek() function peekChar(tok) { return input.charAt(i) === tok; } function getInput(e, env) { if (e.filename && env.currentFileInfo.filename && (e.filename !== env.currentFileInfo.filename)) { return parser.imports.contents[e.filename]; } else { return input; } } function getLocation(index, inputStream) { var n = index + 1, line = null, column = -1; while (--n >= 0 && inputStream.charAt(n) !== '\n') { column++; } if (typeof index === 'number') { line = (inputStream.slice(0, index).match(/\n/g) || "").length; } return { line: line, column: column }; } function getDebugInfo(index, inputStream, env) { var filename = env.currentFileInfo.filename; if(less.mode !== 'browser' && less.mode !== 'rhino') { filename = require('path').resolve(filename); } return { lineNumber: getLocation(index, inputStream).line + 1, fileName: filename }; } function LessError(e, env) { var input = getInput(e, env), loc = getLocation(e.index, input), line = loc.line, col = loc.column, callLine = e.call && getLocation(e.call, input).line, lines = input.split('\n'); this.type = e.type || 'Syntax'; this.message = e.message; this.filename = e.filename || env.currentFileInfo.filename; this.index = e.index; this.line = typeof(line) === 'number' ? line + 1 : null; this.callLine = callLine + 1; this.callExtract = lines[callLine]; this.stack = e.stack; this.column = col; this.extract = [ lines[line - 1], lines[line], lines[line + 1] ]; } LessError.prototype = new Error(); LessError.prototype.constructor = LessError; this.env = env = env || {}; // The optimization level dictates the thoroughness of the parser, // the lower the number, the less nodes it will create in the tree. // This could matter for debugging, or if you want to access // the individual nodes in the tree. this.optimization = ('optimization' in this.env) ? this.env.optimization : 1; // // The Parser // parser = { imports: imports, // // Parse an input string into an abstract syntax tree, // @param str A string containing 'less' markup // @param callback call `callback` when done. // @param [additionalData] An optional map which can contains vars - a map (key, value) of variables to apply // parse: function (str, callback, additionalData) { var root, line, lines, error = null, globalVars, modifyVars, preText = ""; i = j = currentPos = furthest = 0; globalVars = (additionalData && additionalData.globalVars) ? less.Parser.serializeVars(additionalData.globalVars) + '\n' : ''; modifyVars = (additionalData && additionalData.modifyVars) ? '\n' + less.Parser.serializeVars(additionalData.modifyVars) : ''; if (globalVars || (additionalData && additionalData.banner)) { preText = ((additionalData && additionalData.banner) ? additionalData.banner : "") + globalVars; parser.imports.contentsIgnoredChars[env.currentFileInfo.filename] = preText.length; } str = str.replace(/\r\n/g, '\n'); // Remove potential UTF Byte Order Mark input = str = preText + str.replace(/^\uFEFF/, '') + modifyVars; parser.imports.contents[env.currentFileInfo.filename] = str; // Split the input into chunks. chunks = (function (input) { var len = input.length, level = 0, parenLevel = 0, lastOpening, lastOpeningParen, lastMultiComment, lastMultiCommentEndBrace, chunks = [], emitFrom = 0, parserCurrentIndex, currentChunkStartIndex, cc, cc2, matched; function fail(msg, index) { error = new(LessError)({ index: index || parserCurrentIndex, type: 'Parse', message: msg, filename: env.currentFileInfo.filename }, env); } function emitChunk(force) { var len = parserCurrentIndex - emitFrom; if (((len < 512) && !force) || !len) { return; } chunks.push(input.slice(emitFrom, parserCurrentIndex + 1)); emitFrom = parserCurrentIndex + 1; } for (parserCurrentIndex = 0; parserCurrentIndex < len; parserCurrentIndex++) { cc = input.charCodeAt(parserCurrentIndex); if (((cc >= 97) && (cc <= 122)) || (cc < 34)) { // a-z or whitespace continue; } switch (cc) { case 40: // ( parenLevel++; lastOpeningParen = parserCurrentIndex; continue; case 41: // ) if (--parenLevel < 0) { return fail("missing opening `(`"); } continue; case 59: // ; if (!parenLevel) { emitChunk(); } continue; case 123: // { level++; lastOpening = parserCurrentIndex; continue; case 125: // } if (--level < 0) { return fail("missing opening `{`"); } if (!level) { emitChunk(); } continue; case 92: // \ if (parserCurrentIndex < len - 1) { parserCurrentIndex++; continue; } return fail("unescaped `\\`"); case 34: case 39: case 96: // ", ' and ` matched = 0; currentChunkStartIndex = parserCurrentIndex; for (parserCurrentIndex = parserCurrentIndex + 1; parserCurrentIndex < len; parserCurrentIndex++) { cc2 = input.charCodeAt(parserCurrentIndex); if (cc2 > 96) { continue; } if (cc2 == cc) { matched = 1; break; } if (cc2 == 92) { // \ if (parserCurrentIndex == len - 1) { return fail("unescaped `\\`"); } parserCurrentIndex++; } } if (matched) { continue; } return fail("unmatched `" + String.fromCharCode(cc) + "`", currentChunkStartIndex); case 47: // /, check for comment if (parenLevel || (parserCurrentIndex == len - 1)) { continue; } cc2 = input.charCodeAt(parserCurrentIndex + 1); if (cc2 == 47) { // //, find lnfeed for (parserCurrentIndex = parserCurrentIndex + 2; parserCurrentIndex < len; parserCurrentIndex++) { cc2 = input.charCodeAt(parserCurrentIndex); if ((cc2 <= 13) && ((cc2 == 10) || (cc2 == 13))) { break; } } } else if (cc2 == 42) { // /*, find */ lastMultiComment = currentChunkStartIndex = parserCurrentIndex; for (parserCurrentIndex = parserCurrentIndex + 2; parserCurrentIndex < len - 1; parserCurrentIndex++) { cc2 = input.charCodeAt(parserCurrentIndex); if (cc2 == 125) { lastMultiCommentEndBrace = parserCurrentIndex; } if (cc2 != 42) { continue; } if (input.charCodeAt(parserCurrentIndex + 1) == 47) { break; } } if (parserCurrentIndex == len - 1) { return fail("missing closing `*/`", currentChunkStartIndex); } parserCurrentIndex++; } continue; case 42: // *, check for unmatched */ if ((parserCurrentIndex < len - 1) && (input.charCodeAt(parserCurrentIndex + 1) == 47)) { return fail("unmatched `/*`"); } continue; } } if (level !== 0) { if ((lastMultiComment > lastOpening) && (lastMultiCommentEndBrace > lastMultiComment)) { return fail("missing closing `}` or `*/`", lastOpening); } else { return fail("missing closing `}`", lastOpening); } } else if (parenLevel !== 0) { return fail("missing closing `)`", lastOpeningParen); } emitChunk(true); return chunks; })(str); if (error) { return callback(new(LessError)(error, env)); } current = chunks[0]; // Start with the primary rule. // The whole syntax tree is held under a Ruleset node, // with the `root` property set to true, so no `{}` are // output. The callback is called when the input is parsed. try { root = new(tree.Ruleset)(null, this.parsers.primary()); root.root = true; root.firstRoot = true; } catch (e) { return callback(new(LessError)(e, env)); } root.toCSS = (function (evaluate) { return function (options, variables) { options = options || {}; var evaldRoot, css, evalEnv = new tree.evalEnv(options); // // Allows setting variables with a hash, so: // // `{ color: new(tree.Color)('#f01') }` will become: // // new(tree.Rule)('@color', // new(tree.Value)([ // new(tree.Expression)([ // new(tree.Color)('#f01') // ]) // ]) // ) // if (typeof(variables) === 'object' && !Array.isArray(variables)) { variables = Object.keys(variables).map(function (k) { var value = variables[k]; if (! (value instanceof tree.Value)) { if (! (value instanceof tree.Expression)) { value = new(tree.Expression)([value]); } value = new(tree.Value)([value]); } return new(tree.Rule)('@' + k, value, false, null, 0); }); evalEnv.frames = [new(tree.Ruleset)(null, variables)]; } try { var preEvalVisitors = [], visitors = [ new(tree.joinSelectorVisitor)(), new(tree.processExtendsVisitor)(), new(tree.toCSSVisitor)({compress: Boolean(options.compress)}) ], i, root = this; if (options.plugins) { for(i =0; i < options.plugins.length; i++) { if (options.plugins[i].isPreEvalVisitor) { preEvalVisitors.push(options.plugins[i]); } else { if (options.plugins[i].isPreVisitor) { visitors.splice(0, 0, options.plugins[i]); } else { visitors.push(options.plugins[i]); } } } } for(i = 0; i < preEvalVisitors.length; i++) { preEvalVisitors[i].run(root); } evaldRoot = evaluate.call(root, evalEnv); for(i = 0; i < visitors.length; i++) { visitors[i].run(evaldRoot); } if (options.sourceMap) { evaldRoot = new tree.sourceMapOutput( { contentsIgnoredCharsMap: parser.imports.contentsIgnoredChars, writeSourceMap: options.writeSourceMap, rootNode: evaldRoot, contentsMap: parser.imports.contents, sourceMapFilename: options.sourceMapFilename, sourceMapURL: options.sourceMapURL, outputFilename: options.sourceMapOutputFilename, sourceMapBasepath: options.sourceMapBasepath, sourceMapRootpath: options.sourceMapRootpath, outputSourceFiles: options.outputSourceFiles, sourceMapGenerator: options.sourceMapGenerator }); } css = evaldRoot.toCSS({ compress: Boolean(options.compress), dumpLineNumbers: env.dumpLineNumbers, strictUnits: Boolean(options.strictUnits), numPrecision: 8}); } catch (e) { throw new(LessError)(e, env); } if (options.cleancss && less.mode === 'node') { var CleanCSS = require('clean-css'), cleancssOptions = options.cleancssOptions || {}; if (cleancssOptions.keepSpecialComments === undefined) { cleancssOptions.keepSpecialComments = "*"; } cleancssOptions.processImport = false; cleancssOptions.noRebase = true; if (cleancssOptions.noAdvanced === undefined) { cleancssOptions.noAdvanced = true; } return new CleanCSS(cleancssOptions).minify(css); } else if (options.compress) { return css.replace(/(^(\s)+)|((\s)+$)/g, ""); } else { return css; } }; })(root.eval); // If `i` is smaller than the `input.length - 1`, // it means the parser wasn't able to parse the whole // string, so we've got a parsing error. // // We try to extract a \n delimited string, // showing the line where the parse error occured. // We split it up into two parts (the part which parsed, // and the part which didn't), so we can color them differently. if (i < input.length - 1) { i = furthest; var loc = getLocation(i, input); lines = input.split('\n'); line = loc.line + 1; error = { type: "Parse", message: "Unrecognised input", index: i, filename: env.currentFileInfo.filename, line: line, column: loc.column, extract: [ lines[line - 2], lines[line - 1], lines[line] ] }; } var finish = function (e) { e = error || e || parser.imports.error; if (e) { if (!(e instanceof LessError)) { e = new(LessError)(e, env); } return callback(e); } else { return callback(null, root); } }; if (env.processImports !== false) { new tree.importVisitor(this.imports, finish) .run(root); } else { return finish(); } }, // // Here in, the parsing rules/functions // // The basic structure of the syntax tree generated is as follows: // // Ruleset -> Rule -> Value -> Expression -> Entity // // Here's some LESS code: // // .class { // color: #fff; // border: 1px solid #000; // width: @w + 4px; // > .child {...} // } // // And here's what the parse tree might look like: // // Ruleset (Selector '.class', [ // Rule ("color", Value ([Expression [Color #fff]])) // Rule ("border", Value ([Expression [Dimension 1px][Keyword "solid"][Color #000]])) // Rule ("width", Value ([Expression [Operation "+" [Variable "@w"][Dimension 4px]]])) // Ruleset (Selector [Element '>', '.child'], [...]) // ]) // // In general, most rules will try to parse a token with the `$()` function, and if the return // value is truly, will return a new node, of the relevant type. Sometimes, we need to check // first, before parsing, that's when we use `peek()`. // parsers: parsers = { // // The `primary` rule is the *entry* and *exit* point of the parser. // The rules here can appear at any level of the parse tree. // // The recursive nature of the grammar is an interplay between the `block` // rule, which represents `{ ... }`, the `ruleset` rule, and this `primary` rule, // as represented by this simplified grammar: // // primary → (ruleset | rule)+ // ruleset → selector+ block // block → '{' primary '}' // // Only at one point is the primary rule not called from the // block rule: at the root level. // primary: function () { var mixin = this.mixin, $re = _$re, root = [], node; while (current) { node = this.extendRule() || mixin.definition() || this.rule() || this.ruleset() || mixin.call() || this.comment() || this.directive(); if (node) { root.push(node); } else { if (!($re(/^[\s\n]+/) || $re(/^;+/))) { break; } } } return root; }, // We create a Comment node for CSS comments `/* */`, // but keep the LeSS comments `//` silent, by just skipping // over them. comment: function () { var comment; if (input.charAt(i) !== '/') { return; } if (input.charAt(i + 1) === '/') { return new(tree.Comment)($re(/^\/\/.*/), true, i, env.currentFileInfo); } comment = $re(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/); if (comment) { return new(tree.Comment)(comment, false, i, env.currentFileInfo); } }, comments: function () { var comment, comments = []; while(true) { comment = this.comment(); if (!comment) { break; } comments.push(comment); } return comments; }, // // Entities are tokens which can be found inside an Expression // entities: { // // A string, which supports escaping " and ' // // "milky way" 'he\'s the one!' // quoted: function () { var str, j = i, e, index = i; if (input.charAt(j) === '~') { j++; e = true; } // Escaped strings if (input.charAt(j) !== '"' && input.charAt(j) !== "'") { return; } if (e) { $char('~'); } str = $re(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/); if (str) { return new(tree.Quoted)(str[0], str[1] || str[2], e, index, env.currentFileInfo); } }, // // A catch-all word, such as: // // black border-collapse // keyword: function () { var k; k = $re(/^[_A-Za-z-][_A-Za-z0-9-]*/); if (k) { var color = tree.Color.fromKeyword(k); if (color) { return color; } return new(tree.Keyword)(k); } }, // // A function call // // rgb(255, 0, 255) // // We also try to catch IE's `alpha()`, but let the `alpha` parser // deal with the details. // // The arguments are parsed with the `entities.arguments` parser. // call: function () { var name, nameLC, args, alpha_ret, index = i; name = /^([\w-]+|%|progid:[\w\.]+)\(/.exec(current); if (!name) { return; } name = name[1]; nameLC = name.toLowerCase(); if (nameLC === 'url') { return null; } i += name.length; if (nameLC === 'alpha') { alpha_ret = parsers.alpha(); if(typeof alpha_ret !== 'undefined') { return alpha_ret; } } $char('('); // Parse the '(' and consume whitespace. args = this.arguments(); if (! $char(')')) { return; } if (name) { return new(tree.Call)(name, args, index, env.currentFileInfo); } }, arguments: function () { var args = [], arg; while (true) { arg = this.assignment() || parsers.expression(); if (!arg) { break; } args.push(arg); if (! $char(',')) { break; } } return args; }, literal: function () { return this.dimension() || this.color() || this.quoted() || this.unicodeDescriptor(); }, // Assignments are argument entities for calls. // They are present in ie filter properties as shown below. // // filter: progid:DXImageTransform.Microsoft.Alpha( *opacity=50* ) // assignment: function () { var key, value; key = $re(/^\w+(?=\s?=)/i); if (!key) { return; } if (!$char('=')) { return; } value = parsers.entity(); if (value) { return new(tree.Assignment)(key, value); } }, // // Parse url() tokens // // We use a specific rule for urls, because they don't really behave like // standard function calls. The difference is that the argument doesn't have // to be enclosed within a string, so it can't be parsed as an Expression. // url: function () { var value; if (input.charAt(i) !== 'u' || !$re(/^url\(/)) { return; } value = this.quoted() || this.variable() || $re(/^(?:(?:\\[\(\)'"])|[^\(\)'"])+/) || ""; expectChar(')'); return new(tree.URL)((value.value != null || value instanceof tree.Variable) ? value : new(tree.Anonymous)(value), env.currentFileInfo); }, // // A Variable entity, such as `@fink`, in // // width: @fink + 2px // // We use a different parser for variable definitions, // see `parsers.variable`. // variable: function () { var name, index = i; if (input.charAt(i) === '@' && (name = $re(/^@@?[\w-]+/))) { return new(tree.Variable)(name, index, env.currentFileInfo); } }, // A variable entity useing the protective {} e.g. @{var} variableCurly: function () { var curly, index = i; if (input.charAt(i) === '@' && (curly = $re(/^@\{([\w-]+)\}/))) { return new(tree.Variable)("@" + curly[1], index, env.currentFileInfo); } }, // // A Hexadecimal color // // #4F3C2F // // `rgb` and `hsl` colors are parsed through the `entities.call` parser. // color: function () { var rgb; if (input.charAt(i) === '#' && (rgb = $re(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/))) { return new(tree.Color)(rgb[1]); } }, // // A Dimension, that is, a number and a unit // // 0.5em 95% // dimension: function () { var value, c = input.charCodeAt(i); //Is the first char of the dimension 0-9, '.', '+' or '-' if ((c > 57 || c < 43) || c === 47 || c == 44) { return; } value = $re(/^([+-]?\d*\.?\d+)(%|[a-z]+)?/); if (value) { return new(tree.Dimension)(value[1], value[2]); } }, // // A unicode descriptor, as is used in unicode-range // // U+0?? or U+00A1-00A9 // unicodeDescriptor: function () { var ud; ud = $re(/^U\+[0-9a-fA-F?]+(\-[0-9a-fA-F?]+)?/); if (ud) { return new(tree.UnicodeDescriptor)(ud[0]); } }, // // JavaScript code to be evaluated // // `window.location.href` // javascript: function () { var str, j = i, e; if (input.charAt(j) === '~') { j++; e = true; } // Escaped strings if (input.charAt(j) !== '`') { return; } if (env.javascriptEnabled !== undefined && !env.javascriptEnabled) { error("You are using JavaScript, which has been disabled."); } if (e) { $char('~'); } str = $re(/^`([^`]*)`/); if (str) { return new(tree.JavaScript)(str[1], i, e); } } }, // // The variable part of a variable definition. Used in the `rule` parser // // @fink: // variable: function () { var name; if (input.charAt(i) === '@' && (name = $re(/^(@[\w-]+)\s*:/))) { return name[1]; } }, // // extend syntax - used to extend selectors // extend: function(isRule) { var elements, e, index = i, option, extendList, extend; if (!(isRule ? $re(/^&:extend\(/) : $re(/^:extend\(/))) { return; } do { option = null; elements = null; while (! (option = $re(/^(all)(?=\s*(\)|,))/))) { e = this.element(); if (!e) { break; } if (elements) { elements.push(e); } else { elements = [ e ]; } } option = option && option[1]; extend = new(tree.Extend)(new(tree.Selector)(elements), option, index); if (extendList) { extendList.push(extend); } else { extendList = [ extend ]; } } while($char(",")); expect(/^\)/); if (isRule) { expect(/^;/); } return extendList; }, // // extendRule - used in a rule to extend all the parent selectors // extendRule: function() { return this.extend(true); }, // // Mixins // mixin: { // // A Mixin call, with an optional argument list // // #mixins > .square(#fff); // .rounded(4px, black); // .button; // // The `while` loop is there because mixins can be // namespaced, but we only support the child and descendant // selector for now. // call: function () { var s = input.charAt(i), important = false, index = i, elemIndex, elements, elem, e, c, args; if (s !== '.' && s !== '#') { return; } save(); // stop us absorbing part of an invalid selector while (true) { elemIndex = i; e = $re(/^[#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/); if (!e) { break; } elem = new(tree.Element)(c, e, elemIndex, env.currentFileInfo); if (elements) { elements.push(elem); } else { elements = [ elem ]; } c = $char('>'); } if (elements) { if ($char('(')) { args = this.args(true).args; expectChar(')'); } if (parsers.important()) { important = true; } if (parsers.end()) { return new(tree.mixin.Call)(elements, args, index, env.currentFileInfo, important); } } restore(); }, args: function (isCall) { var parsers = parser.parsers, entities = parsers.entities, returner = { args:null, variadic: false }, expressions = [], argsSemiColon = [], argsComma = [], isSemiColonSeperated, expressionContainsNamed, name, nameLoop, value, arg; while (true) { if (isCall) { arg = parsers.expression(); } else { parsers.comments(); if (input.charAt(i) === '.' && $re(/^\.{3}/)) { returner.variadic = true; if ($char(";") && !isSemiColonSeperated) { isSemiColonSeperated = true; } (isSemiColonSeperated ? argsSemiColon : argsComma) .push({ variadic: true }); break; } arg = entities.variable() || entities.literal() || entities.keyword(); } if (!arg) { break; } nameLoop = null; if (arg.throwAwayComments) { arg.throwAwayComments(); } value = arg; var val = null; if (isCall) { // Variable if (arg.value.length == 1) { val = arg.value[0]; } } else { val = arg; } if (val && val instanceof tree.Variable) { if ($char(':')) { if (expressions.length > 0) { if (isSemiColonSeperated) { error("Cannot mix ; and , as delimiter types"); } expressionContainsNamed = true; } value = expect(parsers.expression); nameLoop = (name = val.name); } else if (!isCall && $re(/^\.{3}/)) { returner.variadic = true; if ($char(";") && !isSemiColonSeperated) { isSemiColonSeperated = true; } (isSemiColonSeperated ? argsSemiColon : argsComma) .push({ name: arg.name, variadic: true }); break; } else if (!isCall) { name = nameLoop = val.name; value = null; } } if (value) { expressions.push(value); } argsComma.push({ name:nameLoop, value:value }); if ($char(',')) { continue; } if ($char(';') || isSemiColonSeperated) { if (expressionContainsNamed) { error("Cannot mix ; and , as delimiter types"); } isSemiColonSeperated = true; if (expressions.length > 1) { value = new(tree.Value)(expressions); } argsSemiColon.push({ name:name, value:value }); name = null; expressions = []; expressionContainsNamed = false; } } returner.args = isSemiColonSeperated ? argsSemiColon : argsComma; return returner; }, // // A Mixin definition, with a list of parameters // // .rounded (@radius: 2px, @color) { // ... // } // // Until we have a finer grained state-machine, we have to // do a look-ahead, to make sure we don't have a mixin call. // See the `rule` function for more information. // // We start by matching `.rounded (`, and then proceed on to // the argument list, which has optional default values. // We store the parameters in `params`, with a `value` key, // if there is a value, such as in the case of `@radius`. // // Once we've got our params list, and a closing `)`, we parse // the `{...}` block. // definition: function () { var name, params = [], match, ruleset, cond, variadic = false; if ((input.charAt(i) !== '.' && input.charAt(i) !== '#') || peek(/^[^{]*\}/)) { return; } save(); match = $re(/^([#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+)\s*\(/); if (match) { name = match[1]; var argInfo = this.args(false); params = argInfo.args; variadic = argInfo.variadic; // .mixincall("@{a}"); // looks a bit like a mixin definition.. so we have to be nice and restore if (!$char(')')) { furthest = i; restore(); } parsers.comments(); if ($re(/^when/)) { // Guard cond = expect(parsers.conditions, 'expected condition'); } ruleset = parsers.block(); if (ruleset) { return new(tree.mixin.Definition)(name, params, ruleset, cond, variadic); } else { restore(); } } } }, // // Entities are the smallest recognized token, // and can be found inside a rule's value. // entity: function () { var entities = this.entities; return entities.literal() || entities.variable() || entities.url() || entities.call() || entities.keyword() || entities.javascript() || this.comment(); }, // // A Rule terminator. Note that we use `peek()` to check for '}', // because the `block` rule will be expecting it, but we still need to make sure // it's there, if ';' was ommitted. // end: function () { return $char(';') || peekChar('}'); }, // // IE's alpha function // // alpha(opacity=88) // alpha: function () { var value; if (! $re(/^\(opacity=/i)) { return; } value = $re(/^\d+/) || this.entities.variable(); if (value) { expectChar(')'); return new(tree.Alpha)(value); } }, // // A Selector Element // // div // + h1 // #socks // input[type="text"] // // Elements are the building blocks for Selectors, // they are made out of a `Combinator` (see combinator rule), // and an element name, such as a tag a class, or `*`. // element: function () { var e, c, v, index = i; c = this.combinator(); e = $re(/^(?:\d+\.\d+|\d+)%/) || $re(/^(?:[.#]?|:*)(?:[\w-]|[^\x00-\x9f]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/) || $char('*') || $char('&') || this.attribute() || $re(/^\([^()@]+\)/) || $re(/^[\.#](?=@)/) || this.entities.variableCurly(); if (! e) { if ($char('(')) { if ((v = this.selector()) && $char(')')) { e = new(tree.Paren)(v); } } } if (e) { return new(tree.Element)(c, e, index, env.currentFileInfo); } }, // // Combinators combine elements together, in a Selector. // // Because our parser isn't white-space sensitive, special care // has to be taken, when parsing the descendant combinator, ` `, // as it's an empty space. We have to check the previous character // in the input, to see if it's a ` ` character. More info on how // we deal with this in *combinator.js*. // combinator: function () { var c = input.charAt(i); if (c === '>' || c === '+' || c === '~' || c === '|' || c === '^') { i++; if (input.charAt(i) === '^') { c = '^^'; i++; } while (isWhitespace(input, i)) { i++; } return new(tree.Combinator)(c); } else if (isWhitespace(input, i - 1)) { return new(tree.Combinator)(" "); } else { return new(tree.Combinator)(null); } }, // // A CSS selector (see selector below) // with less extensions e.g. the ability to extend and guard // lessSelector: function () { return this.selector(true); }, // // A CSS Selector // // .class > div + h1 // li a:hover // // Selectors are made out of one or more Elements, see above. // selector: function (isLess) { var index = i, $re = _$re, elements, extendList, c, e, extend, when, condition; while ((isLess && (extend = this.extend())) || (isLess && (when = $re(/^when/))) || (e = this.element())) { if (when) { condition = expect(this.conditions, 'expected condition'); } else if (condition) { error("CSS guard can only be used at the end of selector"); } else if (extend) { if (extendList) { extendList.push(extend); } else { extendList = [ extend ]; } } else { if (extendList) { error("Extend can only be used at the end of selector"); } c = input.charAt(i); if (elements) { elements.push(e); } else { elements = [ e ]; } e = null; } if (c === '{' || c === '}' || c === ';' || c === ',' || c === ')') { break; } } if (elements) { return new(tree.Selector)(elements, extendList, condition, index, env.currentFileInfo); } if (extendList) { error("Extend must be used to extend a selector, it cannot be used on its own"); } }, attribute: function () { if (! $char('[')) { return; } var entities = this.entities, key, val, op; if (!(key = entities.variableCurly())) { key = expect(/^(?:[_A-Za-z0-9-\*]*\|)?(?:[_A-Za-z0-9-]|\\.)+/); } op = $re(/^[|~*$^]?=/); if (op) { val = entities.quoted() || $re(/^[0-9]+%/) || $re(/^[\w-]+/) || entities.variableCurly(); } expectChar(']'); return new(tree.Attribute)(key, op, val); }, // // The `block` rule is used by `ruleset` and `mixin.definition`. // It's a wrapper around the `primary` rule, with added `{}`. // block: function () { var content; if ($char('{') && (content = this.primary()) && $char('}')) { return content; } }, // // div, .class, body > p {...} // ruleset: function () { var selectors, s, rules, debugInfo; save(); if (env.dumpLineNumbers) { debugInfo = getDebugInfo(i, input, env); } while (true) { s = this.lessSelector(); if (!s) { break; } if (selectors) { selectors.push(s); } else { selectors = [ s ]; } this.comments(); if (s.condition && selectors.length > 1) { error("Guards are only currently allowed on a single selector."); } if (! $char(',')) { break; } if (s.condition) { error("Guards are only currently allowed on a single selector."); } this.comments(); } if (selectors && (rules = this.block())) { var ruleset = new(tree.Ruleset)(selectors, rules, env.strictImports); if (env.dumpLineNumbers) { ruleset.debugInfo = debugInfo; } return ruleset; } else { // Backtrack furthest = i; restore(); } }, rule: function (tryAnonymous) { var name, value, c = input.charAt(i), important, merge = false; save(); if (c === '.' || c === '#' || c === '&') { return; } name = this.variable() || this.ruleProperty(); if (name) { // prefer to try to parse first if its a variable or we are compressing // but always fallback on the other one value = !tryAnonymous && (env.compress || (name.charAt && (name.charAt(0) === '@'))) ? (this.value() || this.anonymousValue()) : (this.anonymousValue() || this.value()); important = this.important(); // a name returned by this.ruleProperty() is always an array of the form: // [string-1, ..., string-n, ""] or [string-1, ..., string-n, "+"] // where each item is a tree.Keyword or tree.Variable merge = name.pop && (name.pop().value === "+"); if (value && this.end()) { return new (tree.Rule)(name, value, important, merge, memo, env.currentFileInfo); } else { furthest = i; restore(); if (value && !tryAnonymous) { return this.rule(true); } } } }, anonymousValue: function () { var match; match = /^([^@+\/'"*`(;{}-]*);/.exec(current); if (match) { i += match[0].length - 1; return new(tree.Anonymous)(match[1]); } }, // // An @import directive // // @import "lib"; // // Depending on our environemnt, importing is done differently: // In the browser, it's an XHR request, in Node, it would be a // file-system operation. The function used for importing is // stored in `import`, which we pass to the Import constructor. // "import": function () { var path, features, index = i; save(); var dir = $re(/^@import?\s+/); var options = (dir ? this.importOptions() : null) || {}; if (dir && (path = this.entities.quoted() || this.entities.url())) { features = this.mediaFeatures(); if ($char(';')) { features = features && new(tree.Value)(features); return new(tree.Import)(path, features, options, index, env.currentFileInfo); } } restore(); }, importOptions: function() { var o, options = {}, optionName, value; // list of options, surrounded by parens if (! $char('(')) { return null; } do { o = this.importOption(); if (o) { optionName = o; value = true; switch(optionName) { case "css": optionName = "less"; value = false; break; case "once": optionName = "multiple"; value = false; break; } options[optionName] = value; if (! $char(',')) { break; } } } while (o); expectChar(')'); return options; }, importOption: function() { var opt = $re(/^(less|css|multiple|once|inline|reference)/); if (opt) { return opt[1]; } }, mediaFeature: function () { var entities = this.entities, nodes = [], e, p; do { e = entities.keyword() || entities.variable(); if (e) { nodes.push(e); } else if ($char('(')) { p = this.property(); e = this.value(); if ($char(')')) { if (p && e) { nodes.push(new(tree.Paren)(new(tree.Rule)(p, e, null, null, i, env.currentFileInfo, true))); } else if (e) { nodes.push(new(tree.Paren)(e)); } else { return null; } } else { return null; } } } while (e); if (nodes.length > 0) { return new(tree.Expression)(nodes); } }, mediaFeatures: function () { var entities = this.entities, features = [], e; do { e = this.mediaFeature(); if (e) { features.push(e); if (! $char(',')) { break; } } else { e = entities.variable(); if (e) { features.push(e); if (! $char(',')) { break; } } } } while (e); return features.length > 0 ? features : null; }, media: function () { var features, rules, media, debugInfo; if (env.dumpLineNumbers) { debugInfo = getDebugInfo(i, input, env); } if ($re(/^@media/)) { features = this.mediaFeatures(); rules = this.block(); if (rules) { media = new(tree.Media)(rules, features, i, env.currentFileInfo); if (env.dumpLineNumbers) { media.debugInfo = debugInfo; } return media; } } }, // // A CSS Directive // // @charset "utf-8"; // directive: function () { var index = i, name, value, rules, nonVendorSpecificName, hasBlock, hasIdentifier, hasExpression, identifier; if (input.charAt(i) !== '@') { return; } value = this['import']() || this.media(); if (value) { return value; } save(); name = $re(/^@[a-z-]+/); if (!name) { return; } nonVendorSpecificName = name; if (name.charAt(1) == '-' && name.indexOf('-', 2) > 0) { nonVendorSpecificName = "@" + name.slice(name.indexOf('-', 2) + 1); } switch(nonVendorSpecificName) { case "@font-face": hasBlock = true; break; case "@viewport": case "@top-left": case "@top-left-corner": case "@top-center": case "@top-right": case "@top-right-corner": case "@bottom-left": case "@bottom-left-corner": case "@bottom-center": case "@bottom-right": case "@bottom-right-corner": case "@left-top": case "@left-middle": case "@left-bottom": case "@right-top": case "@right-middle": case "@right-bottom": hasBlock = true; break; case "@host": case "@page": case "@document": case "@supports": case "@keyframes": hasBlock = true; hasIdentifier = true; break; case "@namespace": hasExpression = true; break; } if (hasIdentifier) { identifier = ($re(/^[^{]+/) || '').trim(); if (identifier) { name += " " + identifier; } } if (hasBlock) { rules = this.block(); if (rules) { return new(tree.Directive)(name, rules, index, env.currentFileInfo); } } else { value = hasExpression ? this.expression() : this.entity(); if (value && $char(';')) { var directive = new(tree.Directive)(name, value, index, env.currentFileInfo); if (env.dumpLineNumbers) { directive.debugInfo = getDebugInfo(i, input, env); } return directive; } } restore(); }, // // A Value is a comma-delimited list of Expressions // // font-family: Baskerville, Georgia, serif; // // In a Rule, a Value represents everything after the `:`, // and before the `;`. // value: function () { var e, expressions = []; do { e = this.expression(); if (e) { expressions.push(e); if (! $char(',')) { break; } } } while(e); if (expressions.length > 0) { return new(tree.Value)(expressions); } }, important: function () { if (input.charAt(i) === '!') { return $re(/^! *important/); } }, sub: function () { var a, e; if ($char('(')) { a = this.addition(); if (a) { e = new(tree.Expression)([a]); expectChar(')'); e.parens = true; return e; } } }, multiplication: function () { var m, a, op, operation, isSpaced; m = this.operand(); if (m) { isSpaced = isWhitespace(input, i - 1); while (true) { if (peek(/^\/[*\/]/)) { break; } op = $char('/') || $char('*'); if (!op) { break; } a = this.operand(); if (!a) { break; } m.parensInOp = true; a.parensInOp = true; operation = new(tree.Operation)(op, [operation || m, a], isSpaced); isSpaced = isWhitespace(input, i - 1); } return operation || m; } }, addition: function () { var m, a, op, operation, isSpaced; m = this.multiplication(); if (m) { isSpaced = isWhitespace(input, i - 1); while (true) { op = $re(/^[-+]\s+/) || (!isSpaced && ($char('+') || $char('-'))); if (!op) { break; } a = this.multiplication(); if (!a) { break; } m.parensInOp = true; a.parensInOp = true; operation = new(tree.Operation)(op, [operation || m, a], isSpaced); isSpaced = isWhitespace(input, i - 1); } return operation || m; } }, conditions: function () { var a, b, index = i, condition; a = this.condition(); if (a) { while (true) { if (!peek(/^,\s*(not\s*)?\(/) || !$char(',')) { break; } b = this.condition(); if (!b) { break; } condition = new(tree.Condition)('or', condition || a, b, index); } return condition || a; } }, condition: function () { var entities = this.entities, index = i, negate = false, a, b, c, op; if ($re(/^not/)) { negate = true; } expectChar('('); a = this.addition() || entities.keyword() || entities.quoted(); if (a) { op = $re(/^(?:>=|<=|=<|[<=>])/); if (op) { b = this.addition() || entities.keyword() || entities.quoted(); if (b) { c = new(tree.Condition)(op, a, b, index, negate); } else { error('expected expression'); } } else { c = new(tree.Condition)('=', a, new(tree.Keyword)('true'), index, negate); } expectChar(')'); return $re(/^and/) ? new(tree.Condition)('and', c, this.condition()) : c; } }, // // An operand is anything that can be part of an operation, // such as a Color, or a Variable // operand: function () { var entities = this.entities, p = input.charAt(i + 1), negate; if (input.charAt(i) === '-' && (p === '@' || p === '(')) { negate = $char('-'); } var o = this.sub() || entities.dimension() || entities.color() || entities.variable() || entities.call(); if (negate) { o.parensInOp = true; o = new(tree.Negative)(o); } return o; }, // // Expressions either represent mathematical operations, // or white-space delimited Entities. // // 1px solid black // @var * 2 // expression: function () { var entities = [], e, delim; do { e = this.addition() || this.entity(); if (e) { entities.push(e); // operations do not allow keyword "/" dimension (e.g. small/20px) so we support that here if (!peek(/^\/[\/*]/)) { delim = $char('/'); if (delim) { entities.push(new(tree.Anonymous)(delim)); } } } } while (e); if (entities.length > 0) { return new(tree.Expression)(entities); } }, property: function () { var name = $re(/^(\*?-?[_a-zA-Z0-9-]+)\s*:/); if (name) { return name[1]; } }, ruleProperty: function () { var c = current, name = [], index = [], length = 0, s, k; function match(re) { var a = re.exec(c); if (a) { index.push(i + length); length += a[0].length; c = c.slice(a[1].length); return name.push(a[1]); } } match(/^(\*?)/); while (match(/^((?:[\w-]+)|(?:@\{[\w-]+\}))/)); // ! if ((name.length > 1) && match(/^\s*(\+?)\s*:/)) { // at last, we have the complete match now. move forward, // convert name particles to tree objects and return: skipWhitespace(length); if (name[0] === '') { name.shift(); index.shift(); } for (k = 0; k < name.length; k++) { s = name[k]; name[k] = (s.charAt(0) !== '@') ? new(tree.Keyword)(s) : new(tree.Variable)('@' + s.slice(2, -1), index[k], env.currentFileInfo); } return name; } } } }; return parser; }; less.Parser.serializeVars = function(vars) { var s = ''; for (var name in vars) { if (Object.hasOwnProperty.call(vars, name)) { var value = vars[name]; s += ((name[0] === '@') ? '' : '@') + name +': '+ value + ((('' + value).slice(-1) === ';') ? '' : ';'); } } return s; }; v1.6.3~dfsg/lib/less/extend-visitor.js0000644000000000000000000005140712275460205016521 0ustar rootroot(function (tree) { /*jshint loopfunc:true */ tree.extendFinderVisitor = function() { this._visitor = new tree.visitor(this); this.contexts = []; this.allExtendsStack = [[]]; }; tree.extendFinderVisitor.prototype = { run: function (root) { root = this._visitor.visit(root); root.allExtends = this.allExtendsStack[0]; return root; }, visitRule: function (ruleNode, visitArgs) { visitArgs.visitDeeper = false; }, visitMixinDefinition: function (mixinDefinitionNode, visitArgs) { visitArgs.visitDeeper = false; }, visitRuleset: function (rulesetNode, visitArgs) { if (rulesetNode.root) { return; } var i, j, extend, allSelectorsExtendList = [], extendList; // get &:extend(.a); rules which apply to all selectors in this ruleset var rules = rulesetNode.rules, ruleCnt = rules ? rules.length : 0; for(i = 0; i < ruleCnt; i++) { if (rulesetNode.rules[i] instanceof tree.Extend) { allSelectorsExtendList.push(rules[i]); rulesetNode.extendOnEveryPath = true; } } // now find every selector and apply the extends that apply to all extends // and the ones which apply to an individual extend var paths = rulesetNode.paths; for(i = 0; i < paths.length; i++) { var selectorPath = paths[i], selector = selectorPath[selectorPath.length - 1], selExtendList = selector.extendList; extendList = selExtendList ? selExtendList.slice(0).concat(allSelectorsExtendList) : allSelectorsExtendList; if (extendList) { extendList = extendList.map(function(allSelectorsExtend) { return allSelectorsExtend.clone(); }); } for(j = 0; j < extendList.length; j++) { this.foundExtends = true; extend = extendList[j]; extend.findSelfSelectors(selectorPath); extend.ruleset = rulesetNode; if (j === 0) { extend.firstExtendOnThisSelectorPath = true; } this.allExtendsStack[this.allExtendsStack.length-1].push(extend); } } this.contexts.push(rulesetNode.selectors); }, visitRulesetOut: function (rulesetNode) { if (!rulesetNode.root) { this.contexts.length = this.contexts.length - 1; } }, visitMedia: function (mediaNode, visitArgs) { mediaNode.allExtends = []; this.allExtendsStack.push(mediaNode.allExtends); }, visitMediaOut: function (mediaNode) { this.allExtendsStack.length = this.allExtendsStack.length - 1; }, visitDirective: function (directiveNode, visitArgs) { directiveNode.allExtends = []; this.allExtendsStack.push(directiveNode.allExtends); }, visitDirectiveOut: function (directiveNode) { this.allExtendsStack.length = this.allExtendsStack.length - 1; } }; tree.processExtendsVisitor = function() { this._visitor = new tree.visitor(this); }; tree.processExtendsVisitor.prototype = { run: function(root) { var extendFinder = new tree.extendFinderVisitor(); extendFinder.run(root); if (!extendFinder.foundExtends) { return root; } root.allExtends = root.allExtends.concat(this.doExtendChaining(root.allExtends, root.allExtends)); this.allExtendsStack = [root.allExtends]; return this._visitor.visit(root); }, doExtendChaining: function (extendsList, extendsListTarget, iterationCount) { // // chaining is different from normal extension.. if we extend an extend then we are not just copying, altering and pasting // the selector we would do normally, but we are also adding an extend with the same target selector // this means this new extend can then go and alter other extends // // this method deals with all the chaining work - without it, extend is flat and doesn't work on other extend selectors // this is also the most expensive.. and a match on one selector can cause an extension of a selector we had already processed if // we look at each selector at a time, as is done in visitRuleset var extendIndex, targetExtendIndex, matches, extendsToAdd = [], newSelector, extendVisitor = this, selectorPath, extend, targetExtend, newExtend; iterationCount = iterationCount || 0; //loop through comparing every extend with every target extend. // a target extend is the one on the ruleset we are looking at copy/edit/pasting in place // e.g. .a:extend(.b) {} and .b:extend(.c) {} then the first extend extends the second one // and the second is the target. // the seperation into two lists allows us to process a subset of chains with a bigger set, as is the // case when processing media queries for(extendIndex = 0; extendIndex < extendsList.length; extendIndex++){ for(targetExtendIndex = 0; targetExtendIndex < extendsListTarget.length; targetExtendIndex++){ extend = extendsList[extendIndex]; targetExtend = extendsListTarget[targetExtendIndex]; // look for circular references if( extend.parent_ids.indexOf( targetExtend.object_id ) >= 0 ){ continue; } // find a match in the target extends self selector (the bit before :extend) selectorPath = [targetExtend.selfSelectors[0]]; matches = extendVisitor.findMatch(extend, selectorPath); if (matches.length) { // we found a match, so for each self selector.. extend.selfSelectors.forEach(function(selfSelector) { // process the extend as usual newSelector = extendVisitor.extendSelector(matches, selectorPath, selfSelector); // but now we create a new extend from it newExtend = new(tree.Extend)(targetExtend.selector, targetExtend.option, 0); newExtend.selfSelectors = newSelector; // add the extend onto the list of extends for that selector newSelector[newSelector.length-1].extendList = [newExtend]; // record that we need to add it. extendsToAdd.push(newExtend); newExtend.ruleset = targetExtend.ruleset; //remember its parents for circular references newExtend.parent_ids = newExtend.parent_ids.concat(targetExtend.parent_ids, extend.parent_ids); // only process the selector once.. if we have :extend(.a,.b) then multiple // extends will look at the same selector path, so when extending // we know that any others will be duplicates in terms of what is added to the css if (targetExtend.firstExtendOnThisSelectorPath) { newExtend.firstExtendOnThisSelectorPath = true; targetExtend.ruleset.paths.push(newSelector); } }); } } } if (extendsToAdd.length) { // try to detect circular references to stop a stack overflow. // may no longer be needed. this.extendChainCount++; if (iterationCount > 100) { var selectorOne = "{unable to calculate}"; var selectorTwo = "{unable to calculate}"; try { selectorOne = extendsToAdd[0].selfSelectors[0].toCSS(); selectorTwo = extendsToAdd[0].selector.toCSS(); } catch(e) {} throw {message: "extend circular reference detected. One of the circular extends is currently:"+selectorOne+":extend(" + selectorTwo+")"}; } // now process the new extends on the existing rules so that we can handle a extending b extending c ectending d extending e... return extendsToAdd.concat(extendVisitor.doExtendChaining(extendsToAdd, extendsListTarget, iterationCount+1)); } else { return extendsToAdd; } }, visitRule: function (ruleNode, visitArgs) { visitArgs.visitDeeper = false; }, visitMixinDefinition: function (mixinDefinitionNode, visitArgs) { visitArgs.visitDeeper = false; }, visitSelector: function (selectorNode, visitArgs) { visitArgs.visitDeeper = false; }, visitRuleset: function (rulesetNode, visitArgs) { if (rulesetNode.root) { return; } var matches, pathIndex, extendIndex, allExtends = this.allExtendsStack[this.allExtendsStack.length-1], selectorsToAdd = [], extendVisitor = this, selectorPath; // look at each selector path in the ruleset, find any extend matches and then copy, find and replace for(extendIndex = 0; extendIndex < allExtends.length; extendIndex++) { for(pathIndex = 0; pathIndex < rulesetNode.paths.length; pathIndex++) { selectorPath = rulesetNode.paths[pathIndex]; // extending extends happens initially, before the main pass if (rulesetNode.extendOnEveryPath) { continue; } var extendList = selectorPath[selectorPath.length-1].extendList; if (extendList && extendList.length) { continue; } matches = this.findMatch(allExtends[extendIndex], selectorPath); if (matches.length) { allExtends[extendIndex].selfSelectors.forEach(function(selfSelector) { selectorsToAdd.push(extendVisitor.extendSelector(matches, selectorPath, selfSelector)); }); } } } rulesetNode.paths = rulesetNode.paths.concat(selectorsToAdd); }, findMatch: function (extend, haystackSelectorPath) { // // look through the haystack selector path to try and find the needle - extend.selector // returns an array of selector matches that can then be replaced // var haystackSelectorIndex, hackstackSelector, hackstackElementIndex, haystackElement, targetCombinator, i, extendVisitor = this, needleElements = extend.selector.elements, potentialMatches = [], potentialMatch, matches = []; // loop through the haystack elements for(haystackSelectorIndex = 0; haystackSelectorIndex < haystackSelectorPath.length; haystackSelectorIndex++) { hackstackSelector = haystackSelectorPath[haystackSelectorIndex]; for(hackstackElementIndex = 0; hackstackElementIndex < hackstackSelector.elements.length; hackstackElementIndex++) { haystackElement = hackstackSelector.elements[hackstackElementIndex]; // if we allow elements before our match we can add a potential match every time. otherwise only at the first element. if (extend.allowBefore || (haystackSelectorIndex === 0 && hackstackElementIndex === 0)) { potentialMatches.push({pathIndex: haystackSelectorIndex, index: hackstackElementIndex, matched: 0, initialCombinator: haystackElement.combinator}); } for(i = 0; i < potentialMatches.length; i++) { potentialMatch = potentialMatches[i]; // selectors add " " onto the first element. When we use & it joins the selectors together, but if we don't // then each selector in haystackSelectorPath has a space before it added in the toCSS phase. so we need to work out // what the resulting combinator will be targetCombinator = haystackElement.combinator.value; if (targetCombinator === '' && hackstackElementIndex === 0) { targetCombinator = ' '; } // if we don't match, null our match to indicate failure if (!extendVisitor.isElementValuesEqual(needleElements[potentialMatch.matched].value, haystackElement.value) || (potentialMatch.matched > 0 && needleElements[potentialMatch.matched].combinator.value !== targetCombinator)) { potentialMatch = null; } else { potentialMatch.matched++; } // if we are still valid and have finished, test whether we have elements after and whether these are allowed if (potentialMatch) { potentialMatch.finished = potentialMatch.matched === needleElements.length; if (potentialMatch.finished && (!extend.allowAfter && (hackstackElementIndex+1 < hackstackSelector.elements.length || haystackSelectorIndex+1 < haystackSelectorPath.length))) { potentialMatch = null; } } // if null we remove, if not, we are still valid, so either push as a valid match or continue if (potentialMatch) { if (potentialMatch.finished) { potentialMatch.length = needleElements.length; potentialMatch.endPathIndex = haystackSelectorIndex; potentialMatch.endPathElementIndex = hackstackElementIndex + 1; // index after end of match potentialMatches.length = 0; // we don't allow matches to overlap, so start matching again matches.push(potentialMatch); } } else { potentialMatches.splice(i, 1); i--; } } } } return matches; }, isElementValuesEqual: function(elementValue1, elementValue2) { if (typeof elementValue1 === "string" || typeof elementValue2 === "string") { return elementValue1 === elementValue2; } if (elementValue1 instanceof tree.Attribute) { if (elementValue1.op !== elementValue2.op || elementValue1.key !== elementValue2.key) { return false; } if (!elementValue1.value || !elementValue2.value) { if (elementValue1.value || elementValue2.value) { return false; } return true; } elementValue1 = elementValue1.value.value || elementValue1.value; elementValue2 = elementValue2.value.value || elementValue2.value; return elementValue1 === elementValue2; } elementValue1 = elementValue1.value; elementValue2 = elementValue2.value; if (elementValue1 instanceof tree.Selector) { if (!(elementValue2 instanceof tree.Selector) || elementValue1.elements.length !== elementValue2.elements.length) { return false; } for(var i = 0; i currentSelectorPathIndex && currentSelectorPathElementIndex > 0) { path[path.length - 1].elements = path[path.length - 1].elements.concat(selectorPath[currentSelectorPathIndex].elements.slice(currentSelectorPathElementIndex)); currentSelectorPathElementIndex = 0; currentSelectorPathIndex++; } newElements = selector.elements .slice(currentSelectorPathElementIndex, match.index) .concat([firstElement]) .concat(replacementSelector.elements.slice(1)); if (currentSelectorPathIndex === match.pathIndex && matchIndex > 0) { path[path.length - 1].elements = path[path.length - 1].elements.concat(newElements); } else { path = path.concat(selectorPath.slice(currentSelectorPathIndex, match.pathIndex)); path.push(new tree.Selector( newElements )); } currentSelectorPathIndex = match.endPathIndex; currentSelectorPathElementIndex = match.endPathElementIndex; if (currentSelectorPathElementIndex >= selectorPath[currentSelectorPathIndex].elements.length) { currentSelectorPathElementIndex = 0; currentSelectorPathIndex++; } } if (currentSelectorPathIndex < selectorPath.length && currentSelectorPathElementIndex > 0) { path[path.length - 1].elements = path[path.length - 1].elements.concat(selectorPath[currentSelectorPathIndex].elements.slice(currentSelectorPathElementIndex)); currentSelectorPathIndex++; } path = path.concat(selectorPath.slice(currentSelectorPathIndex, selectorPath.length)); return path; }, visitRulesetOut: function (rulesetNode) { }, visitMedia: function (mediaNode, visitArgs) { var newAllExtends = mediaNode.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]); newAllExtends = newAllExtends.concat(this.doExtendChaining(newAllExtends, mediaNode.allExtends)); this.allExtendsStack.push(newAllExtends); }, visitMediaOut: function (mediaNode) { this.allExtendsStack.length = this.allExtendsStack.length - 1; }, visitDirective: function (directiveNode, visitArgs) { var newAllExtends = directiveNode.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]); newAllExtends = newAllExtends.concat(this.doExtendChaining(newAllExtends, directiveNode.allExtends)); this.allExtendsStack.push(newAllExtends); }, visitDirectiveOut: function (directiveNode) { this.allExtendsStack.length = this.allExtendsStack.length - 1; } }; })(require('./tree')); v1.6.3~dfsg/lib/less/tree/0000755000000000000000000000000012275460205014127 5ustar rootrootv1.6.3~dfsg/lib/less/tree/ruleset.js0000644000000000000000000004561312275460205016161 0ustar rootroot(function (tree) { tree.Ruleset = function (selectors, rules, strictImports) { this.selectors = selectors; this.rules = rules; this._lookups = {}; this.strictImports = strictImports; }; tree.Ruleset.prototype = { type: "Ruleset", accept: function (visitor) { if (this.paths) { visitor.visitArray(this.paths, true); } else if (this.selectors) { this.selectors = visitor.visitArray(this.selectors); } if (this.rules && this.rules.length) { this.rules = visitor.visitArray(this.rules); } }, eval: function (env) { var thisSelectors = this.selectors, selectors, selCnt, i, defaultFunc = tree.defaultFunc; if (thisSelectors && (selCnt = thisSelectors.length)) { selectors = []; defaultFunc.error({ type: "Syntax", message: "it is currently only allowed in parametric mixin guards," }); for (i = 0; i < selCnt; i++) { selectors.push(thisSelectors[i].eval(env)); } defaultFunc.reset(); } var rules = this.rules ? this.rules.slice(0) : null, ruleset = new(tree.Ruleset)(selectors, rules, this.strictImports), rule, subRule; ruleset.originalRuleset = this; ruleset.root = this.root; ruleset.firstRoot = this.firstRoot; ruleset.allowImports = this.allowImports; if(this.debugInfo) { ruleset.debugInfo = this.debugInfo; } // push the current ruleset to the frames stack var envFrames = env.frames; envFrames.unshift(ruleset); // currrent selectors var envSelectors = env.selectors; if (!envSelectors) { env.selectors = envSelectors = []; } envSelectors.unshift(this.selectors); // Evaluate imports if (ruleset.root || ruleset.allowImports || !ruleset.strictImports) { ruleset.evalImports(env); } // Store the frames around mixin definitions, // so they can be evaluated like closures when the time comes. var rsRules = ruleset.rules, rsRuleCnt = rsRules ? rsRules.length : 0; for (i = 0; i < rsRuleCnt; i++) { if (rsRules[i] instanceof tree.mixin.Definition) { rsRules[i].frames = envFrames.slice(0); } } var mediaBlockCount = (env.mediaBlocks && env.mediaBlocks.length) || 0; // Evaluate mixin calls. for (i = 0; i < rsRuleCnt; i++) { if (rsRules[i] instanceof tree.mixin.Call) { /*jshint loopfunc:true */ rules = rsRules[i].eval(env).filter(function(r) { if ((r instanceof tree.Rule) && r.variable) { // do not pollute the scope if the variable is // already there. consider returning false here // but we need a way to "return" variable from mixins return !(ruleset.variable(r.name)); } return true; }); rsRules.splice.apply(rsRules, [i, 1].concat(rules)); rsRuleCnt += rules.length - 1; i += rules.length-1; ruleset.resetCache(); } } // Evaluate everything else for (i = 0; i < rsRules.length; i++) { rule = rsRules[i]; if (! (rule instanceof tree.mixin.Definition)) { rsRules[i] = rule = rule.eval ? rule.eval(env) : rule; // for rulesets, check if it is a css guard and can be removed if (rule instanceof tree.Ruleset && rule.selectors && rule.selectors.length === 1) { // check if it can be folded in (e.g. & where) if (rule.selectors[0].isJustParentSelector()) { rsRules.splice(i--, 1); // cannot call if there is no selector, so we can just continue if (!rule.selectors[0].evaldCondition) { continue; } for(var j = 0; j < rule.rules.length; j++) { subRule = rule.rules[j]; if (!(subRule instanceof tree.Rule) || !subRule.variable) { rsRules.splice(++i, 0, subRule); } } } } } } // Pop the stack envFrames.shift(); envSelectors.shift(); if (env.mediaBlocks) { for (i = mediaBlockCount; i < env.mediaBlocks.length; i++) { env.mediaBlocks[i].bubbleSelectors(selectors); } } return ruleset; }, evalImports: function(env) { var rules = this.rules, i, importRules; if (!rules) { return; } for (i = 0; i < rules.length; i++) { if (rules[i] instanceof tree.Import) { importRules = rules[i].eval(env); if (importRules && importRules.length) { rules.splice.apply(rules, [i, 1].concat(importRules)); i+= importRules.length-1; } else { rules.splice(i, 1, importRules); } this.resetCache(); } } }, makeImportant: function() { return new tree.Ruleset(this.selectors, this.rules.map(function (r) { if (r.makeImportant) { return r.makeImportant(); } else { return r; } }), this.strictImports); }, matchArgs: function (args) { return !args || args.length === 0; }, // lets you call a css selector with a guard matchCondition: function (args, env) { var lastSelector = this.selectors[this.selectors.length-1]; if (!lastSelector.evaldCondition) { return false; } if (lastSelector.condition && !lastSelector.condition.eval( new(tree.evalEnv)(env, env.frames))) { return false; } return true; }, resetCache: function () { this._rulesets = null; this._variables = null; this._lookups = {}; }, variables: function () { if (!this._variables) { this._variables = !this.rules ? {} : this.rules.reduce(function (hash, r) { if (r instanceof tree.Rule && r.variable === true) { hash[r.name] = r; } return hash; }, {}); } return this._variables; }, variable: function (name) { return this.variables()[name]; }, rulesets: function () { if (!this.rules) { return null; } var _Ruleset = tree.Ruleset, _MixinDefinition = tree.mixin.Definition, filtRules = [], rules = this.rules, cnt = rules.length, i, rule; for (i = 0; i < cnt; i++) { rule = rules[i]; if ((rule instanceof _Ruleset) || (rule instanceof _MixinDefinition)) { filtRules.push(rule); } } return filtRules; }, prependRule: function (rule) { var rules = this.rules; if (rules) { rules.unshift(rule); } else { this.rules = [ rule ]; } }, find: function (selector, self) { self = self || this; var rules = [], match, key = selector.toCSS(); if (key in this._lookups) { return this._lookups[key]; } this.rulesets().forEach(function (rule) { if (rule !== self) { for (var j = 0; j < rule.selectors.length; j++) { match = selector.match(rule.selectors[j]); if (match) { if (selector.elements.length > match) { Array.prototype.push.apply(rules, rule.find( new(tree.Selector)(selector.elements.slice(match)), self)); } else { rules.push(rule); } break; } } } }); this._lookups[key] = rules; return rules; }, genCSS: function (env, output) { var i, j, ruleNodes = [], rulesetNodes = [], rulesetNodeCnt, debugInfo, // Line number debugging rule, path; env.tabLevel = (env.tabLevel || 0); if (!this.root) { env.tabLevel++; } var tabRuleStr = env.compress ? '' : Array(env.tabLevel + 1).join(" "), tabSetStr = env.compress ? '' : Array(env.tabLevel).join(" "), sep; for (i = 0; i < this.rules.length; i++) { rule = this.rules[i]; if (rule.rules || (rule instanceof tree.Media) || rule instanceof tree.Directive || (this.root && rule instanceof tree.Comment)) { rulesetNodes.push(rule); } else { ruleNodes.push(rule); } } // If this is the root node, we don't render // a selector, or {}. if (!this.root) { debugInfo = tree.debugInfo(env, this, tabSetStr); if (debugInfo) { output.add(debugInfo); output.add(tabSetStr); } var paths = this.paths, pathCnt = paths.length, pathSubCnt; sep = env.compress ? ',' : (',\n' + tabSetStr); for (i = 0; i < pathCnt; i++) { path = paths[i]; if (!(pathSubCnt = path.length)) { continue; } if (i > 0) { output.add(sep); } env.firstSelector = true; path[0].genCSS(env, output); env.firstSelector = false; for (j = 1; j < pathSubCnt; j++) { path[j].genCSS(env, output); } } output.add((env.compress ? '{' : ' {\n') + tabRuleStr); } // Compile rules and rulesets for (i = 0; i < ruleNodes.length; i++) { rule = ruleNodes[i]; // @page{ directive ends up with root elements inside it, a mix of rules and rulesets // In this instance we do not know whether it is the last property if (i + 1 === ruleNodes.length && (!this.root || rulesetNodes.length === 0 || this.firstRoot)) { env.lastRule = true; } if (rule.genCSS) { rule.genCSS(env, output); } else if (rule.value) { output.add(rule.value.toString()); } if (!env.lastRule) { output.add(env.compress ? '' : ('\n' + tabRuleStr)); } else { env.lastRule = false; } } if (!this.root) { output.add((env.compress ? '}' : '\n' + tabSetStr + '}')); env.tabLevel--; } sep = (env.compress ? "" : "\n") + (this.root ? tabRuleStr : tabSetStr); rulesetNodeCnt = rulesetNodes.length; if (rulesetNodeCnt) { if (ruleNodes.length && sep) { output.add(sep); } rulesetNodes[0].genCSS(env, output); for (i = 1; i < rulesetNodeCnt; i++) { if (sep) { output.add(sep); } rulesetNodes[i].genCSS(env, output); } } if (!output.isEmpty() && !env.compress && this.firstRoot) { output.add('\n'); } }, toCSS: tree.toCSS, markReferenced: function () { for (var s = 0; s < this.selectors.length; s++) { this.selectors[s].markReferenced(); } }, joinSelectors: function (paths, context, selectors) { for (var s = 0; s < selectors.length; s++) { this.joinSelector(paths, context, selectors[s]); } }, joinSelector: function (paths, context, selector) { var i, j, k, hasParentSelector, newSelectors, el, sel, parentSel, newSelectorPath, afterParentJoin, newJoinedSelector, newJoinedSelectorEmpty, lastSelector, currentElements, selectorsMultiplied; for (i = 0; i < selector.elements.length; i++) { el = selector.elements[i]; if (el.value === '&') { hasParentSelector = true; } } if (!hasParentSelector) { if (context.length > 0) { for (i = 0; i < context.length; i++) { paths.push(context[i].concat(selector)); } } else { paths.push([selector]); } return; } // The paths are [[Selector]] // The first list is a list of comma seperated selectors // The inner list is a list of inheritance seperated selectors // e.g. // .a, .b { // .c { // } // } // == [[.a] [.c]] [[.b] [.c]] // // the elements from the current selector so far currentElements = []; // the current list of new selectors to add to the path. // We will build it up. We initiate it with one empty selector as we "multiply" the new selectors // by the parents newSelectors = [[]]; for (i = 0; i < selector.elements.length; i++) { el = selector.elements[i]; // non parent reference elements just get added if (el.value !== "&") { currentElements.push(el); } else { // the new list of selectors to add selectorsMultiplied = []; // merge the current list of non parent selector elements // on to the current list of selectors to add if (currentElements.length > 0) { this.mergeElementsOnToSelectors(currentElements, newSelectors); } // loop through our current selectors for (j = 0; j < newSelectors.length; j++) { sel = newSelectors[j]; // if we don't have any parent paths, the & might be in a mixin so that it can be used // whether there are parents or not if (context.length === 0) { // the combinator used on el should now be applied to the next element instead so that // it is not lost if (sel.length > 0) { sel[0].elements = sel[0].elements.slice(0); sel[0].elements.push(new(tree.Element)(el.combinator, '', el.index, el.currentFileInfo)); } selectorsMultiplied.push(sel); } else { // and the parent selectors for (k = 0; k < context.length; k++) { parentSel = context[k]; // We need to put the current selectors // then join the last selector's elements on to the parents selectors // our new selector path newSelectorPath = []; // selectors from the parent after the join afterParentJoin = []; newJoinedSelectorEmpty = true; //construct the joined selector - if & is the first thing this will be empty, // if not newJoinedSelector will be the last set of elements in the selector if (sel.length > 0) { newSelectorPath = sel.slice(0); lastSelector = newSelectorPath.pop(); newJoinedSelector = selector.createDerived(lastSelector.elements.slice(0)); newJoinedSelectorEmpty = false; } else { newJoinedSelector = selector.createDerived([]); } //put together the parent selectors after the join if (parentSel.length > 1) { afterParentJoin = afterParentJoin.concat(parentSel.slice(1)); } if (parentSel.length > 0) { newJoinedSelectorEmpty = false; // join the elements so far with the first part of the parent newJoinedSelector.elements.push(new(tree.Element)(el.combinator, parentSel[0].elements[0].value, el.index, el.currentFileInfo)); newJoinedSelector.elements = newJoinedSelector.elements.concat(parentSel[0].elements.slice(1)); } if (!newJoinedSelectorEmpty) { // now add the joined selector newSelectorPath.push(newJoinedSelector); } // and the rest of the parent newSelectorPath = newSelectorPath.concat(afterParentJoin); // add that to our new set of selectors selectorsMultiplied.push(newSelectorPath); } } } // our new selectors has been multiplied, so reset the state newSelectors = selectorsMultiplied; currentElements = []; } } // if we have any elements left over (e.g. .a& .b == .b) // add them on to all the current selectors if (currentElements.length > 0) { this.mergeElementsOnToSelectors(currentElements, newSelectors); } for (i = 0; i < newSelectors.length; i++) { if (newSelectors[i].length > 0) { paths.push(newSelectors[i]); } } }, mergeElementsOnToSelectors: function(elements, selectors) { var i, sel; if (selectors.length === 0) { selectors.push([ new(tree.Selector)(elements) ]); return; } for (i = 0; i < selectors.length; i++) { sel = selectors[i]; // if the previous thing in sel is a parent this needs to join on to it if (sel.length > 0) { sel[sel.length - 1] = sel[sel.length - 1].createDerived(sel[sel.length - 1].elements.concat(elements)); } else { sel.push(new(tree.Selector)(elements)); } } } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/alpha.js0000644000000000000000000000117712275460205015560 0ustar rootroot(function (tree) { tree.Alpha = function (val) { this.value = val; }; tree.Alpha.prototype = { type: "Alpha", accept: function (visitor) { this.value = visitor.visit(this.value); }, eval: function (env) { if (this.value.eval) { return new tree.Alpha(this.value.eval(env)); } return this; }, genCSS: function (env, output) { output.add("alpha(opacity="); if (this.value.genCSS) { this.value.genCSS(env, output); } else { output.add(this.value); } output.add(")"); }, toCSS: tree.toCSS }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/condition.js0000644000000000000000000000300612275460205016452 0ustar rootroot(function (tree) { tree.Condition = function (op, l, r, i, negate) { this.op = op.trim(); this.lvalue = l; this.rvalue = r; this.index = i; this.negate = negate; }; tree.Condition.prototype = { type: "Condition", accept: function (visitor) { this.lvalue = visitor.visit(this.lvalue); this.rvalue = visitor.visit(this.rvalue); }, eval: function (env) { var a = this.lvalue.eval(env), b = this.rvalue.eval(env); var i = this.index, result; result = (function (op) { switch (op) { case 'and': return a && b; case 'or': return a || b; default: if (a.compare) { result = a.compare(b); } else if (b.compare) { result = b.compare(a); } else { throw { type: "Type", message: "Unable to perform comparison", index: i }; } switch (result) { case -1: return op === '<' || op === '=<' || op === '<='; case 0: return op === '=' || op === '>=' || op === '=<' || op === '<='; case 1: return op === '>' || op === '>='; } } })(this.op); return this.negate ? !result : result; } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/dimension.js0000644000000000000000000002245312275460205016460 0ustar rootroot(function (tree) { // // A number with a unit // tree.Dimension = function (value, unit) { this.value = parseFloat(value); this.unit = (unit && unit instanceof tree.Unit) ? unit : new(tree.Unit)(unit ? [unit] : undefined); }; tree.Dimension.prototype = { type: "Dimension", accept: function (visitor) { this.unit = visitor.visit(this.unit); }, eval: function (env) { return this; }, toColor: function () { return new(tree.Color)([this.value, this.value, this.value]); }, genCSS: function (env, output) { if ((env && env.strictUnits) && !this.unit.isSingular()) { throw new Error("Multiple units in dimension. Correct the units or use the unit function. Bad unit: "+this.unit.toString()); } var value = tree.fround(env, this.value), strValue = String(value); if (value !== 0 && value < 0.000001 && value > -0.000001) { // would be output 1e-6 etc. strValue = value.toFixed(20).replace(/0+$/, ""); } if (env && env.compress) { // Zero values doesn't need a unit if (value === 0 && this.unit.isLength()) { output.add(strValue); return; } // Float values doesn't need a leading zero if (value > 0 && value < 1) { strValue = (strValue).substr(1); } } output.add(strValue); this.unit.genCSS(env, output); }, toCSS: tree.toCSS, // In an operation between two Dimensions, // we default to the first Dimension's unit, // so `1px + 2` will yield `3px`. operate: function (env, op, other) { /*jshint noempty:false */ var value = tree.operate(env, op, this.value, other.value), unit = this.unit.clone(); if (op === '+' || op === '-') { if (unit.numerator.length === 0 && unit.denominator.length === 0) { unit.numerator = other.unit.numerator.slice(0); unit.denominator = other.unit.denominator.slice(0); } else if (other.unit.numerator.length === 0 && unit.denominator.length === 0) { // do nothing } else { other = other.convertTo(this.unit.usedUnits()); if(env.strictUnits && other.unit.toString() !== unit.toString()) { throw new Error("Incompatible units. Change the units or use the unit function. Bad units: '" + unit.toString() + "' and '" + other.unit.toString() + "'."); } value = tree.operate(env, op, this.value, other.value); } } else if (op === '*') { unit.numerator = unit.numerator.concat(other.unit.numerator).sort(); unit.denominator = unit.denominator.concat(other.unit.denominator).sort(); unit.cancel(); } else if (op === '/') { unit.numerator = unit.numerator.concat(other.unit.denominator).sort(); unit.denominator = unit.denominator.concat(other.unit.numerator).sort(); unit.cancel(); } return new(tree.Dimension)(value, unit); }, compare: function (other) { if (other instanceof tree.Dimension) { var a = this.unify(), b = other.unify(), aValue = a.value, bValue = b.value; if (bValue > aValue) { return -1; } else if (bValue < aValue) { return 1; } else { if (!b.unit.isEmpty() && a.unit.compare(b.unit) !== 0) { return -1; } return 0; } } else { return -1; } }, unify: function () { return this.convertTo({ length: 'm', duration: 's', angle: 'rad' }); }, convertTo: function (conversions) { var value = this.value, unit = this.unit.clone(), i, groupName, group, targetUnit, derivedConversions = {}, applyUnit; if (typeof conversions === 'string') { for(i in tree.UnitConversions) { if (tree.UnitConversions[i].hasOwnProperty(conversions)) { derivedConversions = {}; derivedConversions[i] = conversions; } } conversions = derivedConversions; } applyUnit = function (atomicUnit, denominator) { /*jshint loopfunc:true */ if (group.hasOwnProperty(atomicUnit)) { if (denominator) { value = value / (group[atomicUnit] / group[targetUnit]); } else { value = value * (group[atomicUnit] / group[targetUnit]); } return targetUnit; } return atomicUnit; }; for (groupName in conversions) { if (conversions.hasOwnProperty(groupName)) { targetUnit = conversions[groupName]; group = tree.UnitConversions[groupName]; unit.map(applyUnit); } } unit.cancel(); return new(tree.Dimension)(value, unit); } }; // http://www.w3.org/TR/css3-values/#absolute-lengths tree.UnitConversions = { length: { 'm': 1, 'cm': 0.01, 'mm': 0.001, 'in': 0.0254, 'pt': 0.0254 / 72, 'pc': 0.0254 / 72 * 12 }, duration: { 's': 1, 'ms': 0.001 }, angle: { 'rad': 1/(2*Math.PI), 'deg': 1/360, 'grad': 1/400, 'turn': 1 } }; tree.Unit = function (numerator, denominator, backupUnit) { this.numerator = numerator ? numerator.slice(0).sort() : []; this.denominator = denominator ? denominator.slice(0).sort() : []; this.backupUnit = backupUnit; }; tree.Unit.prototype = { type: "Unit", clone: function () { return new tree.Unit(this.numerator.slice(0), this.denominator.slice(0), this.backupUnit); }, genCSS: function (env, output) { if (this.numerator.length >= 1) { output.add(this.numerator[0]); } else if (this.denominator.length >= 1) { output.add(this.denominator[0]); } else if ((!env || !env.strictUnits) && this.backupUnit) { output.add(this.backupUnit); } }, toCSS: tree.toCSS, toString: function () { var i, returnStr = this.numerator.join("*"); for (i = 0; i < this.denominator.length; i++) { returnStr += "/" + this.denominator[i]; } return returnStr; }, compare: function (other) { return this.is(other.toString()) ? 0 : -1; }, is: function (unitString) { return this.toString() === unitString; }, isLength: function () { return Boolean(this.toCSS().match(/px|em|%|in|cm|mm|pc|pt|ex/)); }, isEmpty: function () { return this.numerator.length === 0 && this.denominator.length === 0; }, isSingular: function() { return this.numerator.length <= 1 && this.denominator.length === 0; }, map: function(callback) { var i; for (i = 0; i < this.numerator.length; i++) { this.numerator[i] = callback(this.numerator[i], false); } for (i = 0; i < this.denominator.length; i++) { this.denominator[i] = callback(this.denominator[i], true); } }, usedUnits: function() { var group, result = {}, mapUnit; mapUnit = function (atomicUnit) { /*jshint loopfunc:true */ if (group.hasOwnProperty(atomicUnit) && !result[groupName]) { result[groupName] = atomicUnit; } return atomicUnit; }; for (var groupName in tree.UnitConversions) { if (tree.UnitConversions.hasOwnProperty(groupName)) { group = tree.UnitConversions[groupName]; this.map(mapUnit); } } return result; }, cancel: function () { var counter = {}, atomicUnit, i, backup; for (i = 0; i < this.numerator.length; i++) { atomicUnit = this.numerator[i]; if (!backup) { backup = atomicUnit; } counter[atomicUnit] = (counter[atomicUnit] || 0) + 1; } for (i = 0; i < this.denominator.length; i++) { atomicUnit = this.denominator[i]; if (!backup) { backup = atomicUnit; } counter[atomicUnit] = (counter[atomicUnit] || 0) - 1; } this.numerator = []; this.denominator = []; for (atomicUnit in counter) { if (counter.hasOwnProperty(atomicUnit)) { var count = counter[atomicUnit]; if (count > 0) { for (i = 0; i < count; i++) { this.numerator.push(atomicUnit); } } else if (count < 0) { for (i = 0; i < -count; i++) { this.denominator.push(atomicUnit); } } } } if (this.numerator.length === 0 && this.denominator.length === 0 && backup) { this.backupUnit = backup; } this.numerator.sort(); this.denominator.sort(); } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/assignment.js0000644000000000000000000000125612275460205016641 0ustar rootroot(function (tree) { tree.Assignment = function (key, val) { this.key = key; this.value = val; }; tree.Assignment.prototype = { type: "Assignment", accept: function (visitor) { this.value = visitor.visit(this.value); }, eval: function (env) { if (this.value.eval) { return new(tree.Assignment)(this.key, this.value.eval(env)); } return this; }, genCSS: function (env, output) { output.add(this.key + '='); if (this.value.genCSS) { this.value.genCSS(env, output); } else { output.add(this.value); } }, toCSS: tree.toCSS }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/mixin.js0000644000000000000000000003076512275460205015624 0ustar rootroot(function (tree) { tree.mixin = {}; tree.mixin.Call = function (elements, args, index, currentFileInfo, important) { this.selector = new(tree.Selector)(elements); this.arguments = (args && args.length) ? args : null; this.index = index; this.currentFileInfo = currentFileInfo; this.important = important; }; tree.mixin.Call.prototype = { type: "MixinCall", accept: function (visitor) { if (this.selector) { this.selector = visitor.visit(this.selector); } if (this.arguments) { this.arguments = visitor.visitArray(this.arguments); } }, eval: function (env) { var mixins, mixin, args, rules = [], match = false, i, m, f, isRecursive, isOneFound, rule, candidates = [], candidate, conditionResult = [], defaultFunc = tree.defaultFunc, defaultResult, defNone = 0, defTrue = 1, defFalse = 2, count; args = this.arguments && this.arguments.map(function (a) { return { name: a.name, value: a.value.eval(env) }; }); for (i = 0; i < env.frames.length; i++) { if ((mixins = env.frames[i].find(this.selector)).length > 0) { isOneFound = true; // To make `default()` function independent of definition order we have two "subpasses" here. // At first we evaluate each guard *twice* (with `default() == true` and `default() == false`), // and build candidate list with corresponding flags. Then, when we know all possible matches, // we make a final decision. for (m = 0; m < mixins.length; m++) { mixin = mixins[m]; isRecursive = false; for(f = 0; f < env.frames.length; f++) { if ((!(mixin instanceof tree.mixin.Definition)) && mixin === (env.frames[f].originalRuleset || env.frames[f])) { isRecursive = true; break; } } if (isRecursive) { continue; } if (mixin.matchArgs(args, env)) { candidate = {mixin: mixin, group: defNone}; if (mixin.matchCondition) { for (f = 0; f < 2; f++) { defaultFunc.value(f); conditionResult[f] = mixin.matchCondition(args, env); } if (conditionResult[0] || conditionResult[1]) { if (conditionResult[0] != conditionResult[1]) { candidate.group = conditionResult[1] ? defTrue : defFalse; } candidates.push(candidate); } } else { candidates.push(candidate); } match = true; } } defaultFunc.reset(); count = [0, 0, 0]; for (m = 0; m < candidates.length; m++) { count[candidates[m].group]++; } if (count[defNone] > 0) { defaultResult = defFalse; } else { defaultResult = defTrue; if ((count[defTrue] + count[defFalse]) > 1) { throw { type: 'Runtime', message: 'Ambiguous use of `default()` found when matching for `' + this.format(args) + '`', index: this.index, filename: this.currentFileInfo.filename }; } } for (m = 0; m < candidates.length; m++) { candidate = candidates[m].group; if ((candidate === defNone) || (candidate === defaultResult)) { try { mixin = candidates[m].mixin; if (!(mixin instanceof tree.mixin.Definition)) { mixin = new tree.mixin.Definition("", [], mixin.rules, null, false); mixin.originalRuleset = mixins[m].originalRuleset || mixins[m]; } Array.prototype.push.apply( rules, mixin.eval(env, args, this.important).rules); } catch (e) { throw { message: e.message, index: this.index, filename: this.currentFileInfo.filename, stack: e.stack }; } } } if (match) { if (!this.currentFileInfo || !this.currentFileInfo.reference) { for (i = 0; i < rules.length; i++) { rule = rules[i]; if (rule.markReferenced) { rule.markReferenced(); } } } return rules; } } } if (isOneFound) { throw { type: 'Runtime', message: 'No matching definition was found for `' + this.format(args) + '`', index: this.index, filename: this.currentFileInfo.filename }; } else { throw { type: 'Name', message: this.selector.toCSS().trim() + " is undefined", index: this.index, filename: this.currentFileInfo.filename }; } }, format: function (args) { return this.selector.toCSS().trim() + '(' + (args ? args.map(function (a) { var argValue = ""; if (a.name) { argValue += a.name + ":"; } if (a.value.toCSS) { argValue += a.value.toCSS(); } else { argValue += "???"; } return argValue; }).join(', ') : "") + ")"; } }; tree.mixin.Definition = function (name, params, rules, condition, variadic) { this.name = name; this.selectors = [new(tree.Selector)([new(tree.Element)(null, name, this.index, this.currentFileInfo)])]; this.params = params; this.condition = condition; this.variadic = variadic; this.arity = params.length; this.rules = rules; this._lookups = {}; this.required = params.reduce(function (count, p) { if (!p.name || (p.name && !p.value)) { return count + 1; } else { return count; } }, 0); this.parent = tree.Ruleset.prototype; this.frames = []; }; tree.mixin.Definition.prototype = { type: "MixinDefinition", accept: function (visitor) { if (this.params && this.params.length) { this.params = visitor.visitArray(this.params); } this.rules = visitor.visitArray(this.rules); if (this.condition) { this.condition = visitor.visit(this.condition); } }, variable: function (name) { return this.parent.variable.call(this, name); }, variables: function () { return this.parent.variables.call(this); }, find: function () { return this.parent.find.apply(this, arguments); }, rulesets: function () { return this.parent.rulesets.apply(this); }, evalParams: function (env, mixinEnv, args, evaldArguments) { /*jshint boss:true */ var frame = new(tree.Ruleset)(null, null), varargs, arg, params = this.params.slice(0), i, j, val, name, isNamedFound, argIndex; mixinEnv = new tree.evalEnv(mixinEnv, [frame].concat(mixinEnv.frames)); if (args) { args = args.slice(0); for(i = 0; i < args.length; i++) { arg = args[i]; if (name = (arg && arg.name)) { isNamedFound = false; for(j = 0; j < params.length; j++) { if (!evaldArguments[j] && name === params[j].name) { evaldArguments[j] = arg.value.eval(env); frame.prependRule(new(tree.Rule)(name, arg.value.eval(env))); isNamedFound = true; break; } } if (isNamedFound) { args.splice(i, 1); i--; continue; } else { throw { type: 'Runtime', message: "Named argument for " + this.name + ' ' + args[i].name + ' not found' }; } } } } argIndex = 0; for (i = 0; i < params.length; i++) { if (evaldArguments[i]) { continue; } arg = args && args[argIndex]; if (name = params[i].name) { if (params[i].variadic && args) { varargs = []; for (j = argIndex; j < args.length; j++) { varargs.push(args[j].value.eval(env)); } frame.prependRule(new(tree.Rule)(name, new(tree.Expression)(varargs).eval(env))); } else { val = arg && arg.value; if (val) { val = val.eval(env); } else if (params[i].value) { val = params[i].value.eval(mixinEnv); frame.resetCache(); } else { throw { type: 'Runtime', message: "wrong number of arguments for " + this.name + ' (' + args.length + ' for ' + this.arity + ')' }; } frame.prependRule(new(tree.Rule)(name, val)); evaldArguments[i] = val; } } if (params[i].variadic && args) { for (j = argIndex; j < args.length; j++) { evaldArguments[j] = args[j].value.eval(env); } } argIndex++; } return frame; }, eval: function (env, args, important) { var _arguments = [], mixinFrames = this.frames.concat(env.frames), frame = this.evalParams(env, new(tree.evalEnv)(env, mixinFrames), args, _arguments), rules, ruleset; frame.prependRule(new(tree.Rule)('@arguments', new(tree.Expression)(_arguments).eval(env))); rules = this.rules.slice(0); ruleset = new(tree.Ruleset)(null, rules); ruleset.originalRuleset = this; ruleset = ruleset.eval(new(tree.evalEnv)(env, [this, frame].concat(mixinFrames))); if (important) { ruleset = this.parent.makeImportant.apply(ruleset); } return ruleset; }, matchCondition: function (args, env) { if (this.condition && !this.condition.eval( new(tree.evalEnv)(env, [this.evalParams(env, new(tree.evalEnv)(env, this.frames.concat(env.frames)), args, [])] // the parameter variables .concat(this.frames) // the parent namespace/mixin frames .concat(env.frames)))) { // the current environment frames return false; } return true; }, matchArgs: function (args, env) { var argsLength = (args && args.length) || 0, len; if (! this.variadic) { if (argsLength < this.required) { return false; } if (argsLength > this.params.length) { return false; } } else { if (argsLength < (this.required - 1)) { return false; } } len = Math.min(argsLength, this.arity); for (var i = 0; i < len; i++) { if (!this.params[i].name && !this.params[i].variadic) { if (args[i].value.eval(env).toCSS() != this.params[i].value.eval(env).toCSS()) { return false; } } } return true; } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/import.js0000644000000000000000000001006512275460205016001 0ustar rootroot(function (tree) { // // CSS @import node // // The general strategy here is that we don't want to wait // for the parsing to be completed, before we start importing // the file. That's because in the context of a browser, // most of the time will be spent waiting for the server to respond. // // On creation, we push the import path to our import queue, though // `import,push`, we also pass it a callback, which it'll call once // the file has been fetched, and parsed. // tree.Import = function (path, features, options, index, currentFileInfo) { this.options = options; this.index = index; this.path = path; this.features = features; this.currentFileInfo = currentFileInfo; if (this.options.less !== undefined || this.options.inline) { this.css = !this.options.less || this.options.inline; } else { var pathValue = this.getPath(); if (pathValue && /css([\?;].*)?$/.test(pathValue)) { this.css = true; } } }; // // The actual import node doesn't return anything, when converted to CSS. // The reason is that it's used at the evaluation stage, so that the rules // it imports can be treated like any other rules. // // In `eval`, we make sure all Import nodes get evaluated, recursively, so // we end up with a flat structure, which can easily be imported in the parent // ruleset. // tree.Import.prototype = { type: "Import", accept: function (visitor) { if (this.features) { this.features = visitor.visit(this.features); } this.path = visitor.visit(this.path); if (!this.options.inline && this.root) { this.root = visitor.visit(this.root); } }, genCSS: function (env, output) { if (this.css) { output.add("@import ", this.currentFileInfo, this.index); this.path.genCSS(env, output); if (this.features) { output.add(" "); this.features.genCSS(env, output); } output.add(';'); } }, toCSS: tree.toCSS, getPath: function () { if (this.path instanceof tree.Quoted) { var path = this.path.value; return (this.css !== undefined || /(\.[a-z]*$)|([\?;].*)$/.test(path)) ? path : path + '.less'; } else if (this.path instanceof tree.URL) { return this.path.value.value; } return null; }, evalForImport: function (env) { return new(tree.Import)(this.path.eval(env), this.features, this.options, this.index, this.currentFileInfo); }, evalPath: function (env) { var path = this.path.eval(env); var rootpath = this.currentFileInfo && this.currentFileInfo.rootpath; if (!(path instanceof tree.URL)) { if (rootpath) { var pathValue = path.value; // Add the base path if the import is relative if (pathValue && env.isPathRelative(pathValue)) { path.value = rootpath +pathValue; } } path.value = env.normalizePath(path.value); } return path; }, eval: function (env) { var ruleset, features = this.features && this.features.eval(env); if (this.skip) { return []; } if (this.options.inline) { //todo needs to reference css file not import var contents = new(tree.Anonymous)(this.root, 0, {filename: this.importedFilename}, true); return this.features ? new(tree.Media)([contents], this.features.value) : [contents]; } else if (this.css) { var newImport = new(tree.Import)(this.evalPath(env), features, this.options, this.index); if (!newImport.css && this.error) { throw this.error; } return newImport; } else { ruleset = new(tree.Ruleset)(null, this.root.rules.slice(0)); ruleset.evalImports(env); return this.features ? new(tree.Media)(ruleset.rules, this.features.value) : ruleset.rules; } } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/expression.js0000644000000000000000000000315012275460205016663 0ustar rootroot(function (tree) { tree.Expression = function (value) { this.value = value; }; tree.Expression.prototype = { type: "Expression", accept: function (visitor) { if (this.value) { this.value = visitor.visitArray(this.value); } }, eval: function (env) { var returnValue, inParenthesis = this.parens && !this.parensInOp, doubleParen = false; if (inParenthesis) { env.inParenthesis(); } if (this.value.length > 1) { returnValue = new(tree.Expression)(this.value.map(function (e) { return e.eval(env); })); } else if (this.value.length === 1) { if (this.value[0].parens && !this.value[0].parensInOp) { doubleParen = true; } returnValue = this.value[0].eval(env); } else { returnValue = this; } if (inParenthesis) { env.outOfParenthesis(); } if (this.parens && this.parensInOp && !(env.isMathOn()) && !doubleParen) { returnValue = new(tree.Paren)(returnValue); } return returnValue; }, genCSS: function (env, output) { for(var i = 0; i < this.value.length; i++) { this.value[i].genCSS(env, output); if (i + 1 < this.value.length) { output.add(" "); } } }, toCSS: tree.toCSS, throwAwayComments: function () { this.value = this.value.filter(function(v) { return !(v instanceof tree.Comment); }); } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/directive.js0000644000000000000000000000401112275460205016437 0ustar rootroot(function (tree) { tree.Directive = function (name, value, index, currentFileInfo) { this.name = name; if (Array.isArray(value)) { this.rules = [new(tree.Ruleset)(null, value)]; this.rules[0].allowImports = true; } else { this.value = value; } this.index = index; this.currentFileInfo = currentFileInfo; }; tree.Directive.prototype = { type: "Directive", accept: function (visitor) { if (this.rules) { this.rules = visitor.visitArray(this.rules); } if (this.value) { this.value = visitor.visit(this.value); } }, genCSS: function (env, output) { output.add(this.name, this.currentFileInfo, this.index); if (this.rules) { tree.outputRuleset(env, output, this.rules); } else { output.add(' '); this.value.genCSS(env, output); output.add(';'); } }, toCSS: tree.toCSS, eval: function (env) { var evaldDirective = this; if (this.rules) { env.frames.unshift(this); evaldDirective = new(tree.Directive)(this.name, null, this.index, this.currentFileInfo); evaldDirective.rules = [this.rules[0].eval(env)]; evaldDirective.rules[0].root = true; env.frames.shift(); } return evaldDirective; }, variable: function (name) { return tree.Ruleset.prototype.variable.call(this.rules[0], name); }, find: function () { return tree.Ruleset.prototype.find.apply(this.rules[0], arguments); }, rulesets: function () { return tree.Ruleset.prototype.rulesets.apply(this.rules[0]); }, markReferenced: function () { var i, rules; this.isReferenced = true; if (this.rules) { rules = this.rules[0].rules; for (i = 0; i < rules.length; i++) { if (rules[i].markReferenced) { rules[i].markReferenced(); } } } } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/comment.js0000644000000000000000000000165012275460205016131 0ustar rootroot(function (tree) { tree.Comment = function (value, silent, index, currentFileInfo) { this.value = value; this.silent = !!silent; this.currentFileInfo = currentFileInfo; }; tree.Comment.prototype = { type: "Comment", genCSS: function (env, output) { if (this.debugInfo) { output.add(tree.debugInfo(env, this), this.currentFileInfo, this.index); } output.add(this.value.trim()); //TODO shouldn't need to trim, we shouldn't grab the \n }, toCSS: tree.toCSS, isSilent: function(env) { var isReference = (this.currentFileInfo && this.currentFileInfo.reference && !this.isReferenced), isCompressed = env.compress && !this.value.match(/^\/\*!/); return this.silent || isReference || isCompressed; }, eval: function () { return this; }, markReferenced: function () { this.isReferenced = true; } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/javascript.js0000644000000000000000000000354212275460205016637 0ustar rootroot(function (tree) { tree.JavaScript = function (string, index, escaped) { this.escaped = escaped; this.expression = string; this.index = index; }; tree.JavaScript.prototype = { type: "JavaScript", eval: function (env) { var result, that = this, context = {}; var expression = this.expression.replace(/@\{([\w-]+)\}/g, function (_, name) { return tree.jsify(new(tree.Variable)('@' + name, that.index).eval(env)); }); try { expression = new(Function)('return (' + expression + ')'); } catch (e) { throw { message: "JavaScript evaluation error: " + e.message + " from `" + expression + "`" , index: this.index }; } var variables = env.frames[0].variables(); for (var k in variables) { if (variables.hasOwnProperty(k)) { /*jshint loopfunc:true */ context[k.slice(1)] = { value: variables[k].value, toJS: function () { return this.value.eval(env).toCSS(); } }; } } try { result = expression.call(context); } catch (e) { throw { message: "JavaScript evaluation error: '" + e.name + ': ' + e.message.replace(/["]/g, "'") + "'" , index: this.index }; } if (typeof(result) === 'number') { return new(tree.Dimension)(result); } else if (typeof(result) === 'string') { return new(tree.Quoted)('"' + result + '"', result, this.escaped, this.index); } else if (Array.isArray(result)) { return new(tree.Anonymous)(result.join(', ')); } else { return new(tree.Anonymous)(result); } } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/quoted.js0000644000000000000000000000267512275460205016000 0ustar rootroot(function (tree) { tree.Quoted = function (str, content, escaped, index, currentFileInfo) { this.escaped = escaped; this.value = content || ''; this.quote = str.charAt(0); this.index = index; this.currentFileInfo = currentFileInfo; }; tree.Quoted.prototype = { type: "Quoted", genCSS: function (env, output) { if (!this.escaped) { output.add(this.quote, this.currentFileInfo, this.index); } output.add(this.value); if (!this.escaped) { output.add(this.quote); } }, toCSS: tree.toCSS, eval: function (env) { var that = this; var value = this.value.replace(/`([^`]+)`/g, function (_, exp) { return new(tree.JavaScript)(exp, that.index, true).eval(env).value; }).replace(/@\{([\w-]+)\}/g, function (_, name) { var v = new(tree.Variable)('@' + name, that.index, that.currentFileInfo).eval(env, true); return (v instanceof tree.Quoted) ? v.value : v.toCSS(); }); return new(tree.Quoted)(this.quote + value + this.quote, value, this.escaped, this.index, this.currentFileInfo); }, compare: function (x) { if (!x.toCSS) { return -1; } var left = this.toCSS(), right = x.toCSS(); if (left === right) { return 0; } return left < right ? -1 : 1; } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/variable.js0000644000000000000000000000236112275460205016254 0ustar rootroot(function (tree) { tree.Variable = function (name, index, currentFileInfo) { this.name = name; this.index = index; this.currentFileInfo = currentFileInfo || {}; }; tree.Variable.prototype = { type: "Variable", eval: function (env) { var variable, name = this.name; if (name.indexOf('@@') === 0) { name = '@' + new(tree.Variable)(name.slice(1)).eval(env).value; } if (this.evaluating) { throw { type: 'Name', message: "Recursive variable definition for " + name, filename: this.currentFileInfo.file, index: this.index }; } this.evaluating = true; variable = tree.find(env.frames, function (frame) { var v = frame.variable(name); if (v) { return v.value.eval(env); } }); if (variable) { this.evaluating = false; return variable; } else { throw { type: 'Name', message: "variable " + name + " is undefined", filename: this.currentFileInfo.filename, index: this.index }; } } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/extend.js0000644000000000000000000000311212275460205015751 0ustar rootroot(function (tree) { tree.Extend = function Extend(selector, option, index) { this.selector = selector; this.option = option; this.index = index; this.object_id = tree.Extend.next_id++; this.parent_ids = [this.object_id]; switch(option) { case "all": this.allowBefore = true; this.allowAfter = true; break; default: this.allowBefore = false; this.allowAfter = false; break; } }; tree.Extend.next_id = 0; tree.Extend.prototype = { type: "Extend", accept: function (visitor) { this.selector = visitor.visit(this.selector); }, eval: function (env) { return new(tree.Extend)(this.selector.eval(env), this.option, this.index); }, clone: function (env) { return new(tree.Extend)(this.selector, this.option, this.index); }, findSelfSelectors: function (selectors) { var selfElements = [], i, selectorElements; for(i = 0; i < selectors.length; i++) { selectorElements = selectors[i].elements; // duplicate the logic in genCSS function inside the selector node. // future TODO - move both logics into the selector joiner visitor if (i > 0 && selectorElements.length && selectorElements[0].combinator.value === "") { selectorElements[0].combinator.value = ' '; } selfElements = selfElements.concat(selectors[i].elements); } this.selfSelectors = [{ elements: selfElements }]; } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/paren.js0000644000000000000000000000074212275460205015575 0ustar rootroot (function (tree) { tree.Paren = function (node) { this.value = node; }; tree.Paren.prototype = { type: "Paren", accept: function (visitor) { this.value = visitor.visit(this.value); }, genCSS: function (env, output) { output.add('('); this.value.genCSS(env, output); output.add(')'); }, toCSS: tree.toCSS, eval: function (env) { return new(tree.Paren)(this.value.eval(env)); } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/anonymous.js0000644000000000000000000000154712275460205016524 0ustar rootroot(function (tree) { tree.Anonymous = function (string, index, currentFileInfo, mapLines) { this.value = string.value || string; this.index = index; this.mapLines = mapLines; this.currentFileInfo = currentFileInfo; }; tree.Anonymous.prototype = { type: "Anonymous", eval: function () { return new tree.Anonymous(this.value, this.index, this.currentFileInfo, this.mapLines); }, compare: function (x) { if (!x.toCSS) { return -1; } var left = this.toCSS(), right = x.toCSS(); if (left === right) { return 0; } return left < right ? -1 : 1; }, genCSS: function (env, output) { output.add(this.value, this.currentFileInfo, this.index, this.mapLines); }, toCSS: tree.toCSS }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/negative.js0000644000000000000000000000113412275460205016266 0ustar rootroot(function (tree) { tree.Negative = function (node) { this.value = node; }; tree.Negative.prototype = { type: "Negative", accept: function (visitor) { this.value = visitor.visit(this.value); }, genCSS: function (env, output) { output.add('-'); this.value.genCSS(env, output); }, toCSS: tree.toCSS, eval: function (env) { if (env.isMathOn()) { return (new(tree.Operation)('*', [new(tree.Dimension)(-1), this.value])).eval(env); } return new(tree.Negative)(this.value.eval(env)); } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/color.js0000644000000000000000000001250712275460205015610 0ustar rootroot(function (tree) { // // RGB Colors - #ff0014, #eee // tree.Color = function (rgb, a) { // // The end goal here, is to parse the arguments // into an integer triplet, such as `128, 255, 0` // // This facilitates operations and conversions. // if (Array.isArray(rgb)) { this.rgb = rgb; } else if (rgb.length == 6) { this.rgb = rgb.match(/.{2}/g).map(function (c) { return parseInt(c, 16); }); } else { this.rgb = rgb.split('').map(function (c) { return parseInt(c + c, 16); }); } this.alpha = typeof(a) === 'number' ? a : 1; }; var transparentKeyword = "transparent"; tree.Color.prototype = { type: "Color", eval: function () { return this; }, luma: function () { return (0.2126 * this.rgb[0] / 255) + (0.7152 * this.rgb[1] / 255) + (0.0722 * this.rgb[2] / 255); }, genCSS: function (env, output) { output.add(this.toCSS(env)); }, toCSS: function (env, doNotCompress) { var compress = env && env.compress && !doNotCompress, alpha = tree.fround(env, this.alpha); // If we have some transparency, the only way to represent it // is via `rgba`. Otherwise, we use the hex representation, // which has better compatibility with older browsers. // Values are capped between `0` and `255`, rounded and zero-padded. if (alpha < 1) { if (alpha === 0 && this.isTransparentKeyword) { return transparentKeyword; } return "rgba(" + this.rgb.map(function (c) { return clamp(Math.round(c), 255); }).concat(clamp(alpha, 1)) .join(',' + (compress ? '' : ' ')) + ")"; } else { var color = this.toRGB(); if (compress) { var splitcolor = color.split(''); // Convert color to short format if (splitcolor[1] === splitcolor[2] && splitcolor[3] === splitcolor[4] && splitcolor[5] === splitcolor[6]) { color = '#' + splitcolor[1] + splitcolor[3] + splitcolor[5]; } } return color; } }, // // Operations have to be done per-channel, if not, // channels will spill onto each other. Once we have // our result, in the form of an integer triplet, // we create a new Color node to hold the result. // operate: function (env, op, other) { var rgb = []; var alpha = this.alpha * (1 - other.alpha) + other.alpha; for (var c = 0; c < 3; c++) { rgb[c] = tree.operate(env, op, this.rgb[c], other.rgb[c]); } return new(tree.Color)(rgb, alpha); }, toRGB: function () { return toHex(this.rgb); }, toHSL: function () { var r = this.rgb[0] / 255, g = this.rgb[1] / 255, b = this.rgb[2] / 255, a = this.alpha; var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, l = (max + min) / 2, d = max - min; if (max === min) { h = s = 0; } else { s = l > 0.5 ? d / (2 - max - min) : d / (max + min); switch (max) { case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g: h = (b - r) / d + 2; break; case b: h = (r - g) / d + 4; break; } h /= 6; } return { h: h * 360, s: s, l: l, a: a }; }, //Adapted from http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript toHSV: function () { var r = this.rgb[0] / 255, g = this.rgb[1] / 255, b = this.rgb[2] / 255, a = this.alpha; var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, v = max; var d = max - min; if (max === 0) { s = 0; } else { s = d / max; } if (max === min) { h = 0; } else { switch(max){ case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g: h = (b - r) / d + 2; break; case b: h = (r - g) / d + 4; break; } h /= 6; } return { h: h * 360, s: s, v: v, a: a }; }, toARGB: function () { return toHex([this.alpha * 255].concat(this.rgb)); }, compare: function (x) { if (!x.rgb) { return -1; } return (x.rgb[0] === this.rgb[0] && x.rgb[1] === this.rgb[1] && x.rgb[2] === this.rgb[2] && x.alpha === this.alpha) ? 0 : -1; } }; tree.Color.fromKeyword = function(keyword) { keyword = keyword.toLowerCase(); if (tree.colors.hasOwnProperty(keyword)) { // detect named color return new(tree.Color)(tree.colors[keyword].slice(1)); } if (keyword === transparentKeyword) { var transparent = new(tree.Color)([0, 0, 0], 0); transparent.isTransparentKeyword = true; return transparent; } }; function toHex(v) { return '#' + v.map(function (c) { c = clamp(Math.round(c), 255); return (c < 16 ? '0' : '') + c.toString(16); }).join(''); } function clamp(v, max) { return Math.min(Math.max(v, 0), max); } })(require('../tree')); v1.6.3~dfsg/lib/less/tree/keyword.js0000644000000000000000000000106112275460205016147 0ustar rootroot(function (tree) { tree.Keyword = function (value) { this.value = value; }; tree.Keyword.prototype = { type: "Keyword", eval: function () { return this; }, genCSS: function (env, output) { output.add(this.value); }, toCSS: tree.toCSS, compare: function (other) { if (other instanceof tree.Keyword) { return other.value === this.value ? 0 : 1; } else { return -1; } } }; tree.True = new(tree.Keyword)('true'); tree.False = new(tree.Keyword)('false'); })(require('../tree')); v1.6.3~dfsg/lib/less/tree/call.js0000644000000000000000000000433312275460205015403 0ustar rootroot(function (tree) { // // A function call node. // tree.Call = function (name, args, index, currentFileInfo) { this.name = name; this.args = args; this.index = index; this.currentFileInfo = currentFileInfo; }; tree.Call.prototype = { type: "Call", accept: function (visitor) { if (this.args) { this.args = visitor.visitArray(this.args); } }, // // When evaluating a function call, // we either find the function in `tree.functions` [1], // in which case we call it, passing the evaluated arguments, // if this returns null or we cannot find the function, we // simply print it out as it appeared originally [2]. // // The *functions.js* file contains the built-in functions. // // The reason why we evaluate the arguments, is in the case where // we try to pass a variable to a function, like: `saturate(@color)`. // The function should receive the value, not the variable. // eval: function (env) { var args = this.args.map(function (a) { return a.eval(env); }), nameLC = this.name.toLowerCase(), result, func; if (nameLC in tree.functions) { // 1. try { func = new tree.functionCall(env, this.currentFileInfo); result = func[nameLC].apply(func, args); if (result != null) { return result; } } catch (e) { throw { type: e.type || "Runtime", message: "error evaluating function `" + this.name + "`" + (e.message ? ': ' + e.message : ''), index: this.index, filename: this.currentFileInfo.filename }; } } return new tree.Call(this.name, args, this.index, this.currentFileInfo); }, genCSS: function (env, output) { output.add(this.name + "(", this.currentFileInfo, this.index); for(var i = 0; i < this.args.length; i++) { this.args[i].genCSS(env, output); if (i + 1 < this.args.length) { output.add(", "); } } output.add(")"); }, toCSS: tree.toCSS }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/rule.js0000644000000000000000000000516212275460205015440 0ustar rootroot(function (tree) { tree.Rule = function (name, value, important, merge, index, currentFileInfo, inline) { this.name = name; this.value = (value instanceof tree.Value) ? value : new(tree.Value)([value]); this.important = important ? ' ' + important.trim() : ''; this.merge = merge; this.index = index; this.currentFileInfo = currentFileInfo; this.inline = inline || false; this.variable = name.charAt && (name.charAt(0) === '@'); }; tree.Rule.prototype = { type: "Rule", accept: function (visitor) { this.value = visitor.visit(this.value); }, genCSS: function (env, output) { output.add(this.name + (env.compress ? ':' : ': '), this.currentFileInfo, this.index); try { this.value.genCSS(env, output); } catch(e) { e.index = this.index; e.filename = this.currentFileInfo.filename; throw e; } output.add(this.important + ((this.inline || (env.lastRule && env.compress)) ? "" : ";"), this.currentFileInfo, this.index); }, toCSS: tree.toCSS, eval: function (env) { var strictMathBypass = false, name = this.name; if (typeof name !== "string") { // expand 'primitive' name directly to get // things faster (~10% for benchmark.less): name = (name.length === 1) && (name[0] instanceof tree.Keyword) ? name[0].value : evalName(env, name); } if (name === "font" && !env.strictMath) { strictMathBypass = true; env.strictMath = true; } try { return new(tree.Rule)(name, this.value.eval(env), this.important, this.merge, this.index, this.currentFileInfo, this.inline); } catch(e) { e.index = e.index || this.index; throw e; } finally { if (strictMathBypass) { env.strictMath = false; } } }, makeImportant: function () { return new(tree.Rule)(this.name, this.value, "!important", this.merge, this.index, this.currentFileInfo, this.inline); } }; function evalName(env, name) { var value = "", i, n = name.length, output = {add: function (s) {value += s;}}; for (i = 0; i < n; i++) { name[i].eval(env).genCSS(env, output); } return value; } })(require('../tree')); v1.6.3~dfsg/lib/less/tree/selector.js0000644000000000000000000000776412275460205016323 0ustar rootroot(function (tree) { tree.Selector = function (elements, extendList, condition, index, currentFileInfo, isReferenced) { this.elements = elements; this.extendList = extendList; this.condition = condition; this.currentFileInfo = currentFileInfo || {}; this.isReferenced = isReferenced; if (!condition) { this.evaldCondition = true; } }; tree.Selector.prototype = { type: "Selector", accept: function (visitor) { if (this.elements) { this.elements = visitor.visitArray(this.elements); } if (this.extendList) { this.extendList = visitor.visitArray(this.extendList); } if (this.condition) { this.condition = visitor.visit(this.condition); } }, createDerived: function(elements, extendList, evaldCondition) { evaldCondition = (evaldCondition != null) ? evaldCondition : this.evaldCondition; var newSelector = new(tree.Selector)(elements, extendList || this.extendList, null, this.index, this.currentFileInfo, this.isReferenced); newSelector.evaldCondition = evaldCondition; newSelector.mediaEmpty = this.mediaEmpty; return newSelector; }, match: function (other) { var elements = this.elements, len = elements.length, olen, i; other.CacheElements(); olen = other._elements.length; if (olen === 0 || len < olen) { return 0; } else { for (i = 0; i < olen; i++) { if (elements[i].value !== other._elements[i]) { return 0; } } } return olen; // return number of matched elements }, CacheElements: function(){ var css = '', len, v, i; if( !this._elements ){ len = this.elements.length; for(i = 0; i < len; i++){ v = this.elements[i]; css += v.combinator.value; if( !v.value.value ){ css += v.value; continue; } if( typeof v.value.value !== "string" ){ css = ''; break; } css += v.value.value; } this._elements = css.match(/[,&#\.\w-]([\w-]|(\\.))*/g); if (this._elements) { if (this._elements[0] === "&") { this._elements.shift(); } } else { this._elements = []; } } }, isJustParentSelector: function() { return !this.mediaEmpty && this.elements.length === 1 && this.elements[0].value === '&' && (this.elements[0].combinator.value === ' ' || this.elements[0].combinator.value === ''); }, eval: function (env) { var evaldCondition = this.condition && this.condition.eval(env), elements = this.elements, extendList = this.extendList; elements = elements && elements.map(function (e) { return e.eval(env); }); extendList = extendList && extendList.map(function(extend) { return extend.eval(env); }); return this.createDerived(elements, extendList, evaldCondition); }, genCSS: function (env, output) { var i, element; if ((!env || !env.firstSelector) && this.elements[0].combinator.value === "") { output.add(' ', this.currentFileInfo, this.index); } if (!this._css) { //TODO caching? speed comparison? for(i = 0; i < this.elements.length; i++) { element = this.elements[i]; element.genCSS(env, output); } } }, toCSS: tree.toCSS, markReferenced: function () { this.isReferenced = true; }, getIsReferenced: function() { return !this.currentFileInfo.reference || this.isReferenced; }, getIsOutput: function() { return this.evaldCondition; } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/unicode-descriptor.js0000644000000000000000000000050512275460205020267 0ustar rootroot(function (tree) { tree.UnicodeDescriptor = function (value) { this.value = value; }; tree.UnicodeDescriptor.prototype = { type: "UnicodeDescriptor", genCSS: function (env, output) { output.add(this.value); }, toCSS: tree.toCSS, eval: function () { return this; } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/media.js0000644000000000000000000001154112275460205015546 0ustar rootroot(function (tree) { tree.Media = function (value, features, index, currentFileInfo) { this.index = index; this.currentFileInfo = currentFileInfo; var selectors = this.emptySelectors(); this.features = new(tree.Value)(features); this.rules = [new(tree.Ruleset)(selectors, value)]; this.rules[0].allowImports = true; }; tree.Media.prototype = { type: "Media", accept: function (visitor) { if (this.features) { this.features = visitor.visit(this.features); } if (this.rules) { this.rules = visitor.visitArray(this.rules); } }, genCSS: function (env, output) { output.add('@media ', this.currentFileInfo, this.index); this.features.genCSS(env, output); tree.outputRuleset(env, output, this.rules); }, toCSS: tree.toCSS, eval: function (env) { if (!env.mediaBlocks) { env.mediaBlocks = []; env.mediaPath = []; } var media = new(tree.Media)(null, [], this.index, this.currentFileInfo); if(this.debugInfo) { this.rules[0].debugInfo = this.debugInfo; media.debugInfo = this.debugInfo; } var strictMathBypass = false; if (!env.strictMath) { strictMathBypass = true; env.strictMath = true; } try { media.features = this.features.eval(env); } finally { if (strictMathBypass) { env.strictMath = false; } } env.mediaPath.push(media); env.mediaBlocks.push(media); env.frames.unshift(this.rules[0]); media.rules = [this.rules[0].eval(env)]; env.frames.shift(); env.mediaPath.pop(); return env.mediaPath.length === 0 ? media.evalTop(env) : media.evalNested(env); }, variable: function (name) { return tree.Ruleset.prototype.variable.call(this.rules[0], name); }, find: function () { return tree.Ruleset.prototype.find.apply(this.rules[0], arguments); }, rulesets: function () { return tree.Ruleset.prototype.rulesets.apply(this.rules[0]); }, emptySelectors: function() { var el = new(tree.Element)('', '&', this.index, this.currentFileInfo), sels = [new(tree.Selector)([el], null, null, this.index, this.currentFileInfo)]; sels[0].mediaEmpty = true; return sels; }, markReferenced: function () { var i, rules = this.rules[0].rules; this.isReferenced = true; for (i = 0; i < rules.length; i++) { if (rules[i].markReferenced) { rules[i].markReferenced(); } } }, evalTop: function (env) { var result = this; // Render all dependent Media blocks. if (env.mediaBlocks.length > 1) { var selectors = this.emptySelectors(); result = new(tree.Ruleset)(selectors, env.mediaBlocks); result.multiMedia = true; } delete env.mediaBlocks; delete env.mediaPath; return result; }, evalNested: function (env) { var i, value, path = env.mediaPath.concat([this]); // Extract the media-query conditions separated with `,` (OR). for (i = 0; i < path.length; i++) { value = path[i].features instanceof tree.Value ? path[i].features.value : path[i].features; path[i] = Array.isArray(value) ? value : [value]; } // Trace all permutations to generate the resulting media-query. // // (a, b and c) with nested (d, e) -> // a and d // a and e // b and c and d // b and c and e this.features = new(tree.Value)(this.permute(path).map(function (path) { path = path.map(function (fragment) { return fragment.toCSS ? fragment : new(tree.Anonymous)(fragment); }); for(i = path.length - 1; i > 0; i--) { path.splice(i, 0, new(tree.Anonymous)("and")); } return new(tree.Expression)(path); })); // Fake a tree-node that doesn't output anything. return new(tree.Ruleset)([], []); }, permute: function (arr) { if (arr.length === 0) { return []; } else if (arr.length === 1) { return arr[0]; } else { var result = []; var rest = this.permute(arr.slice(1)); for (var i = 0; i < rest.length; i++) { for (var j = 0; j < arr[0].length; j++) { result.push([arr[0][j]].concat(rest[i])); } } return result; } }, bubbleSelectors: function (selectors) { this.rules = [new(tree.Ruleset)(selectors.slice(0), [this.rules[0]])]; } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/url.js0000644000000000000000000000327412275460205015275 0ustar rootroot(function (tree) { tree.URL = function (val, currentFileInfo, isEvald) { this.value = val; this.currentFileInfo = currentFileInfo; this.isEvald = isEvald; }; tree.URL.prototype = { type: "Url", accept: function (visitor) { this.value = visitor.visit(this.value); }, genCSS: function (env, output) { output.add("url("); this.value.genCSS(env, output); output.add(")"); }, toCSS: tree.toCSS, eval: function (ctx) { var val = this.value.eval(ctx), rootpath; if (!this.isEvald) { // Add the base path if the URL is relative rootpath = this.currentFileInfo && this.currentFileInfo.rootpath; if (rootpath && typeof val.value === "string" && ctx.isPathRelative(val.value)) { if (!val.quote) { rootpath = rootpath.replace(/[\(\)'"\s]/g, function(match) { return "\\"+match; }); } val.value = rootpath + val.value; } val.value = ctx.normalizePath(val.value); // Add url args if enabled if (ctx.urlArgs) { if (!val.value.match(/^\s*data:/)) { var delimiter = val.value.indexOf('?') === -1 ? '?' : '&'; var urlArgs = delimiter + ctx.urlArgs; if (val.value.indexOf('#') !== -1) { val.value = val.value.replace('#', urlArgs + '#'); } else { val.value += urlArgs; } } } } return new(tree.URL)(val, this.currentFileInfo, true); } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/operation.js0000644000000000000000000000302012275460205016460 0ustar rootroot(function (tree) { tree.Operation = function (op, operands, isSpaced) { this.op = op.trim(); this.operands = operands; this.isSpaced = isSpaced; }; tree.Operation.prototype = { type: "Operation", accept: function (visitor) { this.operands = visitor.visit(this.operands); }, eval: function (env) { var a = this.operands[0].eval(env), b = this.operands[1].eval(env); if (env.isMathOn()) { if (a instanceof tree.Dimension && b instanceof tree.Color) { a = a.toColor(); } if (b instanceof tree.Dimension && a instanceof tree.Color) { b = b.toColor(); } if (!a.operate) { throw { type: "Operation", message: "Operation on an invalid type" }; } return a.operate(env, this.op, b); } else { return new(tree.Operation)(this.op, [a, b], this.isSpaced); } }, genCSS: function (env, output) { this.operands[0].genCSS(env, output); if (this.isSpaced) { output.add(" "); } output.add(this.op); if (this.isSpaced) { output.add(" "); } this.operands[1].genCSS(env, output); }, toCSS: tree.toCSS }; tree.operate = function (env, op, a, b) { switch (op) { case '+': return a + b; case '-': return a - b; case '*': return a * b; case '/': return a / b; } }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/value.js0000644000000000000000000000152612275460205015605 0ustar rootroot(function (tree) { tree.Value = function (value) { this.value = value; }; tree.Value.prototype = { type: "Value", accept: function (visitor) { if (this.value) { this.value = visitor.visitArray(this.value); } }, eval: function (env) { if (this.value.length === 1) { return this.value[0].eval(env); } else { return new(tree.Value)(this.value.map(function (v) { return v.eval(env); })); } }, genCSS: function (env, output) { var i; for(i = 0; i < this.value.length; i++) { this.value[i].genCSS(env, output); if (i+1 < this.value.length) { output.add((env && env.compress) ? ',' : ', '); } } }, toCSS: tree.toCSS }; })(require('../tree')); v1.6.3~dfsg/lib/less/tree/element.js0000644000000000000000000000563112275460205016123 0ustar rootroot(function (tree) { tree.Element = function (combinator, value, index, currentFileInfo) { this.combinator = combinator instanceof tree.Combinator ? combinator : new(tree.Combinator)(combinator); if (typeof(value) === 'string') { this.value = value.trim(); } else if (value) { this.value = value; } else { this.value = ""; } this.index = index; this.currentFileInfo = currentFileInfo; }; tree.Element.prototype = { type: "Element", accept: function (visitor) { var value = this.value; this.combinator = visitor.visit(this.combinator); if (typeof value === "object") { this.value = visitor.visit(value); } }, eval: function (env) { return new(tree.Element)(this.combinator, this.value.eval ? this.value.eval(env) : this.value, this.index, this.currentFileInfo); }, genCSS: function (env, output) { output.add(this.toCSS(env), this.currentFileInfo, this.index); }, toCSS: function (env) { var value = (this.value.toCSS ? this.value.toCSS(env) : this.value); if (value === '' && this.combinator.value.charAt(0) === '&') { return ''; } else { return this.combinator.toCSS(env || {}) + value; } } }; tree.Attribute = function (key, op, value) { this.key = key; this.op = op; this.value = value; }; tree.Attribute.prototype = { type: "Attribute", eval: function (env) { return new(tree.Attribute)(this.key.eval ? this.key.eval(env) : this.key, this.op, (this.value && this.value.eval) ? this.value.eval(env) : this.value); }, genCSS: function (env, output) { output.add(this.toCSS(env)); }, toCSS: function (env) { var value = this.key.toCSS ? this.key.toCSS(env) : this.key; if (this.op) { value += this.op; value += (this.value.toCSS ? this.value.toCSS(env) : this.value); } return '[' + value + ']'; } }; tree.Combinator = function (value) { if (value === ' ') { this.value = ' '; } else { this.value = value ? value.trim() : ""; } }; tree.Combinator.prototype = { type: "Combinator", _outputMap: { '' : '', ' ' : ' ', ':' : ' :', '+' : ' + ', '~' : ' ~ ', '>' : ' > ', '|' : '|', '^' : ' ^ ', '^^' : ' ^^ ' }, _outputMapCompressed: { '' : '', ' ' : ' ', ':' : ' :', '+' : '+', '~' : '~', '>' : '>', '|' : '|', '^' : '^', '^^' : '^^' }, genCSS: function (env, output) { output.add((env.compress ? this._outputMapCompressed : this._outputMap)[this.value]); }, toCSS: tree.toCSS }; })(require('../tree')); v1.6.3~dfsg/lib/less/functions.js0000644000000000000000000005567712275460205015562 0ustar rootroot(function (tree) { tree.functions = { rgb: function (r, g, b) { return this.rgba(r, g, b, 1.0); }, rgba: function (r, g, b, a) { var rgb = [r, g, b].map(function (c) { return scaled(c, 255); }); a = number(a); return new(tree.Color)(rgb, a); }, hsl: function (h, s, l) { return this.hsla(h, s, l, 1.0); }, hsla: function (h, s, l, a) { function hue(h) { h = h < 0 ? h + 1 : (h > 1 ? h - 1 : h); if (h * 6 < 1) { return m1 + (m2 - m1) * h * 6; } else if (h * 2 < 1) { return m2; } else if (h * 3 < 2) { return m1 + (m2 - m1) * (2/3 - h) * 6; } else { return m1; } } h = (number(h) % 360) / 360; s = clamp(number(s)); l = clamp(number(l)); a = clamp(number(a)); var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s; var m1 = l * 2 - m2; return this.rgba(hue(h + 1/3) * 255, hue(h) * 255, hue(h - 1/3) * 255, a); }, hsv: function(h, s, v) { return this.hsva(h, s, v, 1.0); }, hsva: function(h, s, v, a) { h = ((number(h) % 360) / 360) * 360; s = number(s); v = number(v); a = number(a); var i, f; i = Math.floor((h / 60) % 6); f = (h / 60) - i; var vs = [v, v * (1 - s), v * (1 - f * s), v * (1 - (1 - f) * s)]; var perm = [[0, 3, 1], [2, 0, 1], [1, 0, 3], [1, 2, 0], [3, 1, 0], [0, 1, 2]]; return this.rgba(vs[perm[i][0]] * 255, vs[perm[i][1]] * 255, vs[perm[i][2]] * 255, a); }, hue: function (color) { return new(tree.Dimension)(Math.round(color.toHSL().h)); }, saturation: function (color) { return new(tree.Dimension)(Math.round(color.toHSL().s * 100), '%'); }, lightness: function (color) { return new(tree.Dimension)(Math.round(color.toHSL().l * 100), '%'); }, hsvhue: function(color) { return new(tree.Dimension)(Math.round(color.toHSV().h)); }, hsvsaturation: function (color) { return new(tree.Dimension)(Math.round(color.toHSV().s * 100), '%'); }, hsvvalue: function (color) { return new(tree.Dimension)(Math.round(color.toHSV().v * 100), '%'); }, red: function (color) { return new(tree.Dimension)(color.rgb[0]); }, green: function (color) { return new(tree.Dimension)(color.rgb[1]); }, blue: function (color) { return new(tree.Dimension)(color.rgb[2]); }, alpha: function (color) { return new(tree.Dimension)(color.toHSL().a); }, luma: function (color) { return new(tree.Dimension)(Math.round(color.luma() * color.alpha * 100), '%'); }, saturate: function (color, amount) { // filter: saturate(3.2); // should be kept as is, so check for color if (!color.rgb) { return null; } var hsl = color.toHSL(); hsl.s += amount.value / 100; hsl.s = clamp(hsl.s); return hsla(hsl); }, desaturate: function (color, amount) { var hsl = color.toHSL(); hsl.s -= amount.value / 100; hsl.s = clamp(hsl.s); return hsla(hsl); }, lighten: function (color, amount) { var hsl = color.toHSL(); hsl.l += amount.value / 100; hsl.l = clamp(hsl.l); return hsla(hsl); }, darken: function (color, amount) { var hsl = color.toHSL(); hsl.l -= amount.value / 100; hsl.l = clamp(hsl.l); return hsla(hsl); }, fadein: function (color, amount) { var hsl = color.toHSL(); hsl.a += amount.value / 100; hsl.a = clamp(hsl.a); return hsla(hsl); }, fadeout: function (color, amount) { var hsl = color.toHSL(); hsl.a -= amount.value / 100; hsl.a = clamp(hsl.a); return hsla(hsl); }, fade: function (color, amount) { var hsl = color.toHSL(); hsl.a = amount.value / 100; hsl.a = clamp(hsl.a); return hsla(hsl); }, spin: function (color, amount) { var hsl = color.toHSL(); var hue = (hsl.h + amount.value) % 360; hsl.h = hue < 0 ? 360 + hue : hue; return hsla(hsl); }, // // Copyright (c) 2006-2009 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein // http://sass-lang.com // mix: function (color1, color2, weight) { if (!weight) { weight = new(tree.Dimension)(50); } var p = weight.value / 100.0; var w = p * 2 - 1; var a = color1.toHSL().a - color2.toHSL().a; var w1 = (((w * a == -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0; var w2 = 1 - w1; var rgb = [color1.rgb[0] * w1 + color2.rgb[0] * w2, color1.rgb[1] * w1 + color2.rgb[1] * w2, color1.rgb[2] * w1 + color2.rgb[2] * w2]; var alpha = color1.alpha * p + color2.alpha * (1 - p); return new(tree.Color)(rgb, alpha); }, greyscale: function (color) { return this.desaturate(color, new(tree.Dimension)(100)); }, contrast: function (color, dark, light, threshold) { // filter: contrast(3.2); // should be kept as is, so check for color if (!color.rgb) { return null; } if (typeof light === 'undefined') { light = this.rgba(255, 255, 255, 1.0); } if (typeof dark === 'undefined') { dark = this.rgba(0, 0, 0, 1.0); } //Figure out which is actually light and dark! if (dark.luma() > light.luma()) { var t = light; light = dark; dark = t; } if (typeof threshold === 'undefined') { threshold = 0.43; } else { threshold = number(threshold); } if (color.luma() < threshold) { return light; } else { return dark; } }, e: function (str) { return new(tree.Anonymous)(str instanceof tree.JavaScript ? str.evaluated : str); }, escape: function (str) { return new(tree.Anonymous)(encodeURI(str.value).replace(/=/g, "%3D").replace(/:/g, "%3A").replace(/#/g, "%23").replace(/;/g, "%3B").replace(/\(/g, "%28").replace(/\)/g, "%29")); }, '%': function (quoted /* arg, arg, ...*/) { var args = Array.prototype.slice.call(arguments, 1), str = quoted.value; for (var i = 0; i < args.length; i++) { /*jshint loopfunc:true */ str = str.replace(/%[sda]/i, function(token) { var value = token.match(/s/i) ? args[i].value : args[i].toCSS(); return token.match(/[A-Z]$/) ? encodeURIComponent(value) : value; }); } str = str.replace(/%%/g, '%'); return new(tree.Quoted)('"' + str + '"', str); }, unit: function (val, unit) { if(!(val instanceof tree.Dimension)) { throw { type: "Argument", message: "the first argument to unit must be a number" + (val instanceof tree.Operation ? ". Have you forgotten parenthesis?" : "") }; } return new(tree.Dimension)(val.value, unit ? unit.toCSS() : ""); }, convert: function (val, unit) { return val.convertTo(unit.value); }, round: function (n, f) { var fraction = typeof(f) === "undefined" ? 0 : f.value; return _math(function(num) { return num.toFixed(fraction); }, null, n); }, pi: function () { return new(tree.Dimension)(Math.PI); }, mod: function(a, b) { return new(tree.Dimension)(a.value % b.value, a.unit); }, pow: function(x, y) { if (typeof x === "number" && typeof y === "number") { x = new(tree.Dimension)(x); y = new(tree.Dimension)(y); } else if (!(x instanceof tree.Dimension) || !(y instanceof tree.Dimension)) { throw { type: "Argument", message: "arguments must be numbers" }; } return new(tree.Dimension)(Math.pow(x.value, y.value), x.unit); }, _minmax: function (isMin, args) { args = Array.prototype.slice.call(args); switch(args.length) { case 0: throw { type: "Argument", message: "one or more arguments required" }; case 1: return args[0]; } var i, j, current, currentUnified, referenceUnified, unit, order = [], // elems only contains original argument values. values = {}; // key is the unit.toString() for unified tree.Dimension values, // value is the index into the order array. for (i = 0; i < args.length; i++) { current = args[i]; if (!(current instanceof tree.Dimension)) { order.push(current); continue; } currentUnified = current.unify(); unit = currentUnified.unit.toString(); j = values[unit]; if (j === undefined) { values[unit] = order.length; order.push(current); continue; } referenceUnified = order[j].unify(); if ( isMin && currentUnified.value < referenceUnified.value || !isMin && currentUnified.value > referenceUnified.value) { order[j] = current; } } if (order.length == 1) { return order[0]; } args = order.map(function (a) { return a.toCSS(this.env); }) .join(this.env.compress ? "," : ", "); return new(tree.Anonymous)((isMin ? "min" : "max") + "(" + args + ")"); }, min: function () { return this._minmax(true, arguments); }, max: function () { return this._minmax(false, arguments); }, argb: function (color) { return new(tree.Anonymous)(color.toARGB()); }, percentage: function (n) { return new(tree.Dimension)(n.value * 100, '%'); }, color: function (n) { if (n instanceof tree.Quoted) { var colorCandidate = n.value, returnColor; returnColor = tree.Color.fromKeyword(colorCandidate); if (returnColor) { return returnColor; } if (/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/.test(colorCandidate)) { return new(tree.Color)(colorCandidate.slice(1)); } throw { type: "Argument", message: "argument must be a color keyword or 3/6 digit hex e.g. #FFF" }; } else { throw { type: "Argument", message: "argument must be a string" }; } }, iscolor: function (n) { return this._isa(n, tree.Color); }, isnumber: function (n) { return this._isa(n, tree.Dimension); }, isstring: function (n) { return this._isa(n, tree.Quoted); }, iskeyword: function (n) { return this._isa(n, tree.Keyword); }, isurl: function (n) { return this._isa(n, tree.URL); }, ispixel: function (n) { return this.isunit(n, 'px'); }, ispercentage: function (n) { return this.isunit(n, '%'); }, isem: function (n) { return this.isunit(n, 'em'); }, isunit: function (n, unit) { return (n instanceof tree.Dimension) && n.unit.is(unit.value || unit) ? tree.True : tree.False; }, _isa: function (n, Type) { return (n instanceof Type) ? tree.True : tree.False; }, tint: function(color, amount) { return this.mix(this.rgb(255,255,255), color, amount); }, shade: function(color, amount) { return this.mix(this.rgb(0, 0, 0), color, amount); }, extract: function(values, index) { index = index.value - 1; // (1-based index) // handle non-array values as an array of length 1 // return 'undefined' if index is invalid return Array.isArray(values.value) ? values.value[index] : Array(values)[index]; }, length: function(values) { var n = Array.isArray(values.value) ? values.value.length : 1; return new tree.Dimension(n); }, "data-uri": function(mimetypeNode, filePathNode) { if (typeof window !== 'undefined') { return new tree.URL(filePathNode || mimetypeNode, this.currentFileInfo).eval(this.env); } var mimetype = mimetypeNode.value; var filePath = (filePathNode && filePathNode.value); var fs = require('fs'), path = require('path'), useBase64 = false; if (arguments.length < 2) { filePath = mimetype; } if (this.env.isPathRelative(filePath)) { if (this.currentFileInfo.relativeUrls) { filePath = path.join(this.currentFileInfo.currentDirectory, filePath); } else { filePath = path.join(this.currentFileInfo.entryPath, filePath); } } // detect the mimetype if not given if (arguments.length < 2) { var mime; try { mime = require('mime'); } catch (ex) { mime = tree._mime; } mimetype = mime.lookup(filePath); // use base 64 unless it's an ASCII or UTF-8 format var charset = mime.charsets.lookup(mimetype); useBase64 = ['US-ASCII', 'UTF-8'].indexOf(charset) < 0; if (useBase64) { mimetype += ';base64'; } } else { useBase64 = /;base64$/.test(mimetype); } var buf = fs.readFileSync(filePath); // IE8 cannot handle a data-uri larger than 32KB. If this is exceeded // and the --ieCompat flag is enabled, return a normal url() instead. var DATA_URI_MAX_KB = 32, fileSizeInKB = parseInt((buf.length / 1024), 10); if (fileSizeInKB >= DATA_URI_MAX_KB) { if (this.env.ieCompat !== false) { if (!this.env.silent) { console.warn("Skipped data-uri embedding of %s because its size (%dKB) exceeds IE8-safe %dKB!", filePath, fileSizeInKB, DATA_URI_MAX_KB); } return new tree.URL(filePathNode || mimetypeNode, this.currentFileInfo).eval(this.env); } } buf = useBase64 ? buf.toString('base64') : encodeURIComponent(buf); var uri = "\"data:" + mimetype + ',' + buf + "\""; return new(tree.URL)(new(tree.Anonymous)(uri)); }, "svg-gradient": function(direction) { function throwArgumentDescriptor() { throw { type: "Argument", message: "svg-gradient expects direction, start_color [start_position], [color position,]..., end_color [end_position]" }; } if (arguments.length < 3) { throwArgumentDescriptor(); } var stops = Array.prototype.slice.call(arguments, 1), gradientDirectionSvg, gradientType = "linear", rectangleDimension = 'x="0" y="0" width="1" height="1"', useBase64 = true, renderEnv = {compress: false}, returner, directionValue = direction.toCSS(renderEnv), i, color, position, positionValue, alpha; switch (directionValue) { case "to bottom": gradientDirectionSvg = 'x1="0%" y1="0%" x2="0%" y2="100%"'; break; case "to right": gradientDirectionSvg = 'x1="0%" y1="0%" x2="100%" y2="0%"'; break; case "to bottom right": gradientDirectionSvg = 'x1="0%" y1="0%" x2="100%" y2="100%"'; break; case "to top right": gradientDirectionSvg = 'x1="0%" y1="100%" x2="100%" y2="0%"'; break; case "ellipse": case "ellipse at center": gradientType = "radial"; gradientDirectionSvg = 'cx="50%" cy="50%" r="75%"'; rectangleDimension = 'x="-50" y="-50" width="101" height="101"'; break; default: throw { type: "Argument", message: "svg-gradient direction must be 'to bottom', 'to right', 'to bottom right', 'to top right' or 'ellipse at center'" }; } returner = '' + '' + '<' + gradientType + 'Gradient id="gradient" gradientUnits="userSpaceOnUse" ' + gradientDirectionSvg + '>'; for (i = 0; i < stops.length; i+= 1) { if (stops[i].value) { color = stops[i].value[0]; position = stops[i].value[1]; } else { color = stops[i]; position = undefined; } if (!(color instanceof tree.Color) || (!((i === 0 || i+1 === stops.length) && position === undefined) && !(position instanceof tree.Dimension))) { throwArgumentDescriptor(); } positionValue = position ? position.toCSS(renderEnv) : i === 0 ? "0%" : "100%"; alpha = color.alpha; returner += ''; } returner += '' + ''; if (useBase64) { try { returner = require('./encoder').encodeBase64(returner); // TODO browser implementation } catch(e) { useBase64 = false; } } returner = "'data:image/svg+xml" + (useBase64 ? ";base64" : "") + "," + returner + "'"; return new(tree.URL)(new(tree.Anonymous)(returner)); } }; // these static methods are used as a fallback when the optional 'mime' dependency is missing tree._mime = { // this map is intentionally incomplete // if you want more, install 'mime' dep _types: { '.htm' : 'text/html', '.html': 'text/html', '.gif' : 'image/gif', '.jpg' : 'image/jpeg', '.jpeg': 'image/jpeg', '.png' : 'image/png' }, lookup: function (filepath) { var ext = require('path').extname(filepath), type = tree._mime._types[ext]; if (type === undefined) { throw new Error('Optional dependency "mime" is required for ' + ext); } return type; }, charsets: { lookup: function (type) { // assumes all text types are UTF-8 return type && (/^text\//).test(type) ? 'UTF-8' : ''; } } }; // Math var mathFunctions = { // name, unit ceil: null, floor: null, sqrt: null, abs: null, tan: "", sin: "", cos: "", atan: "rad", asin: "rad", acos: "rad" }; function _math(fn, unit, n) { if (!(n instanceof tree.Dimension)) { throw { type: "Argument", message: "argument must be a number" }; } if (unit == null) { unit = n.unit; } else { n = n.unify(); } return new(tree.Dimension)(fn(parseFloat(n.value)), unit); } // ~ End of Math // Color Blending // ref: http://www.w3.org/TR/compositing-1 function colorBlend(mode, color1, color2) { var ab = color1.alpha, cb, // backdrop as = color2.alpha, cs, // source ar, cr, r = []; // result ar = as + ab * (1 - as); for (var i = 0; i < 3; i++) { cb = color1.rgb[i] / 255; cs = color2.rgb[i] / 255; cr = mode(cb, cs); if (ar) { cr = (as * cs + ab * (cb - as * (cb + cs - cr))) / ar; } r[i] = cr * 255; } return new(tree.Color)(r, ar); } var colorBlendMode = { multiply: function(cb, cs) { return cb * cs; }, screen: function(cb, cs) { return cb + cs - cb * cs; }, overlay: function(cb, cs) { cb *= 2; return (cb <= 1) ? colorBlendMode.multiply(cb, cs) : colorBlendMode.screen(cb - 1, cs); }, softlight: function(cb, cs) { var d = 1, e = cb; if (cs > 0.5) { e = 1; d = (cb > 0.25) ? Math.sqrt(cb) : ((16 * cb - 12) * cb + 4) * cb; } return cb - (1 - 2 * cs) * e * (d - cb); }, hardlight: function(cb, cs) { return colorBlendMode.overlay(cs, cb); }, difference: function(cb, cs) { return Math.abs(cb - cs); }, exclusion: function(cb, cs) { return cb + cs - 2 * cb * cs; }, // non-w3c functions: average: function(cb, cs) { return (cb + cs) / 2; }, negation: function(cb, cs) { return 1 - Math.abs(cb + cs - 1); } }; // ~ End of Color Blending tree.defaultFunc = { eval: function () { var v = this.value_, e = this.error_; if (e) { throw e; } if (v != null) { return v ? tree.True : tree.False; } }, value: function (v) { this.value_ = v; }, error: function (e) { this.error_ = e; }, reset: function () { this.value_ = this.error_ = null; } }; function initFunctions() { var f, tf = tree.functions; // math for (f in mathFunctions) { if (mathFunctions.hasOwnProperty(f)) { tf[f] = _math.bind(null, Math[f], mathFunctions[f]); } } // color blending for (f in colorBlendMode) { if (colorBlendMode.hasOwnProperty(f)) { tf[f] = colorBlend.bind(null, colorBlendMode[f]); } } // default f = tree.defaultFunc; tf["default"] = f.eval.bind(f); } initFunctions(); function hsla(color) { return tree.functions.hsla(color.h, color.s, color.l, color.a); } function scaled(n, size) { if (n instanceof tree.Dimension && n.unit.is('%')) { return parseFloat(n.value * size / 100); } else { return number(n); } } function number(n) { if (n instanceof tree.Dimension) { return parseFloat(n.unit.is('%') ? n.value / 100 : n.value); } else if (typeof(n) === 'number') { return n; } else { throw { error: "RuntimeError", message: "color functions take numbers as parameters" }; } } function clamp(val) { return Math.min(1, Math.max(0, val)); } tree.fround = function(env, value) { var p; if (env && (env.numPrecision != null)) { p = Math.pow(10, env.numPrecision); return Math.round(value * p) / p; } else { return value; } }; tree.functionCall = function(env, currentFileInfo) { this.env = env; this.currentFileInfo = currentFileInfo; }; tree.functionCall.prototype = tree.functions; })(require('./tree')); v1.6.3~dfsg/lib/less/encoder.js0000644000000000000000000000020312275460205015140 0ustar rootroot// base64 encoder implementation for node exports.encodeBase64 = function(str) { return new Buffer(str).toString('base64'); }; v1.6.3~dfsg/lib/less/browser.js0000644000000000000000000005177412275460205015227 0ustar rootroot// // browser.js - client-side engine // /*global less, window, document, XMLHttpRequest, location */ var isFileProtocol = /^(file|chrome(-extension)?|resource|qrc|app):/.test(location.protocol); less.env = less.env || (location.hostname == '127.0.0.1' || location.hostname == '0.0.0.0' || location.hostname == 'localhost' || (location.port && location.port.length > 0) || isFileProtocol ? 'development' : 'production'); var logLevel = { info: 2, errors: 1, none: 0 }; // The amount of logging in the javascript console. // 2 - Information and errors // 1 - Errors // 0 - None // Defaults to 2 less.logLevel = typeof(less.logLevel) != 'undefined' ? less.logLevel : logLevel.info; // Load styles asynchronously (default: false) // // This is set to `false` by default, so that the body // doesn't start loading before the stylesheets are parsed. // Setting this to `true` can result in flickering. // less.async = less.async || false; less.fileAsync = less.fileAsync || false; // Interval between watch polls less.poll = less.poll || (isFileProtocol ? 1000 : 1500); //Setup user functions if (less.functions) { for(var func in less.functions) { if (less.functions.hasOwnProperty(func)) { less.tree.functions[func] = less.functions[func]; } } } var dumpLineNumbers = /!dumpLineNumbers:(comments|mediaquery|all)/.exec(location.hash); if (dumpLineNumbers) { less.dumpLineNumbers = dumpLineNumbers[1]; } var typePattern = /^text\/(x-)?less$/; var cache = null; var fileCache = {}; function log(str, level) { if (less.env == 'development' && typeof(console) !== 'undefined' && less.logLevel >= level) { console.log('less: ' + str); } } function extractId(href) { return href.replace(/^[a-z-]+:\/+?[^\/]+/, '' ) // Remove protocol & domain .replace(/^\//, '' ) // Remove root / .replace(/\.[a-zA-Z]+$/, '' ) // Remove simple extension .replace(/[^\.\w-]+/g, '-') // Replace illegal characters .replace(/\./g, ':'); // Replace dots with colons(for valid id) } function errorConsole(e, rootHref) { var template = '{line} {content}'; var filename = e.filename || rootHref; var errors = []; var content = (e.type || "Syntax") + "Error: " + (e.message || 'There is an error in your .less file') + " in " + filename + " "; var errorline = function (e, i, classname) { if (e.extract[i] !== undefined) { errors.push(template.replace(/\{line\}/, (parseInt(e.line, 10) || 0) + (i - 1)) .replace(/\{class\}/, classname) .replace(/\{content\}/, e.extract[i])); } }; if (e.extract) { errorline(e, 0, ''); errorline(e, 1, 'line'); errorline(e, 2, ''); content += 'on line ' + e.line + ', column ' + (e.column + 1) + ':\n' + errors.join('\n'); } else if (e.stack) { content += e.stack; } log(content, logLevel.errors); } function createCSS(styles, sheet, lastModified) { // Strip the query-string var href = sheet.href || ''; // If there is no title set, use the filename, minus the extension var id = 'less:' + (sheet.title || extractId(href)); // If this has already been inserted into the DOM, we may need to replace it var oldCss = document.getElementById(id); var keepOldCss = false; // Create a new stylesheet node for insertion or (if necessary) replacement var css = document.createElement('style'); css.setAttribute('type', 'text/css'); if (sheet.media) { css.setAttribute('media', sheet.media); } css.id = id; if (css.styleSheet) { // IE try { css.styleSheet.cssText = styles; } catch (e) { throw new(Error)("Couldn't reassign styleSheet.cssText."); } } else { css.appendChild(document.createTextNode(styles)); // If new contents match contents of oldCss, don't replace oldCss keepOldCss = (oldCss !== null && oldCss.childNodes.length > 0 && css.childNodes.length > 0 && oldCss.firstChild.nodeValue === css.firstChild.nodeValue); } var head = document.getElementsByTagName('head')[0]; // If there is no oldCss, just append; otherwise, only append if we need // to replace oldCss with an updated stylesheet if (oldCss === null || keepOldCss === false) { var nextEl = sheet && sheet.nextSibling || null; if (nextEl) { nextEl.parentNode.insertBefore(css, nextEl); } else { head.appendChild(css); } } if (oldCss && keepOldCss === false) { oldCss.parentNode.removeChild(oldCss); } // Don't update the local store if the file wasn't modified if (lastModified && cache) { log('saving ' + href + ' to cache.', logLevel.info); try { cache.setItem(href, styles); cache.setItem(href + ':timestamp', lastModified); } catch(e) { //TODO - could do with adding more robust error handling log('failed to save', logLevel.errors); } } } function errorHTML(e, rootHref) { var id = 'less-error-message:' + extractId(rootHref || ""); var template = '
  • {content}
  • '; var elem = document.createElement('div'), timer, content, errors = []; var filename = e.filename || rootHref; var filenameNoPath = filename.match(/([^\/]+(\?.*)?)$/)[1]; elem.id = id; elem.className = "less-error-message"; content = '

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

    ' + '

    in ' + filenameNoPath + " "; var errorline = function (e, i, classname) { if (e.extract[i] !== undefined) { errors.push(template.replace(/\{line\}/, (parseInt(e.line, 10) || 0) + (i - 1)) .replace(/\{class\}/, classname) .replace(/\{content\}/, e.extract[i])); } }; if (e.extract) { errorline(e, 0, ''); errorline(e, 1, 'line'); errorline(e, 2, ''); content += 'on line ' + e.line + ', column ' + (e.column + 1) + ':

    ' + ''; } else if (e.stack) { content += '
    ' + e.stack.split('\n').slice(1).join('
    '); } elem.innerHTML = content; // CSS for error messages createCSS([ '.less-error-message ul, .less-error-message li {', 'list-style-type: none;', 'margin-right: 15px;', 'padding: 4px 0;', 'margin: 0;', '}', '.less-error-message label {', 'font-size: 12px;', 'margin-right: 15px;', 'padding: 4px 0;', 'color: #cc7777;', '}', '.less-error-message pre {', 'color: #dd6666;', 'padding: 4px 0;', 'margin: 0;', 'display: inline-block;', '}', '.less-error-message pre.line {', 'color: #ff0000;', '}', '.less-error-message h3 {', 'font-size: 20px;', 'font-weight: bold;', 'padding: 15px 0 5px 0;', 'margin: 0;', '}', '.less-error-message a {', 'color: #10a', '}', '.less-error-message .error {', 'color: red;', 'font-weight: bold;', 'padding-bottom: 2px;', 'border-bottom: 1px dashed red;', '}' ].join('\n'), { title: 'error-message' }); elem.style.cssText = [ "font-family: Arial, sans-serif", "border: 1px solid #e00", "background-color: #eee", "border-radius: 5px", "-webkit-border-radius: 5px", "-moz-border-radius: 5px", "color: #e00", "padding: 15px", "margin-bottom: 15px" ].join(';'); if (less.env == 'development') { timer = setInterval(function () { if (document.body) { if (document.getElementById(id)) { document.body.replaceChild(elem, document.getElementById(id)); } else { document.body.insertBefore(elem, document.body.firstChild); } clearInterval(timer); } }, 10); } } function error(e, rootHref) { if (!less.errorReporting || less.errorReporting === "html") { errorHTML(e, rootHref); } else if (less.errorReporting === "console") { errorConsole(e, rootHref); } else if (typeof less.errorReporting === 'function') { less.errorReporting("add", e, rootHref); } } function removeErrorHTML(path) { var node = document.getElementById('less-error-message:' + extractId(path)); if (node) { node.parentNode.removeChild(node); } } function removeErrorConsole(path) { //no action } function removeError(path) { if (!less.errorReporting || less.errorReporting === "html") { removeErrorHTML(path); } else if (less.errorReporting === "console") { removeErrorConsole(path); } else if (typeof less.errorReporting === 'function') { less.errorReporting("remove", path); } } function loadStyles(modifyVars) { var styles = document.getElementsByTagName('style'), style; for (var i = 0; i < styles.length; i++) { style = styles[i]; if (style.type.match(typePattern)) { var env = new less.tree.parseEnv(less), lessText = style.innerHTML || ''; env.filename = document.location.href.replace(/#.*$/, ''); if (modifyVars || less.globalVars) { env.useFileCache = true; } /*jshint loopfunc:true */ // use closure to store current value of i var callback = (function(style) { return function (e, cssAST) { if (e) { return error(e, "inline"); } var css = cssAST.toCSS(less); style.type = 'text/css'; if (style.styleSheet) { style.styleSheet.cssText = css; } else { style.innerHTML = css; } }; })(style); new(less.Parser)(env).parse(lessText, callback, {globalVars: less.globalVars, modifyVars: modifyVars}); } } } function extractUrlParts(url, baseUrl) { // urlParts[1] = protocol&hostname || / // urlParts[2] = / if path relative to host base // urlParts[3] = directories // urlParts[4] = filename // urlParts[5] = parameters var urlPartsRegex = /^((?:[a-z-]+:)?\/+?(?:[^\/\?#]*\/)|([\/\\]))?((?:[^\/\\\?#]*[\/\\])*)([^\/\\\?#]*)([#\?].*)?$/i, urlParts = url.match(urlPartsRegex), returner = {}, directories = [], i, baseUrlParts; if (!urlParts) { throw new Error("Could not parse sheet href - '"+url+"'"); } // Stylesheets in IE don't always return the full path if (!urlParts[1] || urlParts[2]) { baseUrlParts = baseUrl.match(urlPartsRegex); if (!baseUrlParts) { throw new Error("Could not parse page url - '"+baseUrl+"'"); } urlParts[1] = urlParts[1] || baseUrlParts[1] || ""; if (!urlParts[2]) { urlParts[3] = baseUrlParts[3] + urlParts[3]; } } if (urlParts[3]) { directories = urlParts[3].replace(/\\/g, "/").split("/"); // extract out . before .. so .. doesn't absorb a non-directory for(i = 0; i < directories.length; i++) { if (directories[i] === ".") { directories.splice(i, 1); i -= 1; } } for(i = 0; i < directories.length; i++) { if (directories[i] === ".." && i > 0) { directories.splice(i-1, 2); i -= 2; } } } returner.hostPart = urlParts[1]; returner.directories = directories; returner.path = urlParts[1] + directories.join("/"); returner.fileUrl = returner.path + (urlParts[4] || ""); returner.url = returner.fileUrl + (urlParts[5] || ""); return returner; } function pathDiff(url, baseUrl) { // diff between two paths to create a relative path var urlParts = extractUrlParts(url), baseUrlParts = extractUrlParts(baseUrl), i, max, urlDirectories, baseUrlDirectories, diff = ""; if (urlParts.hostPart !== baseUrlParts.hostPart) { return ""; } max = Math.max(baseUrlParts.directories.length, urlParts.directories.length); for(i = 0; i < max; i++) { if (baseUrlParts.directories[i] !== urlParts.directories[i]) { break; } } baseUrlDirectories = baseUrlParts.directories.slice(i); urlDirectories = urlParts.directories.slice(i); for(i = 0; i < baseUrlDirectories.length-1; i++) { diff += "../"; } for(i = 0; i < urlDirectories.length-1; i++) { diff += urlDirectories[i] + "/"; } return diff; } function getXMLHttpRequest() { if (window.XMLHttpRequest) { return new XMLHttpRequest(); } else { try { /*global ActiveXObject */ return new ActiveXObject("MSXML2.XMLHTTP.3.0"); } catch (e) { log("browser doesn't support AJAX.", logLevel.errors); return null; } } } function doXHR(url, type, callback, errback) { var xhr = getXMLHttpRequest(); var async = isFileProtocol ? less.fileAsync : less.async; if (typeof(xhr.overrideMimeType) === 'function') { xhr.overrideMimeType('text/css'); } log("XHR: Getting '" + url + "'", logLevel.info); xhr.open('GET', url, async); xhr.setRequestHeader('Accept', type || 'text/x-less, text/css; q=0.9, */*; q=0.5'); xhr.send(null); function handleResponse(xhr, callback, errback) { if (xhr.status >= 200 && xhr.status < 300) { callback(xhr.responseText, xhr.getResponseHeader("Last-Modified")); } else if (typeof(errback) === 'function') { errback(xhr.status, url); } } if (isFileProtocol && !less.fileAsync) { if (xhr.status === 0 || (xhr.status >= 200 && xhr.status < 300)) { callback(xhr.responseText); } else { errback(xhr.status, url); } } else if (async) { xhr.onreadystatechange = function () { if (xhr.readyState == 4) { handleResponse(xhr, callback, errback); } }; } else { handleResponse(xhr, callback, errback); } } function loadFile(originalHref, currentFileInfo, callback, env, modifyVars) { if (currentFileInfo && currentFileInfo.currentDirectory && !/^([a-z-]+:)?\//.test(originalHref)) { originalHref = currentFileInfo.currentDirectory + originalHref; } // sheet may be set to the stylesheet for the initial load or a collection of properties including // some env variables for imports var hrefParts = extractUrlParts(originalHref, window.location.href); var href = hrefParts.url; var newFileInfo = { currentDirectory: hrefParts.path, filename: href }; if (currentFileInfo) { newFileInfo.entryPath = currentFileInfo.entryPath; newFileInfo.rootpath = currentFileInfo.rootpath; newFileInfo.rootFilename = currentFileInfo.rootFilename; newFileInfo.relativeUrls = currentFileInfo.relativeUrls; } else { newFileInfo.entryPath = hrefParts.path; newFileInfo.rootpath = less.rootpath || hrefParts.path; newFileInfo.rootFilename = href; newFileInfo.relativeUrls = env.relativeUrls; } if (newFileInfo.relativeUrls) { if (env.rootpath) { newFileInfo.rootpath = extractUrlParts(env.rootpath + pathDiff(hrefParts.path, newFileInfo.entryPath)).path; } else { newFileInfo.rootpath = hrefParts.path; } } if (env.useFileCache && fileCache[href]) { try { var lessText = fileCache[href]; callback(null, lessText, href, newFileInfo, { lastModified: new Date() }); } catch (e) { callback(e, null, href); } return; } doXHR(href, env.mime, function (data, lastModified) { // per file cache fileCache[href] = data; // Use remote copy (re-parse) try { callback(null, data, href, newFileInfo, { lastModified: lastModified }); } catch (e) { callback(e, null, href); } }, function (status, url) { callback({ type: 'File', message: "'" + url + "' wasn't found (" + status + ")" }, null, href); }); } function loadStyleSheet(sheet, callback, reload, remaining, modifyVars) { var env = new less.tree.parseEnv(less); env.mime = sheet.type; if (modifyVars || less.globalVars) { env.useFileCache = true; } loadFile(sheet.href, null, function(e, data, path, newFileInfo, webInfo) { if (webInfo) { webInfo.remaining = remaining; var css = cache && cache.getItem(path), timestamp = cache && cache.getItem(path + ':timestamp'); if (!reload && timestamp && webInfo.lastModified && (new(Date)(webInfo.lastModified).valueOf() === new(Date)(timestamp).valueOf())) { // Use local copy createCSS(css, sheet); webInfo.local = true; callback(null, null, data, sheet, webInfo, path); return; } } //TODO add tests around how this behaves when reloading removeError(path); if (data) { env.currentFileInfo = newFileInfo; new(less.Parser)(env).parse(data, function (e, root) { if (e) { return callback(e, null, null, sheet); } try { callback(e, root, data, sheet, webInfo, path); } catch (e) { callback(e, null, null, sheet); } }, {modifyVars: modifyVars, globalVars: less.globalVars}); } else { callback(e, null, null, sheet, webInfo, path); } }, env, modifyVars); } function loadStyleSheets(callback, reload, modifyVars) { for (var i = 0; i < less.sheets.length; i++) { loadStyleSheet(less.sheets[i], callback, reload, less.sheets.length - (i + 1), modifyVars); } } function initRunningMode(){ if (less.env === 'development') { less.optimization = 0; less.watchTimer = setInterval(function () { if (less.watchMode) { loadStyleSheets(function (e, root, _, sheet, env) { if (e) { error(e, sheet.href); } else if (root) { createCSS(root.toCSS(less), sheet, env.lastModified); } }); } }, less.poll); } else { less.optimization = 3; } } // // Watch mode // less.watch = function () { if (!less.watchMode ){ less.env = 'development'; initRunningMode(); } this.watchMode = true; return true; }; less.unwatch = function () {clearInterval(less.watchTimer); this.watchMode = false; return false; }; if (/!watch/.test(location.hash)) { less.watch(); } if (less.env != 'development') { try { cache = (typeof(window.localStorage) === 'undefined') ? null : window.localStorage; } catch (_) {} } // // Get all tags with the 'rel' attribute set to "stylesheet/less" // var links = document.getElementsByTagName('link'); less.sheets = []; for (var i = 0; i < links.length; i++) { if (links[i].rel === 'stylesheet/less' || (links[i].rel.match(/stylesheet/) && (links[i].type.match(typePattern)))) { less.sheets.push(links[i]); } } // // With this function, it's possible to alter variables and re-render // CSS without reloading less-files // less.modifyVars = function(record) { less.refresh(false, record); }; less.refresh = function (reload, modifyVars) { var startTime, endTime; startTime = endTime = new Date(); loadStyleSheets(function (e, root, _, sheet, env) { if (e) { return error(e, sheet.href); } if (env.local) { log("loading " + sheet.href + " from cache.", logLevel.info); } else { log("parsed " + sheet.href + " successfully.", logLevel.info); createCSS(root.toCSS(less), sheet, env.lastModified); } log("css for " + sheet.href + " generated in " + (new Date() - endTime) + 'ms', logLevel.info); if (env.remaining === 0) { log("css generated in " + (new Date() - startTime) + 'ms', logLevel.info); } endTime = new Date(); }, reload, modifyVars); loadStyles(modifyVars); }; less.refreshStyles = loadStyles; less.Parser.fileLoader = loadFile; less.refresh(less.env === 'development'); v1.6.3~dfsg/lib/less/to-css-visitor.js0000644000000000000000000001743012275460205016440 0ustar rootroot(function (tree) { tree.toCSSVisitor = function(env) { this._visitor = new tree.visitor(this); this._env = env; }; tree.toCSSVisitor.prototype = { isReplacing: true, run: function (root) { return this._visitor.visit(root); }, visitRule: function (ruleNode, visitArgs) { if (ruleNode.variable) { return []; } return ruleNode; }, visitMixinDefinition: function (mixinNode, visitArgs) { // mixin definitions do not get eval'd - this means they keep state // so we have to clear that state here so it isn't used if toCSS is called twice mixinNode.frames = []; return []; }, visitExtend: function (extendNode, visitArgs) { return []; }, visitComment: function (commentNode, visitArgs) { if (commentNode.isSilent(this._env)) { return []; } return commentNode; }, visitMedia: function(mediaNode, visitArgs) { mediaNode.accept(this._visitor); visitArgs.visitDeeper = false; if (!mediaNode.rules.length) { return []; } return mediaNode; }, visitDirective: function(directiveNode, visitArgs) { if (directiveNode.currentFileInfo.reference && !directiveNode.isReferenced) { return []; } if (directiveNode.name === "@charset") { // Only output the debug info together with subsequent @charset definitions // a comment (or @media statement) before the actual @charset directive would // be considered illegal css as it has to be on the first line if (this.charset) { if (directiveNode.debugInfo) { var comment = new tree.Comment("/* " + directiveNode.toCSS(this._env).replace(/\n/g, "")+" */\n"); comment.debugInfo = directiveNode.debugInfo; return this._visitor.visit(comment); } return []; } this.charset = true; } return directiveNode; }, checkPropertiesInRoot: function(rules) { var ruleNode; for(var i = 0; i < rules.length; i++) { ruleNode = rules[i]; if (ruleNode instanceof tree.Rule && !ruleNode.variable) { throw { message: "properties must be inside selector blocks, they cannot be in the root.", index: ruleNode.index, filename: ruleNode.currentFileInfo ? ruleNode.currentFileInfo.filename : null}; } } }, visitRuleset: function (rulesetNode, visitArgs) { var rule, rulesets = []; if (rulesetNode.firstRoot) { this.checkPropertiesInRoot(rulesetNode.rules); } if (! rulesetNode.root) { if (rulesetNode.paths) { rulesetNode.paths = rulesetNode.paths .filter(function(p) { var i; if (p[0].elements[0].combinator.value === ' ') { p[0].elements[0].combinator = new(tree.Combinator)(''); } for(i = 0; i < p.length; i++) { if (p[i].getIsReferenced() && p[i].getIsOutput()) { return true; } } return false; }); } // Compile rules and rulesets var nodeRules = rulesetNode.rules, nodeRuleCnt = nodeRules ? nodeRules.length : 0; for (var i = 0; i < nodeRuleCnt; ) { rule = nodeRules[i]; if (rule && rule.rules) { // visit because we are moving them out from being a child rulesets.push(this._visitor.visit(rule)); nodeRules.splice(i, 1); nodeRuleCnt--; continue; } i++; } // accept the visitor to remove rules and refactor itself // then we can decide now whether we want it or not if (nodeRuleCnt > 0) { rulesetNode.accept(this._visitor); } else { rulesetNode.rules = null; } visitArgs.visitDeeper = false; nodeRules = rulesetNode.rules; if (nodeRules) { this._mergeRules(nodeRules); nodeRules = rulesetNode.rules; } if (nodeRules) { this._removeDuplicateRules(nodeRules); nodeRules = rulesetNode.rules; } // now decide whether we keep the ruleset if (nodeRules && nodeRules.length > 0 && rulesetNode.paths.length > 0) { rulesets.splice(0, 0, rulesetNode); } } else { rulesetNode.accept(this._visitor); visitArgs.visitDeeper = false; if (rulesetNode.firstRoot || (rulesetNode.rules && rulesetNode.rules.length > 0)) { rulesets.splice(0, 0, rulesetNode); } } if (rulesets.length === 1) { return rulesets[0]; } return rulesets; }, _removeDuplicateRules: function(rules) { if (!rules) { return; } // remove duplicates var ruleCache = {}, ruleList, rule, i; for(i = rules.length - 1; i >= 0 ; i--) { rule = rules[i]; if (rule instanceof tree.Rule) { if (!ruleCache[rule.name]) { ruleCache[rule.name] = rule; } else { ruleList = ruleCache[rule.name]; if (ruleList instanceof tree.Rule) { ruleList = ruleCache[rule.name] = [ruleCache[rule.name].toCSS(this._env)]; } var ruleCSS = rule.toCSS(this._env); if (ruleList.indexOf(ruleCSS) !== -1) { rules.splice(i, 1); } else { ruleList.push(ruleCSS); } } } } }, _mergeRules: function (rules) { if (!rules) { return; } var groups = {}, parts, rule, key; for (var i = 0; i < rules.length; i++) { rule = rules[i]; if ((rule instanceof tree.Rule) && rule.merge) { key = [rule.name, rule.important ? "!" : ""].join(","); if (!groups[key]) { groups[key] = []; } else { rules.splice(i--, 1); } groups[key].push(rule); } } Object.keys(groups).map(function (k) { parts = groups[k]; if (parts.length > 1) { rule = parts[0]; rule.value = new (tree.Value)(parts.map(function (p) { return p.value; })); } }); } }; })(require('./tree'));v1.6.3~dfsg/lib/less/colors.js0000644000000000000000000001100312275460205015022 0ustar rootroot(function (tree) { tree.colors = { 'aliceblue':'#f0f8ff', 'antiquewhite':'#faebd7', 'aqua':'#00ffff', 'aquamarine':'#7fffd4', 'azure':'#f0ffff', 'beige':'#f5f5dc', 'bisque':'#ffe4c4', 'black':'#000000', 'blanchedalmond':'#ffebcd', 'blue':'#0000ff', 'blueviolet':'#8a2be2', 'brown':'#a52a2a', 'burlywood':'#deb887', 'cadetblue':'#5f9ea0', 'chartreuse':'#7fff00', 'chocolate':'#d2691e', 'coral':'#ff7f50', 'cornflowerblue':'#6495ed', 'cornsilk':'#fff8dc', 'crimson':'#dc143c', 'cyan':'#00ffff', 'darkblue':'#00008b', 'darkcyan':'#008b8b', 'darkgoldenrod':'#b8860b', 'darkgray':'#a9a9a9', 'darkgrey':'#a9a9a9', 'darkgreen':'#006400', 'darkkhaki':'#bdb76b', 'darkmagenta':'#8b008b', 'darkolivegreen':'#556b2f', 'darkorange':'#ff8c00', 'darkorchid':'#9932cc', 'darkred':'#8b0000', 'darksalmon':'#e9967a', 'darkseagreen':'#8fbc8f', 'darkslateblue':'#483d8b', 'darkslategray':'#2f4f4f', 'darkslategrey':'#2f4f4f', 'darkturquoise':'#00ced1', 'darkviolet':'#9400d3', 'deeppink':'#ff1493', 'deepskyblue':'#00bfff', 'dimgray':'#696969', 'dimgrey':'#696969', 'dodgerblue':'#1e90ff', 'firebrick':'#b22222', 'floralwhite':'#fffaf0', 'forestgreen':'#228b22', 'fuchsia':'#ff00ff', 'gainsboro':'#dcdcdc', 'ghostwhite':'#f8f8ff', 'gold':'#ffd700', 'goldenrod':'#daa520', 'gray':'#808080', 'grey':'#808080', 'green':'#008000', 'greenyellow':'#adff2f', 'honeydew':'#f0fff0', 'hotpink':'#ff69b4', 'indianred':'#cd5c5c', 'indigo':'#4b0082', 'ivory':'#fffff0', 'khaki':'#f0e68c', 'lavender':'#e6e6fa', 'lavenderblush':'#fff0f5', 'lawngreen':'#7cfc00', 'lemonchiffon':'#fffacd', 'lightblue':'#add8e6', 'lightcoral':'#f08080', 'lightcyan':'#e0ffff', 'lightgoldenrodyellow':'#fafad2', 'lightgray':'#d3d3d3', 'lightgrey':'#d3d3d3', 'lightgreen':'#90ee90', 'lightpink':'#ffb6c1', 'lightsalmon':'#ffa07a', 'lightseagreen':'#20b2aa', 'lightskyblue':'#87cefa', 'lightslategray':'#778899', 'lightslategrey':'#778899', 'lightsteelblue':'#b0c4de', 'lightyellow':'#ffffe0', 'lime':'#00ff00', 'limegreen':'#32cd32', 'linen':'#faf0e6', 'magenta':'#ff00ff', 'maroon':'#800000', 'mediumaquamarine':'#66cdaa', 'mediumblue':'#0000cd', 'mediumorchid':'#ba55d3', 'mediumpurple':'#9370d8', 'mediumseagreen':'#3cb371', 'mediumslateblue':'#7b68ee', 'mediumspringgreen':'#00fa9a', 'mediumturquoise':'#48d1cc', 'mediumvioletred':'#c71585', 'midnightblue':'#191970', 'mintcream':'#f5fffa', 'mistyrose':'#ffe4e1', 'moccasin':'#ffe4b5', 'navajowhite':'#ffdead', 'navy':'#000080', 'oldlace':'#fdf5e6', 'olive':'#808000', 'olivedrab':'#6b8e23', 'orange':'#ffa500', 'orangered':'#ff4500', 'orchid':'#da70d6', 'palegoldenrod':'#eee8aa', 'palegreen':'#98fb98', 'paleturquoise':'#afeeee', 'palevioletred':'#d87093', 'papayawhip':'#ffefd5', 'peachpuff':'#ffdab9', 'peru':'#cd853f', 'pink':'#ffc0cb', 'plum':'#dda0dd', 'powderblue':'#b0e0e6', 'purple':'#800080', 'red':'#ff0000', 'rosybrown':'#bc8f8f', 'royalblue':'#4169e1', 'saddlebrown':'#8b4513', 'salmon':'#fa8072', 'sandybrown':'#f4a460', 'seagreen':'#2e8b57', 'seashell':'#fff5ee', 'sienna':'#a0522d', 'silver':'#c0c0c0', 'skyblue':'#87ceeb', 'slateblue':'#6a5acd', 'slategray':'#708090', 'slategrey':'#708090', 'snow':'#fffafa', 'springgreen':'#00ff7f', 'steelblue':'#4682b4', 'tan':'#d2b48c', 'teal':'#008080', 'thistle':'#d8bfd8', 'tomato':'#ff6347', 'turquoise':'#40e0d0', 'violet':'#ee82ee', 'wheat':'#f5deb3', 'white':'#ffffff', 'whitesmoke':'#f5f5f5', 'yellow':'#ffff00', 'yellowgreen':'#9acd32' }; })(require('./tree')); v1.6.3~dfsg/lib/less/import-visitor.js0000644000000000000000000001043412275460205016537 0ustar rootroot(function (tree) { tree.importVisitor = function(importer, finish, evalEnv) { this._visitor = new tree.visitor(this); this._importer = importer; this._finish = finish; this.env = evalEnv || new tree.evalEnv(); this.importCount = 0; }; tree.importVisitor.prototype = { isReplacing: true, run: function (root) { var error; try { // process the contents this._visitor.visit(root); } catch(e) { error = e; } this.isFinished = true; if (this.importCount === 0) { this._finish(error); } }, visitImport: function (importNode, visitArgs) { var importVisitor = this, evaldImportNode, inlineCSS = importNode.options.inline; if (!importNode.css || inlineCSS) { try { evaldImportNode = importNode.evalForImport(this.env); } catch(e){ if (!e.filename) { e.index = importNode.index; e.filename = importNode.currentFileInfo.filename; } // attempt to eval properly and treat as css importNode.css = true; // if that fails, this error will be thrown importNode.error = e; } if (evaldImportNode && (!evaldImportNode.css || inlineCSS)) { importNode = evaldImportNode; this.importCount++; var env = new tree.evalEnv(this.env, this.env.frames.slice(0)); if (importNode.options.multiple) { env.importMultiple = true; } this._importer.push(importNode.getPath(), importNode.currentFileInfo, importNode.options, function (e, root, imported, fullPath) { if (e && !e.filename) { e.index = importNode.index; e.filename = importNode.currentFileInfo.filename; } if (imported && !env.importMultiple) { importNode.skip = imported; } var subFinish = function(e) { importVisitor.importCount--; if (importVisitor.importCount === 0 && importVisitor.isFinished) { importVisitor._finish(e); } }; if (root) { importNode.root = root; importNode.importedFilename = fullPath; if (!inlineCSS && !importNode.skip) { new(tree.importVisitor)(importVisitor._importer, subFinish, env) .run(root); return; } } subFinish(); }); } } visitArgs.visitDeeper = false; return importNode; }, visitRule: function (ruleNode, visitArgs) { visitArgs.visitDeeper = false; return ruleNode; }, visitDirective: function (directiveNode, visitArgs) { this.env.frames.unshift(directiveNode); return directiveNode; }, visitDirectiveOut: function (directiveNode) { this.env.frames.shift(); }, visitMixinDefinition: function (mixinDefinitionNode, visitArgs) { this.env.frames.unshift(mixinDefinitionNode); return mixinDefinitionNode; }, visitMixinDefinitionOut: function (mixinDefinitionNode) { this.env.frames.shift(); }, visitRuleset: function (rulesetNode, visitArgs) { this.env.frames.unshift(rulesetNode); return rulesetNode; }, visitRulesetOut: function (rulesetNode) { this.env.frames.shift(); }, visitMedia: function (mediaNode, visitArgs) { this.env.frames.unshift(mediaNode.ruleset); return mediaNode; }, visitMediaOut: function (mediaNode) { this.env.frames.shift(); } }; })(require('./tree'));v1.6.3~dfsg/lib/less/join-selector-visitor.js0000644000000000000000000000316512275460205020005 0ustar rootroot(function (tree) { tree.joinSelectorVisitor = function() { this.contexts = [[]]; this._visitor = new tree.visitor(this); }; tree.joinSelectorVisitor.prototype = { run: function (root) { return this._visitor.visit(root); }, visitRule: function (ruleNode, visitArgs) { visitArgs.visitDeeper = false; }, visitMixinDefinition: function (mixinDefinitionNode, visitArgs) { visitArgs.visitDeeper = false; }, visitRuleset: function (rulesetNode, visitArgs) { var context = this.contexts[this.contexts.length - 1], paths = [], selectors; this.contexts.push(paths); if (! rulesetNode.root) { selectors = rulesetNode.selectors; if (selectors) { selectors = selectors.filter(function(selector) { return selector.getIsOutput(); }); rulesetNode.selectors = selectors.length ? selectors : (selectors = null); if (selectors) { rulesetNode.joinSelectors(paths, context, selectors); } } if (!selectors) { rulesetNode.rules = null; } rulesetNode.paths = paths; } }, visitRulesetOut: function (rulesetNode) { this.contexts.length = this.contexts.length - 1; }, visitMedia: function (mediaNode, visitArgs) { var context = this.contexts[this.contexts.length - 1]; mediaNode.rules[0].root = (context.length === 0 || context[0].multiMedia); } }; })(require('./tree'));v1.6.3~dfsg/lib/less/rhino.js0000644000000000000000000003341612275460205014654 0ustar rootroot/*jshint rhino:true, unused: false */ /*global name:true, less, loadStyleSheet, os */ function formatError(ctx, options) { options = options || {}; var message = ""; var extract = ctx.extract; var error = []; // var stylize = options.color ? require('./lessc_helper').stylize : function (str) { return str; }; var stylize = function (str) { return str; }; // only output a stack if it isn't a less error if (ctx.stack && !ctx.type) { return stylize(ctx.stack, 'red'); } if (!ctx.hasOwnProperty('index') || !extract) { return ctx.stack || ctx.message; } if (typeof(extract[0]) === 'string') { error.push(stylize((ctx.line - 1) + ' ' + extract[0], 'grey')); } if (typeof(extract[1]) === 'string') { var errorTxt = ctx.line + ' '; if (extract[1]) { errorTxt += extract[1].slice(0, ctx.column) + stylize(stylize(stylize(extract[1][ctx.column], 'bold') + extract[1].slice(ctx.column + 1), 'red'), 'inverse'); } error.push(errorTxt); } if (typeof(extract[2]) === 'string') { error.push(stylize((ctx.line + 1) + ' ' + extract[2], 'grey')); } error = error.join('\n') + stylize('', 'reset') + '\n'; message += stylize(ctx.type + 'Error: ' + ctx.message, 'red'); if (ctx.filename) { message += stylize(' in ', 'red') + ctx.filename + stylize(' on line ' + ctx.line + ', column ' + (ctx.column + 1) + ':', 'grey'); } message += '\n' + error; if (ctx.callLine) { message += stylize('from ', 'red') + (ctx.filename || '') + '/n'; message += stylize(ctx.callLine, 'grey') + ' ' + ctx.callExtract + '/n'; } return message; } function writeError(ctx, options) { options = options || {}; if (options.silent) { return; } print(formatError(ctx, options)); } function loadStyleSheet(sheet, callback, reload, remaining) { var endOfPath = Math.max(name.lastIndexOf('/'), name.lastIndexOf('\\')), sheetName = name.slice(0, endOfPath + 1) + sheet.href, contents = sheet.contents || {}, input = readFile(sheetName); input = input.replace(/^\xEF\xBB\xBF/, ''); contents[sheetName] = input; var parser = new less.Parser({ paths: [sheet.href.replace(/[\w\.-]+$/, '')], contents: contents }); parser.parse(input, function (e, root) { if (e) { return writeError(e); } try { callback(e, root, input, sheet, { local: false, lastModified: 0, remaining: remaining }, sheetName); } catch(e) { writeError(e); } }); } less.Parser.fileLoader = function (file, currentFileInfo, callback, env) { var href = file; if (currentFileInfo && currentFileInfo.currentDirectory && !/^\//.test(file)) { href = less.modules.path.join(currentFileInfo.currentDirectory, file); } var path = less.modules.path.dirname(href); var newFileInfo = { currentDirectory: path + '/', filename: href }; if (currentFileInfo) { newFileInfo.entryPath = currentFileInfo.entryPath; newFileInfo.rootpath = currentFileInfo.rootpath; newFileInfo.rootFilename = currentFileInfo.rootFilename; newFileInfo.relativeUrls = currentFileInfo.relativeUrls; } else { newFileInfo.entryPath = path; newFileInfo.rootpath = less.rootpath || path; newFileInfo.rootFilename = href; newFileInfo.relativeUrls = env.relativeUrls; } var j = file.lastIndexOf('/'); if(newFileInfo.relativeUrls && !/^(?:[a-z-]+:|\/)/.test(file) && j != -1) { var relativeSubDirectory = file.slice(0, j+1); newFileInfo.rootpath = newFileInfo.rootpath + relativeSubDirectory; // append (sub|sup) directory path of imported file } newFileInfo.currentDirectory = path; newFileInfo.filename = href; var data = null; try { data = readFile(href); } catch (e) { callback({ type: 'File', message: "'" + less.modules.path.basename(href) + "' wasn't found" }); return; } try { callback(null, data, href, newFileInfo, { lastModified: 0 }); } catch (e) { callback(e, null, href); } }; function writeFile(filename, content) { var fstream = new java.io.FileWriter(filename); var out = new java.io.BufferedWriter(fstream); out.write(content); out.close(); } // Command line integration via Rhino (function (args) { var options = { depends: false, compress: false, cleancss: false, max_line_len: -1, optimization: 1, silent: false, verbose: false, lint: false, paths: [], color: true, strictImports: false, rootpath: '', relativeUrls: false, ieCompat: true, strictMath: false, strictUnits: false }; var continueProcessing = true, currentErrorcode; var checkArgFunc = function(arg, option) { if (!option) { print(arg + " option requires a parameter"); continueProcessing = false; return false; } return true; }; var checkBooleanArg = function(arg) { var onOff = /^((on|t|true|y|yes)|(off|f|false|n|no))$/i.exec(arg); if (!onOff) { print(" unable to parse "+arg+" as a boolean. use one of on/t/true/y/yes/off/f/false/n/no"); continueProcessing = false; return false; } return Boolean(onOff[2]); }; var warningMessages = ""; var sourceMapFileInline = false; args = args.filter(function (arg) { var match = arg.match(/^-I(.+)$/); if (match) { options.paths.push(match[1]); return false; } match = arg.match(/^--?([a-z][0-9a-z-]*)(?:=(.*))?$/i); if (match) { arg = match[1]; } // was (?:=([^\s]*)), check! else { return arg; } switch (arg) { case 'v': case 'version': console.log("lessc " + less.version.join('.') + " (LESS Compiler) [JavaScript]"); continueProcessing = false; break; case 'verbose': options.verbose = true; break; case 's': case 'silent': options.silent = true; break; case 'l': case 'lint': options.lint = true; break; case 'strict-imports': options.strictImports = true; break; case 'h': case 'help': //TODO // require('../lib/less/lessc_helper').printUsage(); continueProcessing = false; break; case 'x': case 'compress': options.compress = true; break; case 'M': case 'depends': options.depends = true; break; case 'yui-compress': warningMessages += "yui-compress option has been removed. assuming clean-css."; options.cleancss = true; break; case 'clean-css': options.cleancss = true; break; case 'max-line-len': if (checkArgFunc(arg, match[2])) { options.maxLineLen = parseInt(match[2], 10); if (options.maxLineLen <= 0) { options.maxLineLen = -1; } } break; case 'no-color': options.color = false; break; case 'no-ie-compat': options.ieCompat = false; break; case 'no-js': options.javascriptEnabled = false; break; case 'include-path': if (checkArgFunc(arg, match[2])) { options.paths = match[2].split(os.type().match(/Windows/) ? ';' : ':') .map(function(p) { if (p) { // return path.resolve(process.cwd(), p); return p; } }); } break; case 'O0': options.optimization = 0; break; case 'O1': options.optimization = 1; break; case 'O2': options.optimization = 2; break; case 'line-numbers': if (checkArgFunc(arg, match[2])) { options.dumpLineNumbers = match[2]; } break; case 'source-map': if (!match[2]) { options.sourceMap = true; } else { options.sourceMap = match[2]; } break; case 'source-map-rootpath': if (checkArgFunc(arg, match[2])) { options.sourceMapRootpath = match[2]; } break; case 'source-map-basepath': if (checkArgFunc(arg, match[2])) { options.sourceMapBasepath = match[2]; } break; case 'source-map-map-inline': sourceMapFileInline = true; options.sourceMap = true; break; case 'source-map-less-inline': options.outputSourceFiles = true; break; case 'source-map-url': if (checkArgFunc(arg, match[2])) { options.sourceMapURL = match[2]; } break; case 'source-map-output-map-file': if (checkArgFunc(arg, match[2])) { options.writeSourceMap = function(sourceMapContent) { writeFile(match[2], sourceMapContent); }; } break; case 'rp': case 'rootpath': if (checkArgFunc(arg, match[2])) { options.rootpath = match[2].replace(/\\/g, '/'); } break; case "ru": case "relative-urls": options.relativeUrls = true; break; case "sm": case "strict-math": if (checkArgFunc(arg, match[2])) { options.strictMath = checkBooleanArg(match[2]); } break; case "su": case "strict-units": if (checkArgFunc(arg, match[2])) { options.strictUnits = checkBooleanArg(match[2]); } break; default: console.log('invalid option ' + arg); continueProcessing = false; } }); if (!continueProcessing) { return; } var name = args[0]; if (name && name != '-') { // name = path.resolve(process.cwd(), name); } var output = args[1]; var outputbase = args[1]; if (output) { options.sourceMapOutputFilename = output; // output = path.resolve(process.cwd(), output); if (warningMessages) { console.log(warningMessages); } } // options.sourceMapBasepath = process.cwd(); // options.sourceMapBasepath = ''; if (options.sourceMap === true) { console.log("output: " + output); if (!output && !sourceMapFileInline) { console.log("the sourcemap option only has an optional filename if the css filename is given"); return; } options.sourceMapFullFilename = options.sourceMapOutputFilename + ".map"; options.sourceMap = less.modules.path.basename(options.sourceMapFullFilename); } else if (options.sourceMap) { options.sourceMapOutputFilename = options.sourceMap; } if (!name) { console.log("lessc: no inout files"); console.log(""); // TODO // require('../lib/less/lessc_helper').printUsage(); currentErrorcode = 1; return; } // var ensureDirectory = function (filepath) { // var dir = path.dirname(filepath), // cmd, // existsSync = fs.existsSync || path.existsSync; // if (!existsSync(dir)) { // if (mkdirp === undefined) { // try {mkdirp = require('mkdirp');} // catch(e) { mkdirp = null; } // } // cmd = mkdirp && mkdirp.sync || fs.mkdirSync; // cmd(dir); // } // }; if (options.depends) { if (!outputbase) { console.log("option --depends requires an output path to be specified"); return; } console.log(outputbase + ": "); } if (!name) { console.log('No files present in the fileset'); quit(1); } var input = null; try { input = readFile(name, 'utf-8'); } catch (e) { console.log('lesscss: couldn\'t open file ' + name); quit(1); } options.filename = name; var result; try { var parser = new less.Parser(options); parser.parse(input, function (e, root) { if (e) { writeError(e, options); quit(1); } else { result = root.toCSS(options); if (output) { writeFile(output, result); console.log("Written to " + output); } else { print(result); } quit(0); } }); } catch(e) { writeError(e, options); quit(1); } console.log("done"); }(arguments)); v1.6.3~dfsg/lib/less/visitor.js0000644000000000000000000001021712275460205015226 0ustar rootroot(function (tree) { var _visitArgs = { visitDeeper: true }, _hasIndexed = false; function _noop(node) { return node; } function indexNodeTypes(parent, ticker) { // add .typeIndex to tree node types for lookup table var key, child; for (key in parent) { if (parent.hasOwnProperty(key)) { child = parent[key]; switch (typeof child) { case "function": // ignore bound functions directly on tree which do not have a prototype // or aren't nodes if (child.prototype && child.prototype.type) { child.prototype.typeIndex = ticker++; } break; case "object": ticker = indexNodeTypes(child, ticker); break; } } } return ticker; } tree.visitor = function(implementation) { this._implementation = implementation; this._visitFnCache = []; if (!_hasIndexed) { indexNodeTypes(tree, 1); _hasIndexed = true; } }; tree.visitor.prototype = { visit: function(node) { if (!node) { return node; } var nodeTypeIndex = node.typeIndex; if (!nodeTypeIndex) { return node; } var visitFnCache = this._visitFnCache, impl = this._implementation, aryIndx = nodeTypeIndex << 1, outAryIndex = aryIndx | 1, func = visitFnCache[aryIndx], funcOut = visitFnCache[outAryIndex], visitArgs = _visitArgs, fnName; visitArgs.visitDeeper = true; if (!func) { fnName = "visit" + node.type; func = impl[fnName] || _noop; funcOut = impl[fnName + "Out"] || _noop; visitFnCache[aryIndx] = func; visitFnCache[outAryIndex] = funcOut; } if (func !== _noop) { var newNode = func.call(impl, node, visitArgs); if (impl.isReplacing) { node = newNode; } } if (visitArgs.visitDeeper && node && node.accept) { node.accept(this); } if (funcOut != _noop) { funcOut.call(impl, node); } return node; }, visitArray: function(nodes, nonReplacing) { if (!nodes) { return nodes; } var cnt = nodes.length, i; // Non-replacing if (nonReplacing || !this._implementation.isReplacing) { for (i = 0; i < cnt; i++) { this.visit(nodes[i]); } return nodes; } // Replacing var out = []; for (i = 0; i < cnt; i++) { var evald = this.visit(nodes[i]); if (!evald.splice) { out.push(evald); } else if (evald.length) { this.flatten(evald, out); } } return out; }, flatten: function(arr, out) { if (!out) { out = []; } var cnt, i, item, nestedCnt, j, nestedItem; for (i = 0, cnt = arr.length; i < cnt; i++) { item = arr[i]; if (!item.splice) { out.push(item); continue; } for (j = 0, nestedCnt = item.length; j < nestedCnt; j++) { nestedItem = item[j]; if (!nestedItem.splice) { out.push(nestedItem); } else if (nestedItem.length) { this.flatten(nestedItem, out); } } } return out; } }; })(require('./tree'));v1.6.3~dfsg/lib/less/index.js0000644000000000000000000002040612275460205014637 0ustar rootrootvar path = require('path'), url = require('url'), request, fs = require('fs'); var less = { version: [1, 6, 3], Parser: require('./parser').Parser, tree: require('./tree'), render: function (input, options, callback) { options = options || {}; if (typeof(options) === 'function') { callback = options; options = {}; } var parser = new(less.Parser)(options), ee; if (callback) { parser.parse(input, function (e, root) { try { callback(e, root && root.toCSS && root.toCSS(options)); } catch (err) { callback(err); } }); } else { ee = new (require('events').EventEmitter)(); process.nextTick(function () { parser.parse(input, function (e, root) { if (e) { return ee.emit('error', e); } try { ee.emit('success', root.toCSS(options)); } catch (err) { ee.emit('error', err); } }); }); return ee; } }, formatError: function(ctx, options) { options = options || {}; var message = ""; var extract = ctx.extract; var error = []; var stylize = options.color ? require('./lessc_helper').stylize : function (str) { return str; }; // only output a stack if it isn't a less error if (ctx.stack && !ctx.type) { return stylize(ctx.stack, 'red'); } if (!ctx.hasOwnProperty('index') || !extract) { return ctx.stack || ctx.message; } if (typeof(extract[0]) === 'string') { error.push(stylize((ctx.line - 1) + ' ' + extract[0], 'grey')); } if (typeof(extract[1]) === 'string') { var errorTxt = ctx.line + ' '; if (extract[1]) { errorTxt += extract[1].slice(0, ctx.column) + stylize(stylize(stylize(extract[1][ctx.column], 'bold') + extract[1].slice(ctx.column + 1), 'red'), 'inverse'); } error.push(errorTxt); } if (typeof(extract[2]) === 'string') { error.push(stylize((ctx.line + 1) + ' ' + extract[2], 'grey')); } error = error.join('\n') + stylize('', 'reset') + '\n'; message += stylize(ctx.type + 'Error: ' + ctx.message, 'red'); if (ctx.filename) { message += stylize(' in ', 'red') + ctx.filename + stylize(' on line ' + ctx.line + ', column ' + (ctx.column + 1) + ':', 'grey'); } message += '\n' + error; if (ctx.callLine) { message += stylize('from ', 'red') + (ctx.filename || '') + '/n'; message += stylize(ctx.callLine, 'grey') + ' ' + ctx.callExtract + '/n'; } return message; }, writeError: function (ctx, options) { options = options || {}; if (options.silent) { return; } console.error(less.formatError(ctx, options)); } }; require('./tree/color'); require('./tree/directive'); require('./tree/operation'); require('./tree/dimension'); require('./tree/keyword'); require('./tree/variable'); require('./tree/ruleset'); require('./tree/element'); require('./tree/selector'); require('./tree/quoted'); require('./tree/expression'); require('./tree/rule'); require('./tree/call'); require('./tree/url'); require('./tree/alpha'); require('./tree/import'); require('./tree/mixin'); require('./tree/comment'); require('./tree/anonymous'); require('./tree/value'); require('./tree/javascript'); require('./tree/assignment'); require('./tree/condition'); require('./tree/paren'); require('./tree/media'); require('./tree/unicode-descriptor'); require('./tree/negative'); require('./tree/extend'); var isUrlRe = /^(?:https?:)?\/\//i; less.Parser.fileLoader = function (file, currentFileInfo, callback, env) { var pathname, dirname, data, newFileInfo = { relativeUrls: env.relativeUrls, entryPath: currentFileInfo.entryPath, rootpath: currentFileInfo.rootpath, rootFilename: currentFileInfo.rootFilename }; function handleDataAndCallCallback(data) { var j = file.lastIndexOf('/'); // Pass on an updated rootpath if path of imported file is relative and file // is in a (sub|sup) directory // // Examples: // - If path of imported file is 'module/nav/nav.less' and rootpath is 'less/', // then rootpath should become 'less/module/nav/' // - If path of imported file is '../mixins.less' and rootpath is 'less/', // then rootpath should become 'less/../' if(newFileInfo.relativeUrls && !/^(?:[a-z-]+:|\/)/.test(file) && j != -1) { var relativeSubDirectory = file.slice(0, j+1); newFileInfo.rootpath = newFileInfo.rootpath + relativeSubDirectory; // append (sub|sup) directory path of imported file } newFileInfo.currentDirectory = pathname.replace(/[^\\\/]*$/, ""); newFileInfo.filename = pathname; callback(null, data, pathname, newFileInfo); } var isUrl = isUrlRe.test( file ); if (isUrl || isUrlRe.test(currentFileInfo.currentDirectory)) { if (request === undefined) { try { request = require('request'); } catch(e) { request = null; } } if (!request) { callback({ type: 'File', message: "optional dependency 'request' required to import over http(s)\n" }); return; } var urlStr = isUrl ? file : url.resolve(currentFileInfo.currentDirectory, file), urlObj = url.parse(urlStr); request.get({uri: urlStr, strictSSL: !env.insecure }, function (error, res, body) { if (res.statusCode === 404) { callback({ type: 'File', message: "resource '" + urlStr + "' was not found\n" }); return; } if (!body) { console.error( 'Warning: Empty body (HTTP '+ res.statusCode + ') returned by "' + urlStr +'"' ); } if (error) { callback({ type: 'File', message: "resource '" + urlStr + "' gave this Error:\n "+ error +"\n" }); } pathname = urlStr; dirname = urlObj.protocol +'//'+ urlObj.host + urlObj.pathname.replace(/[^\/]*$/, ''); handleDataAndCallCallback(body); }); } else { var paths = [currentFileInfo.currentDirectory].concat(env.paths); paths.push('.'); if (env.syncImport) { for (var i = 0; i < paths.length; i++) { try { pathname = path.join(paths[i], file); fs.statSync(pathname); break; } catch (e) { pathname = null; } } if (!pathname) { callback({ type: 'File', message: "'" + file + "' wasn't found" }); return; } try { data = fs.readFileSync(pathname, 'utf-8'); handleDataAndCallCallback(data); } catch (e) { callback(e); } } else { (function tryPathIndex(i) { if (i < paths.length) { pathname = path.join(paths[i], file); fs.stat(pathname, function (err) { if (err) { tryPathIndex(i + 1); } else { fs.readFile(pathname, 'utf-8', function(e, data) { if (e) { callback(e); } handleDataAndCallCallback(data); }); } }); } else { callback({ type: 'File', message: "'" + file + "' wasn't found" }); } }(0)); } } }; require('./env'); require('./functions'); require('./colors'); require('./visitor.js'); require('./import-visitor.js'); require('./extend-visitor.js'); require('./join-selector-visitor.js'); require('./to-css-visitor.js'); require('./source-map-output.js'); for (var k in less) { if (less.hasOwnProperty(k)) { exports[k] = less[k]; }} v1.6.3~dfsg/.gitignore0000644000000000000000000000033112275460205013441 0ustar rootroot# OS and IDE .emacs* *.flymake *~ .#* .idea *.sublime-* # npm node_modules npm-debug.log # project-specific tmp test/browser/less.js test/sourcemaps/*.map test/sourcemaps/*.css # grunt .grunt # gradle .gradle out v1.6.3~dfsg/package.json0000644000000000000000000000336112275460205013745 0ustar rootroot{ "name": "less", "version": "1.6.3", "description": "Leaner CSS", "homepage": "http://lesscss.org", "author": { "name": "Alexis Sellier", "email": "self@cloudhead.net" }, "contributors": [ "The Core Less Team" ], "bugs": { "url": "https://github.com/less/less.js/issues" }, "repository": { "type": "git", "url": "https://github.com/less/less.js.git" }, "licenses": [ { "type": "Apache v2", "url": "https://github.com/less/less.js/blob/master/LICENSE" } ], "bin": { "lessc": "./bin/lessc" }, "main": "./lib/less/index", "directories": { "test": "./test" }, "jam": { "main": "./dist/less-1.6.3.js" }, "engines": { "node": ">=0.4.2" }, "scripts": { "test": "grunt test" }, "optionalDependencies": { "mime": "1.2.x", "request": ">=2.12.0", "mkdirp": "~0.3.5", "clean-css": "2.0.x", "source-map": "0.1.x" }, "devDependencies": { "diff": "~1.0", "grunt": "~0.4.1", "grunt-contrib-clean": "~0.5.0", "grunt-contrib-concat": "~0.3.0", "grunt-contrib-connect": "~0.3.0", "grunt-contrib-jasmine": "~0.5.2", "grunt-contrib-jshint": "~0.7.2", "grunt-contrib-uglify": "~0.2.7", "grunt-shell": "~0.3.1", "http-server": "~0.5.5", "matchdep": "~0.1.2", "time-grunt": "~0.1.1" }, "keywords": [ "compile less", "css nesting", "css variable", "css", "gradients css", "gradients css3", "less compiler", "less css", "less mixins", "less", "less.js", "lesscss", "mixins", "nested css", "parser", "preprocessor", "bootstrap css", "bootstrap less", "style", "styles", "stylesheet", "variables in css", "css less" ] }v1.6.3~dfsg/bower.json0000644000000000000000000000040112275460205013460 0ustar rootroot{ "name": "less", "version": "1.6.3", "main": "./dist/less-1.6.3.js", "ignore": [ "**/.*", "benchmark", "bin", "build", "lib", "test", "*.md", "LICENSE", "Gruntfile.js", "package.json", "bower.json" ] } v1.6.3~dfsg/build/0000755000000000000000000000000012275460205012553 5ustar rootrootv1.6.3~dfsg/build/README.md0000644000000000000000000002122512275460205014034 0ustar rootroot# [Less.js v<%= pkg.version %>](http://lesscss.org) > The **dynamic** stylesheet language. [http://lesscss.org](http://lesscss.org). This is the JavaScript, and now official, stable version of LESS. ## Getting Started Options for adding Less.js to your project: * Install with [NPM](https://npmjs.org/): `npm install less` * [Download the latest release][download] * Clone the repo: `git clone git://github.com/less/less.js.git` ## Feature Highlights LESS extends CSS with dynamic features such as: * [nesting](#nesting) * [variables](#variables) * [operations](#operations) * [mixins](#mixins) * [extend](#extend) (selector inheritance) To learn about the many other features Less.js has to offer please visit [http://lesscss.org](http://lesscss.org) and [the Less.js wiki][wiki] ### Examples #### nesting Take advantage of nesting to make code more readable and maintainable. This: ```less .nav > li > a { border: 1px solid #f5f5f5; &:hover { border-color: #ddd; } } ``` renders to: ```css .nav > li > a { border: 1px solid #f5f5f5; } .nav > li > a:hover { border-color: #ddd; } ``` #### variables Updated commonly used values from a single location. ```less // Variables ("inline" comments like this can be used) @link-color: #428bca; // appears as "sea blue" /* Or "block comments" that span multiple lines, like this */ a { color: @link-color; // use the variable in styles } ``` Variables can also be used in `@import` statements, URLs, selector names, and more. #### operations Continuing with the same example above, we can use our variables even easier to maintain with _operations_, which enables the use of addition, subraction, multiplication and division in your styles: ```less // Variables @link-color: #428bca; @link-color-hover: darken(@link-color, 10%); // Styles a { color: @link-color; } a:hover { color: @link-color-hover; } ``` renders to: ```css a { color: #428bca; } a:hover { color: #3071a9; } ``` #### mixins ##### "implicit" mixins Mixins enable you to apply the styles of one selector inside another selector like this: ```less // Variables @link-color: #428bca; // Any "regular" class... .link { color: @link-color; } a { font-weight: bold; .link; // ...can be used as an "implicit" mixin } ``` renders to: ```css .link { color: #428bca; } a { font-weight: bold; color: #428bca; } ``` So any selector can be an "implicit mixin". We'll show you a DRYer way to do this below. ##### parametric mixins Mixins can also accept parameters: ```less // Transition mixin .transition(@transition) { -webkit-transition: @transition; -moz-transition: @transition; -o-transition: @transition; transition: @transition; } ``` used like this: ```less // Variables @link-color: #428bca; @link-color-hover: darken(@link-color, 10%); //Transition mixin would be anywhere here a { font-weight: bold; color: @link-color; .transition(color .2s ease-in-out); // Hover state &:hover { color: @link-color-hover; } } ``` renders to: ```css a { font-weight: bold; color: #428bca; -webkit-transition: color 0.2s ease-in-out; -moz-transition: color 0.2s ease-in-out; -o-transition: color 0.2s ease-in-out; transition: color 0.2s ease-in-out; } a:hover { color: #3071a9; } ``` #### extend The `extend` feature can be thought of as the _inverse_ of mixins. It accomplishes the goal of "borrowing styles", but rather than copying all the rules of _Selector A_ over to _Selector B_, `extend` copies the name of the _inheriting selector_ (_Selector B_) over to the _extending selector_ (_Selector A_). So continuing with the example used for [mixins](#mixins) above, extend works like this: ```less // Variables @link-color: #428bca; .link { color: @link-color; } a:extend(.link) { font-weight: bold; } // Can also be written as a { &:extend(.link); font-weight: bold; } ``` renders to: ```css .link, a { color: #428bca; } a { font-weight: bold; } ``` ## Usage ### Compiling and Parsing Invoke the compiler from node: ```javascript var less = require('less'); less.render('.class { width: (1 + 1) }', function (e, css) { console.log(css); }); ``` Outputs: ```css .class { width: 2; } ``` You may also manually invoke the parser and compiler: ```javascript var parser = new(less.Parser); parser.parse('.class { width: (1 + 1) }', function (err, tree) { if (err) { return console.error(err) } console.log(tree.toCSS()); }); ``` ### Configuration You may also pass options to the compiler: ```javascript var parser = new(less.Parser)({ paths: ['.', './src/less'], // Specify search paths for @import directives filename: 'style.less' // Specify a filename, for better error messages }); parser.parse('.class { width: (1 + 1) }', function (e, tree) { tree.toCSS({ compress: true }); // Minify CSS output }); ``` ## More information For general information on the language, configuration options or usage visit [lesscss.org](http://lesscss.org) or [the less wiki][wiki]. Here are other resources for using Less.js: * [stackoverflow.com][so] is a great place to get answers about Less. * [node.js tools](https://github.com/less/less.js/wiki/Converting-LESS-to-CSS) for converting Less to CSS * [GUI compilers for Less](https://github.com/less/less.js/wiki/GUI-compilers-that-use-LESS.js) * [Less.js Issues][issues] for reporting bugs ## Contributing Please read [CONTRIBUTING.md](./CONTRIBUTING.md). Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/). ### Reporting Issues Before opening any issue, please search for existing issues and read the [Issue Guidelines](https://github.com/necolas/issue-guidelines), written by [Nicolas Gallagher](https://github.com/necolas/). After that if you find a bug or would like to make feature request, [please open a new issue][issues]. Please report documentation issues in [the documentation project](https://github.com/less/less-docs). ### Development #### Install Less.js Start by either [downloading this project][download] manually, or in the command line: ```shell git clone https://github.com/less/less.js.git "less" ``` and then `cd less`. #### Install dependencies To install all the dependencies for less development, run: ```shell npm install ``` If you haven't run grunt before, install grunt-cli globally so you can just run `grunt` ```shell npm install grunt-cli -g ``` You should now be able to build Less.js, run tests, benchmarking, and other tasks listed in the Gruntfile. ## Using Less.js Grunt Tests, benchmarking and building is done using Grunt `<%= pkg.devDependencies.grunt %>`. If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to install and use Grunt plugins, which are necessary for development with Less.js. The Less.js [Gruntfile](Gruntfile.js) is configured with the following "convenience tasks" : #### test - `grunt` Runs jshint, nodeunit and headless jasmine tests using [phantomjs](http://code.google.com/p/phantomjs/). You must have phantomjs installed for the jasmine tests to run. #### test - `grunt benchmark` Runs the benchmark suite. #### build for testing browser - 'grunt browser' This builds less.js and puts it in 'test/browser/less.js' #### build - `grunt stable | grunt beta | grunt alpha` Builds Less.js from from the `/lib/less` source files. This is done by the developer releasing a new release, do not do this if you are creating a pull request. #### readme - `grunt readme` Build the README file from [a template](build/README.md) to ensure that metadata is up-to-date and (more likely to be) correct. Please review the [Gruntfile](Gruntfile.js) to become acquainted with the other available tasks. **Please note** that if you have any issues installing dependencies or running any of the Gruntfile commands, please make sure to uninstall any previous versions, both in the local node_modules directory, and clear your global npm cache, and then try running `npm install` again. After that if you still have issues, please let us know about it so we can help. ## Release History See the [changelog](CHANGELOG.md) ## [License](LICENSE) Copyright (c) 2009-<%= grunt.template.today("yyyy") %> [Alexis Sellier](http://cloudhead.io/) & The Core Less Team Licensed under the [Apache License](LICENSE). [so]: http://stackoverflow.com/questions/tagged/twitter-bootstrap+less "StackOverflow.com" [issues]: https://github.com/less/less.js/issues "GitHub Issues for Less.js" [wiki]: https://github.com/less/less.js/wiki "The official wiki for Less.js" [download]: https://github.com/less/less.js/zipball/master "Download Less.js"v1.6.3~dfsg/build/browser-header.js0000644000000000000000000000027012275460205016021 0ustar rootrootif (typeof(window.less) === 'undefined' || typeof(window.less.nodeType) !== 'undefined') { window.less = {}; } less = window.less; tree = window.less.tree = {}; less.mode = 'browser'; v1.6.3~dfsg/build/rhino-header.js0000644000000000000000000000023612275460205015457 0ustar rootrootif (typeof(window) === 'undefined') { less = {} } else { less = window.less = {} } tree = less.tree = {}; less.mode = 'rhino'; v1.6.3~dfsg/build/build.yml0000644000000000000000000001113512275460205014376 0ustar rootroot### # NOTICE: # this file is specifically for controlling # paths for Less.js source files, as well as # the order in which source files are # concatenated. # # Please do not add paths for anything else # to this file. All other paths for testing, # benchmarking and so on should be controlled # in the Gruntfile. ### # Less.js Lib lib: lib/less lib_source_map: 'lib/source-map' # ================================= # General # ================================= prepend: browser: ['build/require.js', 'build/browser-header.js'] rhino: ['build/require-rhino.js', 'build/rhino-header.js', 'build/rhino-modules.js'] append: amd: build/amd.js browser: <%= build.lib %>/browser.js rhino: <%= build.lib %>/rhino.js # ================================= # Core less files # ================================= # <%= build.less.* %> less: parser : <%= build.lib %>/parser.js functions : <%= build.lib %>/functions.js colors : <%= build.lib %>/colors.js tree : <%= build.lib %>/tree.js treedir : <%= build.lib %>/tree/*.js # glob all files in ./lib/less/tree directory env : <%= build.lib %>/env.js visitor : <%= build.lib %>/visitor.js import_visitor : <%= build.lib %>/import-visitor.js join : <%= build.lib %>/join-selector-visitor.js to_css_visitor : <%= build.lib %>/to-css-visitor.js extend_visitor : <%= build.lib %>/extend-visitor.js browser : <%= build.lib %>/browser.js source_map_output: <%= build.lib %>/source-map-output.js # ================================= # Browser build # ================================= # <%= build.browser %> browser: # prepend utils - <%= build.prepend.browser %> # core - <%= build.less.parser %> - <%= build.less.functions %> - <%= build.less.colors %> - <%= build.less.tree %> - <%= build.less.treedir %> # glob all files - <%= build.less.env %> - <%= build.less.visitor %> - <%= build.less.import_visitor %> - <%= build.less.join %> - <%= build.less.to_css_visitor %> - <%= build.less.extend_visitor %> - <%= build.less.source_map_output %> # append browser-specific code - <%= build.append.browser %> - <%= build.append.amd %> # ================================= # Rhino build # ================================= # <%= build.rhino %> rhino: # prepend utils - <%= build.prepend.rhino %> # core - <%= build.less.parser %> - <%= build.less.functions %> - <%= build.less.colors %> - <%= build.less.tree %> - <%= build.less.treedir %> # glob all files - <%= build.less.env %> - <%= build.less.visitor %> - <%= build.less.import_visitor %> - <%= build.less.join %> - <%= build.less.to_css_visitor %> - <%= build.less.extend_visitor %> - <%= build.less.source_map_output %> - <%= build.source_map %> # <%= build.rhinolessc %> rhinolessc: - <%= build.append.rhino %> # ================================= # Tree files # ================================= # <%= build.tree %> # Technically listing the array out this way isn't # necessary since we can glob the files in alphabetical # order anyway. But this gives you control over the order # the files are used, and allows targeting of individual # files directly in the Gruntfile. But be we can just # remove this if files can be concatenated in any order. tree: - <%= build.lib %>/tree/alpha.js - <%= build.lib %>/tree/anonymous.js - <%= build.lib %>/tree/assignment.js - <%= build.lib %>/tree/call.js - <%= build.lib %>/tree/color.js - <%= build.lib %>/tree/comment.js - <%= build.lib %>/tree/condition.js - <%= build.lib %>/tree/dimension.js - <%= build.lib %>/tree/directive.js - <%= build.lib %>/tree/element.js - <%= build.lib %>/tree/expression.js - <%= build.lib %>/tree/extend.js - <%= build.lib %>/tree/import.js - <%= build.lib %>/tree/javascript.js - <%= build.lib %>/tree/keyword.js - <%= build.lib %>/tree/media.js - <%= build.lib %>/tree/mixin.js - <%= build.lib %>/tree/negative.js - <%= build.lib %>/tree/operation.js - <%= build.lib %>/tree/paren.js - <%= build.lib %>/tree/quoted.js - <%= build.lib %>/tree/rule.js - <%= build.lib %>/tree/ruleset.js - <%= build.lib %>/tree/selector.js - <%= build.lib %>/tree/unicode-descriptor.js - <%= build.lib %>/tree/url.js - <%= build.lib %>/tree/value.js - <%= build.lib %>/tree/variable.js # ================================= # source-map build # ================================= # <%= build.source_map %> source_map: - <%= build.lib_source_map %>/source-map-header.js - <%= build.lib_source_map %>/source-map-0.1.31.js - <%= build.lib_source_map %>/source-map-footer.jsv1.6.3~dfsg/build/require.js0000644000000000000000000000016212275460205014564 0ustar rootroot// // Stub out `require` in the browser // function require(arg) { return window.less[arg.split('/')[1]]; }; v1.6.3~dfsg/build/require-rhino.js0000644000000000000000000000045212275460205015703 0ustar rootroot// // Stub out `require` in rhino // function require(arg) { var split = arg.split('/'); var resultModule = split.length == 1 ? less.modules[split[0]] : less[split[1]]; if (!resultModule) { throw { message: "Cannot find module '" + arg + "'"}; } return resultModule; } v1.6.3~dfsg/build/tasks/0000755000000000000000000000000012275460205013700 5ustar rootrootv1.6.3~dfsg/build/tasks/.gitkeep0000644000000000000000000000005112275460205015325 0ustar rootroot# Reserved for specialized Less.js tasks.v1.6.3~dfsg/build/rhino-modules.js0000644000000000000000000001075512275460205015706 0ustar rootroot(function() { console = function() { var stdout = java.lang.System.out; var stderr = java.lang.System.err; function doLog(out, type) { return function() { var args = java.lang.reflect.Array.newInstance(java.lang.Object, arguments.length - 1); var format = arguments[0]; var conversionIndex = 0; // need to look for %d (integer) conversions because in Javascript all numbers are doubles for (var i = 1; i < arguments.length; i++) { var arg = arguments[i]; if (conversionIndex != -1) { conversionIndex = format.indexOf('%', conversionIndex); } if (conversionIndex >= 0 && conversionIndex < format.length) { var conversion = format.charAt(conversionIndex + 1); if (conversion === 'd' && typeof arg === 'number') { arg = new java.lang.Integer(new java.lang.Double(arg).intValue()); } conversionIndex++; } args[i-1] = arg; } try { out.println(type + java.lang.String.format(format, args)); } catch(ex) { stderr.println(ex); } } } return { log: doLog(stdout, ''), info: doLog(stdout, 'INFO: '), error: doLog(stderr, 'ERROR: '), warn: doLog(stderr, 'WARN: ') }; }(); less.modules = {}; less.modules.path = { join: function() { var parts = []; for (i in arguments) { parts = parts.concat(arguments[i].split(/\/|\\/)); } var result = []; for (i in parts) { var part = parts[i]; if (part === '..' && result.length > 0) { result.pop(); } else if (part === '' && result.length > 0) { // skip } else if (part !== '.') { if (part.slice(-1)==='\\' || part.slice(-1)==='/') { part = part.slice(0, -1); } result.push(part); } } return result.join('/'); }, dirname: function(p) { var path = p.split('/'); path.pop(); return path.join('/'); }, basename: function(p, ext) { var base = p.split('/').pop(); if (ext) { var index = base.lastIndexOf(ext); if (base.length === index + ext.length) { base = base.substr(0, index); } } return base; }, extname: function(p) { var index = p.lastIndexOf('.'); return index > 0 ? p.substring(index) : ''; } }; less.modules.fs = { readFileSync: function(name) { // read a file into a byte array var file = new java.io.File(name); var stream = new java.io.FileInputStream(file); var buffer = []; var c; while ((c = stream.read()) != -1) { buffer.push(c); } stream.close(); return { length: buffer.length, toString: function(enc) { if (enc === 'base64') { return encodeBase64Bytes(buffer); } else if (enc) { return java.lang.String["(byte[],java.lang.String)"](buffer, enc); } else { return java.lang.String["(byte[])"](buffer); } } }; } }; less.encoder = { encodeBase64: function(str) { return encodeBase64String(str); } }; // --------------------------------------------------------------------------------------------- // private helper functions // --------------------------------------------------------------------------------------------- function encodeBase64Bytes(bytes) { // requires at least a JRE Platform 6 (or JAXB 1.0 on the classpath) return javax.xml.bind.DatatypeConverter.printBase64Binary(bytes) } function encodeBase64String(str) { return encodeBase64Bytes(new java.lang.String(str).getBytes()); } })(); v1.6.3~dfsg/build/amd.js0000644000000000000000000000021512275460205013650 0ustar rootroot// amd.js // // Define Less as an AMD module. if (typeof define === "function" && define.amd) { define(function () { return less; } ); } v1.6.3~dfsg/gradlew0000755000000000000000000001173012275460205013031 0ustar rootroot#!/usr/bin/env bash ############################################################################## ## ## Gradle start up script for UN*X ## ############################################################################## # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS="" APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" warn ( ) { echo "$*" } die ( ) { echo echo "$*" echo exit 1 } # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false case "`uname`" in CYGWIN* ) cygwin=true ;; Darwin* ) darwin=true ;; MINGW* ) msys=true ;; esac # For Cygwin, ensure paths are in UNIX format before anything is touched. if $cygwin ; then [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` fi # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" # Need this for relative symlinks. while [ -h "$PRG" ] ; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '/.*' > /dev/null; then PRG="$link" else PRG=`dirname "$PRG"`"/$link" fi done SAVED="`pwd`" cd "`dirname \"$PRG\"`/" >&- APP_HOME="`pwd -P`" cd "$SAVED" >&- CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD="$JAVA_HOME/jre/sh/java" else JAVACMD="$JAVA_HOME/bin/java" fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else JAVACMD="java" which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi # Increase the maximum file descriptors if we can. if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then MAX_FD="$MAX_FD_LIMIT" fi ulimit -n $MAX_FD if [ $? -ne 0 ] ; then warn "Could not set maximum file descriptor limit: $MAX_FD" fi else warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" fi fi # For Darwin, add options to specify how the application appears in the dock if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi # For Cygwin, switch paths to Windows format before running java if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` SEP="" for dir in $ROOTDIRSRAW ; do ROOTDIRS="$ROOTDIRS$SEP$dir" SEP="|" done OURCYGPATTERN="(^($ROOTDIRS))" # Add a user-defined pattern to the cygpath arguments if [ "$GRADLE_CYGPATTERN" != "" ] ; then OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" fi # Now convert the arguments - kludge to limit ourselves to /bin/sh i=0 for arg in "$@" ; do CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` else eval `echo args$i`="\"$arg\"" fi i=$((i+1)) done case $i in (0) set -- ;; (1) set -- "$args0" ;; (2) set -- "$args0" "$args1" ;; (3) set -- "$args0" "$args1" "$args2" ;; (4) set -- "$args0" "$args1" "$args2" "$args3" ;; (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules function splitJvmOpts() { JVM_OPTS=("$@") } eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" v1.6.3~dfsg/gradlew.bat0000644000000000000000000000454412275460205013600 0ustar rootroot@if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @rem @rem ########################################################################## @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS= set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if "%ERRORLEVEL%" == "0" goto init echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto init echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :init @rem Get command-line arguments, handling Windowz variants if not "%OS%" == "Windows_NT" goto win9xME_args if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. set CMD_LINE_ARGS= set _SKIP=2 :win9xME_args_slurp if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* goto execute :4NT_args @rem Get arguments from the 4NT Shell from JP Software set CMD_LINE_ARGS=%$ :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% :end @rem End local scope for the variables with windows NT shell if "%ERRORLEVEL%"=="0" goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 exit /b 1 :mainEnd if "%OS%"=="Windows_NT" endlocal :omega v1.6.3~dfsg/LICENSE0000644000000000000000000002304412275460205012464 0ustar rootroot Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright (c) 2009-2010 Alexis Sellier v1.6.3~dfsg/.gitattributes0000644000000000000000000000025712275460205014353 0ustar rootroot*.js text eol=lf lessc text eol=lf *.less text eol=lf *.css text eol=lf *.htm text eol=lf gradlew.bat text eol=crlf *.html text eol=lf *.jpg binary *.png binary *.jpeg binary v1.6.3~dfsg/Gruntfile.js0000644000000000000000000002072012275460205013752 0ustar rootroot'use strict'; module.exports = function(grunt) { // Report the elapsed execution time of tasks. require('time-grunt')(grunt); // Project configuration. grunt.initConfig({ // Metadata required for build. build: grunt.file.readYAML('build/build.yml'), pkg: grunt.file.readJSON('package.json'), meta: { license: '<%= _.pluck(pkg.licenses, "type").join(", ") %>', copyright: 'Copyright (c) 2009-<%= grunt.template.today("yyyy") %>', banner: '/*! \n' + ' * LESS - <%= pkg.description %> v<%= pkg.version %> \n' + ' * http://lesscss.org \n' + ' * \n' + ' * <%= meta.copyright %>, <%= pkg.author.name %> <<%= pkg.author.email %>> \n' + ' * Licensed under the <%= meta.license %> License. \n' + ' * \n' + ' */ \n\n' + ' /**' + ' * @license <%= meta.license %>\n' + ' */ \n\n' }, shell: { options: {stdout: true, failOnError: true}, test: { command: 'node test' }, benchmark: { command: 'node benchmark/less-benchmark.js' }, "browsertest-server": { command: 'node node_modules/http-server/bin/http-server . -p 8088' }, "sourcemap-test": { command: [ 'node bin/lessc --source-map --source-map-map-inline test/less/import.less test/sourcemaps/import.css', 'node bin/lessc --source-map --source-map-map-inline test/less/sourcemaps/basic.less test/sourcemaps/basic.css', 'node node_modules/http-server/bin/http-server test/sourcemaps -p 8084'].join('&&') } }, concat: { options: { stripBanners: 'all', banner: '<%= meta.banner %>\n\n(function (window, undefined) {', footer: '\n})(window);' }, // Browser versions browsertest: { src: ['<%= build.browser %>'], dest: 'test/browser/less.js' }, stable: { src: ['<%= build.browser %>'], dest: 'dist/less-<%= pkg.version %>.js' }, // Rhino rhino: { options: { banner: '/* LESS.js v<%= pkg.version %> RHINO | <%= meta.copyright %>, <%= pkg.author.name %> <<%= pkg.author.email %>> */\n\n', footer: '' // override task-level footer }, src: ['<%= build.rhino %>'], dest: 'dist/less-rhino-<%= pkg.version %>.js' }, // lessc for Rhino rhinolessc: { options: { banner: '/* LESS.js v<%= pkg.version %> RHINO | <%= meta.copyright %>, <%= pkg.author.name %> <<%= pkg.author.email %>> */\n\n', footer: '' // override task-level footer }, src: ['<%= build.rhinolessc %>'], dest: 'dist/lessc-rhino-<%= pkg.version %>.js' }, // Generate readme readme: { // override task-level banner and footer options: {process: true, banner: '', footer: ''}, src: ['build/README.md'], dest: 'README.md' } }, uglify: { options: { banner: '<%= meta.banner %>', mangle: true }, stable: { src: ['<%= concat.stable.dest %>'], dest: 'dist/less-<%= pkg.version %>.min.js' } }, jshint: { options: {jshintrc: '.jshintrc'}, files: { src: [ 'Gruntfile.js', 'lib/less/**/*.js' ] } }, connect: { server: { options: { port: 8081 } } }, jasmine: { options: { // version: '2.0.0-rc2', keepRunner: true, host: 'http://localhost:8081/', vendor: ['test/browser/common.js', 'test/browser/less.js'], template: 'test/browser/test-runner-template.tmpl' }, main: { // src is used to build list of less files to compile src: ['test/less/*.less', '!test/less/javascript.less', '!test/less/urls.less', '!test/less/empty.less'], options: { helpers: 'test/browser/runner-main-options.js', specs: 'test/browser/runner-main-spec.js', outfile: 'tmp/browser/test-runner-main.html' } }, legacy: { src: ['test/less/legacy/*.less'], options: { helpers: 'test/browser/runner-legacy-options.js', specs: 'test/browser/runner-legacy-spec.js', outfile: 'tmp/browser/test-runner-legacy.html' } }, errors: { src: ['test/less/errors/*.less', '!test/less/errors/javascript-error.less'], options: { timeout: 20000, helpers: 'test/browser/runner-errors-options.js', specs: 'test/browser/runner-errors-spec.js', outfile: 'tmp/browser/test-runner-errors.html' } }, noJsErrors: { src: ['test/less/no-js-errors/*.less'], options: { helpers: 'test/browser/runner-no-js-errors-options.js', specs: 'test/browser/runner-no-js-errors-spec.js', outfile: 'tmp/browser/test-runner-no-js-errors.html' } }, browser: { src: ['test/browser/less/*.less'], options: { helpers: 'test/browser/runner-browser-options.js', specs: 'test/browser/runner-browser-spec.js', outfile: 'tmp/browser/test-runner-browser.html' } }, relativeUrls: { src: ['test/browser/less/relative-urls/*.less'], options: { helpers: 'test/browser/runner-relative-urls-options.js', specs: 'test/browser/runner-relative-urls-spec.js', outfile: 'tmp/browser/test-runner-relative-urls.html' } }, rootpath: { src: ['test/browser/less/rootpath/*.less'], options: { helpers: 'test/browser/runner-rootpath-options.js', specs: 'test/browser/runner-rootpath-spec.js', outfile: 'tmp/browser/test-runner-rootpath.html' } }, rootpathRelative: { src: ['test/browser/less/rootpath-relative/*.less'], options: { helpers: 'test/browser/runner-rootpath-relative-options.js', specs: 'test/browser/runner-rootpath-relative-spec.js', outfile: 'tmp/browser/test-runner-rootpath-relative.html' } }, production: { src: ['test/browser/less/production/*.less'], options: { helpers: 'test/browser/runner-production-options.js', specs: 'test/browser/runner-production-spec.js', outfile: 'tmp/browser/test-runner-production.html' } }, modifyVars: { src: ['test/browser/less/modify-vars/*.less'], options: { helpers: 'test/browser/runner-modify-vars-options.js', specs: 'test/browser/runner-modify-vars-spec.js', outfile: 'tmp/browser/test-runner-modify-vars.html' } }, globalVars: { src: ['test/browser/less/global-vars/*.less'], options: { helpers: 'test/browser/runner-global-vars-options.js', specs: 'test/browser/runner-global-vars-spec.js', outfile: 'tmp/browser/test-runner-global-vars.html' } } }, // Clean the version of less built for the tests clean: { test: ['test/browser/less.js', 'tmp'], "sourcemap-test": ['test/sourcemaps/*.css', 'test/sourcemaps/*.map'] } }); // Load these plugins to provide the necessary tasks require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); // Actually load this plugin's task(s). grunt.loadTasks('build/tasks'); // by default, run tests grunt.registerTask('default', [ 'test' ]); // Release grunt.registerTask('stable', [ 'concat:stable', 'uglify:stable' ]); // Release Rhino Version grunt.registerTask('rhino', [ 'concat:rhino', 'concat:rhinolessc' ]); // Run all browser tests grunt.registerTask('browsertest', [ 'browser', 'connect', 'jasmine' ]); // setup a web server to run the browser tests in a browser rather than phantom grunt.registerTask('browsertest-server', [ 'shell:browsertest-server' ]); // Create the browser version of less.js grunt.registerTask('browser', [ 'concat:browsertest' ]); // Run all tests grunt.registerTask('test', [ 'clean', 'jshint', 'shell:test', 'browsertest' ]); // generate a good test environment for testing sourcemaps grunt.registerTask('sourcemap-test', [ 'clean:sourcemap-test', 'shell:sourcemap-test' ]); // Run benchmark grunt.registerTask('benchmark', [ 'shell:benchmark' ]); // Readme. grunt.registerTask('readme', [ 'concat:readme' ]); }; v1.6.3~dfsg/test/0000755000000000000000000000000012275460205012433 5ustar rootrootv1.6.3~dfsg/test/rhino/0000755000000000000000000000000012275460205013552 5ustar rootrootv1.6.3~dfsg/test/rhino/test-header.js0000644000000000000000000000067312275460205016323 0ustar rootrootfunction initRhinoTest() { process = { title: 'dummy' }; 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"); } }; } initRhinoTest();v1.6.3~dfsg/test/data/0000755000000000000000000000000012275460205013344 5ustar rootrootv1.6.3~dfsg/test/data/image.jpg0000644000000000000000000000003112275460205015122 0ustar rootrootnot actually a jpeg file v1.6.3~dfsg/test/data/data-uri-fail.png0000644000000000000000000014630412275460205016501 0ustar rootroot‰PNG  IHDR€®á ¯ žiCCPicmxÚ­—wPÓÙÇïï—ÞhÐ!ôŽô*%ôÐ¥ƒ„J AÄ®,®ÀŠ¢"‚]i ®J‘µ l‹€½à‚,êºX•ýðÞ›Ù?ÞÌ;3'¿OΜùæžû»wæÈ­,¡0– C-Šð÷¢ÇÅ'Ðq}0ÀS@c±ÅBFxx0øÇøxéFâŽÅ´øßBžÃ³€ÂNâˆÙŸFr?[(Ê…ÔõWd §9aE²@„‹§™7˧9i–OÏôDEx#| <™Åñ ÝEêô6Ñ!}@ØJÀá ë#ìÎNaqF˜gddNó6„“þM‡÷šIRM‹'åÙYfïà ÓY+Áÿ;2Ò%s¿¡…$Yœ„< ‘=Ëe³|#ç8…Ë žca¶WÄó³™QÒI@ôKÒ¢sœ–$í$…†IõÅÞ sœ—;Ç®ï‹2#¤ýâœHßù~ïÐ9Ne†Ï1K43Ë sÓý#æ×.]§ =T:K²ÈOÚÃÏÏ› eäHûù~Lé¼¢€yýôp©¦H!Ý® ZªÉaùH÷D À\ I ¤ƒl@>€Ä@ˆ|cäugss³§òήñy)Ùtr+¸æt¦€miN·±²¶Ówlö¾§Í܈vc¾–Õ€s!RäÍ×Xzœyõã|MïÝì9=×Í–ˆrfkèé Y T‘¢Œ°Àx_ÂIâÁ2ÀFæÉ@&YVƒ  m`¨ÀaPŽƒ“ œÁUptƒ{à èCàÁ$A8ˆQ!UH2€Ì È r‡|¡`(Ї!$€$ÐjhT•BÐ!¨ú:]„®C=Ð#h…ÞA_`L†aMØ^;Á 8Ž‚—Â<8 ΃óá­p9\ƒ›á‹ðMøÜ¿‚ÇQEBÑP:( ”ʆJ@%£D¨µ¨BTª Õ€jCu¢î úQ¯QŸÑX4MG[ ]Ñèh4…^‹.FW kÐÍèËè;èôú;†‚ÑÀ˜a\0LL†‡Y)À”aŽbš0W0÷0C˜X,–†5Â:b°ñØTì*l1v¶ÛŽíÁbÇq8œ*Î ç† Ã±pÙ¸ÜÜ1Ü\/n÷ OÂkãmð~ø¼¿_†¯ÃŸÇ÷â‡ñ“9‚Á…FàVJGm„Û„!Â$QžhDt#FS‰ˆåÄââSâ{‰¤Kr&-"ñIëI夤k¤Òg²Ù”ìM^B–·’«ÉíäGä÷ ÅâII dS¶Rj)—(Ï(Ÿd¨2–2LŽÌ:™J™f™^™7²YY†ì2Ù<Ù2ÙS²·e_Ëä å¼åXrkå*åÎÈ=—§Ê[ˇÉgÈË×É_—QÀ)*ø*pò+\R¤¢¨zTo*›º‰z„z…:¤ˆU4Rd*¦*)WìRSRP²SŠQÊUªT:§ÔOCÑ iLZ:­„v’vŸöEYS™¡ÌUޢܠܫ<¡¢®â©ÂU)TiT¹§òE•®ê«š¦º]µEµO ­fª¶Hm…Ú~µ+j¯ÕÕ]ÕÙê…ê'ÕkÀ¦«4kÜÒ×ÔÒô×jîѼ¤ùZ‹¦å©•ªµSë¼Ö¨6UÛ]›¯½Sû‚öKºAO§—Ó/ÓÇt4tt$:‡tºt&ut£u7ê6êöéõœô’õvêuèékë‡è¯Ö¯×l@0p2H1ØmÐi0ahdk¸Ù°ÅpÄHňi”gToôÔ˜bìaœe\e|×kâd’f²Ï¤Û6µ7M1­4½m›9˜ñÍö™õ˜cÌÍæUæ,È ‹‹z‹Kše°åFËË7 ô$,ؾ sÁw+{«t«#VO¬¬­7Z·Y¿³1µaÛTÚܵ¥ØúÙ®³mµ}kgfǵÛo÷Оjb¿Ù¾Ãþ›ƒ£ƒÈ¡ÁaÔQß1Ñq¯ã'E§p§b§kÎg/çuÎg?»8¸d»œtùËÕÂ5͵Îud¡ÑBîÂ# ÝtÝXn‡ÜúÝéî‰îÝû=t<䨹ʰªì0öpÎáGbŽtþìôsíQµ£EG¿U ªûk"j.×:ÖÖÖiÔ•ÔÃõ’úÑcKŽu÷9ÞÚ`Ñp¨‘ÖXtœœxùKâ/÷Oì8åtªá´Áé½MÔ¦Âf¨yeóXKJKk|kÏ™À3m®mM¿ZþZ}Vçlå9¥s%ç‰çóÏO]È»0Þ.l}‘wq°cyÇ“Kq—î^^t¹ëJЕkWý®^êdt^¸ævíìu—ëgn8Ýh¹ép³ù–ý­¦ßìkêrèj¾íx»µÛ¹»­gaÏù^Þ‹w|î\½Ë¼{ó^轞ûÑ÷>Xò ÿ!çáÈ£ôGoç<ž|²þ)æiaŸ\_Ù3gU¿›üÞØïÐnÀgàÖóÈçOÙƒ¯þÿñu(ÿåEÙ°öpíˆÍÈÙQ¿Ñî—‹_½¾š|]ð§üŸ{ß¿9ý—ç_·ÆâƆފÞN½+~¯ú¾úƒÝ‡Žñðñg3>NN~RýTóÙésç—Ø/Ó+¾â¾–3ùÖö=èûÓ©Œ©)!KÄš±($áädÞU@‰G¼C7D™Y<ЬoŸ!ðO<ë“g€jO¢×Œx”ýH LFžÓv.ÊÀ¶¶ÒüWˆ“mmfµÈˆÓÃ|ššz¯ ® €o¢©©É}SSߎ ‹}@{Ö¬÷ž,ò¤Ôˆ¦Dy~³ïõÿíÿ|öÿTÂsÉbÁáIDATxÚìÝ…wWú7ð÷Ÿù•v»ÛvÛî¶c˜3'qÌÌLqâØ‰™™™™™™™e’™mó^Y±¢Ø’,˜ÍH3瞞ƖE–ç3ßçÒÿ»aLÓB®n&´-”Ún^ݾi¦W¶púÍìkú¦E\ÝÌi[$ÛÍ"ŠÚ„YmÑ ›%£Ãb±¢m±œ4ë8.Zü…&z¹Ù0o œ4ÛË-Ž&f—„–ÌiÃÌk„é·|Ö.}¢8ûd2ù¨_úÓ¡Ó8ýKäìoŸÜ¾ž@X?í0EÓœÞYáàÜZSºCn,°õ sW³øÿ8”M€¯6˜m€¹4øÛÏ·ã£Þ`¬1ÌŸ ÛôbA_væ@_Žæ ±p8›C¯ïKsnðM<ãóØ`œaœ^.èÅõ }Q¡XPB0Ú Ñ‚d0²Qg˜/Ü…6ø ”¾|X|⩾tÆC0…hÜ`>‰Â¸ÄüF¯Àé‹d×/Ÿ10¯BðM¬‡`”¢±k0Î0î.ª‚/®/ŠÏ<¿Œf×àPì…`Ü`D F´mÃq‰±à.ƒ/ßꋊâ3†ã/T£-óY![Ç¡ÏàÄNô¸©(srzùD_<þ¢A_&c$›â!†Î`TŒa†q‰Qà.âô²ZvŽçê/ ×òâ36 ÆC0‡ã£¶K ãóÂ]ô¢Bß8\_ÞŸQ›L†;‡òYÆ †Ç`8¢p/THÄÑÅfðåuÙmúZb[_(WÞ€`AÁ¼)D#ÜŒ"ƒyPŽFÃ|ì1oßOЋŒ¾¨ê÷EañÙ“Åg šÌÆ^æ÷B4ÿ,¨ cÚc”¼uðЋõN_n†=ómñ¶©G\Œ‡`¾+D£Éà8´Œz†Ñì1ÚÞ"xúz¡ ¾¸¾X,>#!ÑŒÌÁ±|a°1̘Ñÿ&ÀI/:ÊÎ|ª/ÅgNü…`¬‡`ÞŽÆ‚£3X æeÆ2ÃÜ0A/ßé‹–®_¾Š¿ÐŒ¢a Á¸Á¼d—§Ûú¢wàBÅgTL=b`4„`ŽÆÂX!»ã ãkw!£—Ãà KÙ×ýc¯ ‹¿ÀMèÆC0n0Ö Æ%Æéåaðå_}¹øÌ&À˜ ÁØ0X˜/'&!o0Î0î.”îrN/?ê‹ìÀ+LŸ!¿lŒÉÑX˜*DcÍ`”FaÄÆ%FÊ]äéE8øbR_uýòQüe0ÏB0^ˆŽÆÒä`TGaHÆ%æwù5øò½¾è,>CÙÁ¸ÁðŒîŠ4^šFÒ]^ÑË^ðå_}±Ýõ‹±WWÌ!˜¡ÁØî æ ƒïXF*™xÈ™za/ ³ˆqŒ9Bw¹¢ÝegL鋟¡X`Gcñ[g0‡e‰YŘéX¶ÈýU¦ &cêƒÉŠ4ãóÊ]˜èÅõ¼â3<ñ—)Àü‚Ñ_ˆÆ¦Á¬1üÒȵ[æ÷Y‰ÿ-Où¾Šñ'@2+£—aV%NÀÅEÄ]–éåIðÅõEQñ™—ñ—púBp(›Ã¶>%n0Ôß· +R¼=#ñ`ÐZåþ§kàðÀ2ŒÛ(Œ†c4  +½è ¾¼Ò7“ú¢rìkci]¢qƒiš…®Å”äT})mDêŸ.Zº’f~, E†_b[ßq‹œ»¨§†à‹B}¡x…µâ3£;óA!š²Ðh°˜UL‘ÒmMü¥6‚Ä÷ñ¯%_»ÝµŒà+†9ÇU*' Ýö~×Ö<ª9ó¾ìÌ }ù-þB¬/ óGæãÎ`4|‰aiSïq©Ÿ¨è.Þ_К“û'åŸ3ß5Ëýe«müÔ<ƒQÈ04ÃÁ3DOÆá+½¨ ¾¸¾X{ÅÀü‚a+DãCa°³–Þäyýy^åwRWíNI⚯٢у9é)_’ú9@MEÖÔ›õ¹Â2¸"ÐzŒl³áUý¸¾xñ™±¾¬ÌËŒÚB4n0''¿z1-ù=Ú5o£Ï§'ŸÁqz $^uÓœWùƒò­)ÉR^=S0ñdkÉÌ3Œ~’mxÞâ±D/®/úbrì]€ ÁØ/Dã³Ípƒüuêøçýæ@ïçóãdwk3ÖmAíå»Ó’?d©<’0ógwå,¨ŽG:¼€Ùm zQ|J_lŸácër »Uƒ¹eøŽEĨÔ?©ÀÇ«ÄÏß§ÇGÛÙa ê_ žü)èòmËH æs†¨Åc^ÓW×—S}/ Oæ§ÑX<aƒe=Ǥþñ¥øåŸ€ÛÏ—ŽÓ£C`ðœÒ¯gc²þ¯[æ75Ãwœ-"}5øĂá.¢ôÂSvÆŒ¾hxÅûâ3óÍh,Ì¢5Âr4 tüàe;¹Ïô&|°¿`y‚ŒV•áf/ØÆ%F‡»¨¢×9}ù!þÒõS’`,DãCf°¸ehŒ^4~Äàϧ§GÄé !ÊĤùëÜo©'Ã8Æ38@ÞˆzO¹eŸÌo,B ÙÙ%†q‰QŽ®ÍÕ¿AÌÒ‹ë Ÿ¾pŸá˜o¦$…]ñ+Á †Í`W íf¹¿´ ©?7õ£öƒv8ÑÏࣣ½º<ÊͤyiäF9͉[ÅH™ùª¹è8Rš–¡³œ©×=‹pv†_bcHÑE-½(*;s©/ö†=c=þB0 Ñx†szRÔkÙ ÉŸzdþ ~h"zöÅ.Ù?fÎÞLp§†ôÍq|´×Rvž€}f jûÌ<ÐBÏ2æµL¥‚h³Ü_”V'#ùåóšÚ@e´2,àÇóÚ]ôÓ‹ë‹Ââ3¼c¯Î[0#€c4–)::ƒ1e0‹ +Þ¦¬¹Ñ+󛻺º²ÑG1«˜ •Ç„ó…8ˆz·g$àÃÒdJp«Üÿ@ðU2þðF¥Oæ·Ë‹HSÆj•)ŠÙj36˜k†!“8G*wù‚^\_¬êË}ü%|!À蜒„òB4nð—Â.-™Ê¬uÌ‚ß(Òn…´õîdkýò ¬ãåùÕêg;4œ­­cš¦òÜÉ7îJÿ¸ðæh”5,Á-›äþ2Õ³â¸o˜óǾ!¸ '½pê 1½èÕe]¿¦¼Ñ—S€¡ Á((DãÃ`0-Àç‹<ÿ«DQœ ñ=õ+sò?o&yNôîïRè=Ù\%õ4lĸÎÉýL™ <.ùÓ°Ô¿.ÜøÁç×Û¹[Y¡+ï^S°ÌQyðÔ<ˆËQZ¼“+$Ãóª­š^ìéË»WüQ|þ 0¤#‚ù©3k3aø2ÀŒÚÊõ­ôÀ’Äâ„͸K/®ü‘-‘ƒÑnJ±šÔU;ÿêOÊ×;dÿ´Ô5‡d°4 Ë1¯`FäYcÄ]þÔ7ŠÇÞuä3¬óY!7˜CƒY˜ƒF4¸GÅtH!êÝ¡|}Lêq¯¤Ä­¢¡š³Ä‰ÄaŒå¥»‚I/®/æ‹Ïߌ¢çàÞІÞ`  Žà…7×vk²×—çAtžSü•ú­zùë/Ý8=ÕB-1Ž1ûè¢È]ˆép}#øQ_ìŒÂB4÷›ó‡Á0Ü$÷7uã#è›ô oD¼]±#Þ§ýÖ°ÔϪò÷-¸;ó ±5..$îb”^\_HõÅòÈgú L!šÕÎ`Ü`n ÎV~@;àÉÖ,÷·®¾#gaVIÅ=¶áðMA›»üL/†õE{ñÙ„}/ŒžÑXhè FÛ hlì£öšvÝ+¸HÛCÒ?·¨Þž´Ql4Qbs(dsŽ1æHæî•¢Ñ]\_tõûòyñù`à þ Á¸Áè04-}ÇAé#£ï¤äU Â>Ú¡ž½5U®ž‘’f~ðœ ã‘Ã=*CôBDÐì.ªéÅõ…U_ޟ錌 Ã÷ÌCªå…hgýÂÔ&$*Pº«¯o/û!%®ª7µ~ð¾c"§l^` ‡Ð°=1NZ_Ћë+0úB0ºB0::ƒQ<9ƒaˆÂnꚣ0W¡§$(WÓ2x{Û.Á"º¢ahV+°ñ38'ÒˆòcÁº|@/†ôEbàÆŠÏߌ¢Ù…ÌR{aâW¡ B]üŽ~ß6Ù?Mu-ÁYOÊ5=¡º/º¢û–OOèœ#$Pâòöw½h ¾ØÖ%]¿7aÓ¸I`Ü`~4˜åhsó6ÙÿÂ4iPúßžêj·,#Aü5‹,¯ì™RpÏúräùù;ŒQ¨2/'ŽÝ…–^è+$púò¸ø| `>+DÃÞŒøŽIˆ ]·ˆpÓк´˜3÷mLꉯ$ž™PâoRM\e/Ó"*$†ft7ô½ç0º‹,½È”q}á/>SÐòQF¸3X f•áGf¾o^öIÿažü1Wù>yÅ+«Ø[¶ñFá¥ÍÃsÌÎ’LOÐw,#%Mýž°º‘N2º¹å½˜ ¾¨ÑæWè+>Ó˜ÕÌ…hLÌízÑ<0ø¦nü OK~_+SGßr|þ>5¼´+£qH|õ“¾†z¶ñ¯$>ih>‘ʵ9w§×—ŸŠÏFÄ ÑXš˜ÁPu G³X‹6Ô³‰%9ÀÝäàiɪå…,tÍÅ-£ÀyPÔ:î_^ÝÁ0´„³'Í™ZÌ*FÛÀ©TQ¸Þ)ûG€ÚKySO,#ðÄòŒ^Èkθ¾H{æuñÙˆ>À¨5˜ëB4zdaÄ`袰”‰·½–aŠÊÓ™ÿpVyÎQ~` gGÑ´ŽI®iõ%ã÷99“ZÇÉšzƒË‚éó¡Úý2¿$½z¡§ïpÏ"œ4œ†„»ü|q}yÛõ 3ÀÐŒÌñÈ,9cw+³`UÅRE±^™ßX,;7Ê] z£üÚèí Qîcf~ëè‡ÔzÎΧbVÑÖ:f}ß>‡ ÉŸ*D]5µeL}pØpza£Múru‚F_þêúe)þ^M!7“òØ`ø‘Y †Á[ ±‡ºZü+‰B¥;m2vÈüI;ÍwPê_Ͳ¥«<ñTc¨gûÔ,öœH~Õ::/ù!³³êsSÿpUùËÞ$¾ë’ù=áµ$9 [âQXÝ彸¾(Ô×b}™ŒÖB4ª:ƒùÈ`DaJ»e!eâ­jèb¢keªcù^SÇE‹ÜÞkéÚê˜ëÙ(ºkvùÌøÔ9%¸¨=½aãs«šáûREñó-˜SüeNþgÚ(\­ üICC‚è.LôB|q}1\|¦ 0Ã| ѨÍçGsž¢wúûæü¨è‘]7@0‰(ãø k©kAÝ1‚¨#¶ãºS»hEÔ»='ý#åë½2¿%¾’Ô0|'žîŸ@¸KŸ^~ ¾˜ÔÞ®_$‹ÏŒæëB4n0T#Â0ƒó ùyÇ.Á.¾ºmlá¡S2g'Ù»á ÝRóæÑÜøéÑá‘°×T¼`5¯úå[ã’?+Ý2ÓµÂËÑ|.¬ô¢,øò·¾X(>³0?ÌJ‚§3e‹›…Þ6 È`ôGá˜çïSªû’kû9>Õ>1 |£L!vNáß›ñŸ)ÇÉñÑüävnø¢Écj¯p…‚ˆ¾˜U4N#?ºËSzq}ùX_öÆF!š÷Á¨1ø‰±ï[ @U¥—ï!®(|™aE¬–‘9ãðRŽO¸r&žÉ¯žS|]ÐÙ)Mþüíq²½¾×X´ì¨D)GOIþ¡òø¥‘ê—ºÄÑŽp–1£¯€uýž· Fã…hÌ|Ï4ÐIC·]öa©Ÿ“UžÒ5Xˆ/ ¦2|Ç.Þ.¾ª\N¼Ü7ÌbS1vËQ¾OxÑôÉ~KéçKÇéÁþ~sÉ’¥åfàöÐPhÂÁj—xCºpÓËûà õ+.õ@­¾7y¤/Ëó_!š_ 5 ×Óµ©‘¿I"G龑Žåm3ÄËÑ2üü}Jbu_rM?óQZ¬¼dñ‚ÔYý™Þq²»µSOÔ»E¹e¾ò½ s‘qŒ±†.:èÅXÙY õ5áN_îFs!½²6XÒÈ#ú•Ô”äÔÁD“’?ß«k=5öA«ÁÜ2,÷)³apÆ(¼„É(-ö°Ù“ýÖ²Ï Žãåùõ»99ò ¥vÙÿšéYq°ä..šÝå'zq}ÑßõKE“9ÀÈ¢‘ì æ7ƒ t¬Zeÿ{y‰N™ß#_ɼÖw5GÚ`˜·‰3 +éž$ÞwL¼r°ô×U;,#1˜¨-º[žÊàÏ'ǻՙD½Û”ÉÁoµ .Üù#ó`/yç¦þàÚc˜½oJ]ˆeôB^sÆõ CvàU(Âú² 0Š;ƒ:ƒšøû¼yIiÛ°ÔÏEŠ·lµ ÁÍø) ?tJ ÈoËiamÎÒ‰eM¼\4µu ©gd)SŸ˜×Ò_FAËý¼ëvztȈàÃÑîçW”ÐÔ9ŸÈ¦§ï¨¦œ©ò¨Hév±Ò­|å{*OüÕ^i8Ý£·x_©Œx~}bèÿF%ð ¸ÜeµÔ€»(¾‚¨/Ê^±0^ˆFƒÁôV4ø¥üà !Ò?.ÛÊmĺ®|PŸý?êÊ ª*Ê~âÁð0,ù!­°mÌ1±†åyÃä¦nø®\A´P鎑ž %¤>0ñVW¥™¬u47Áࣅ©U}ÊXèwZzàÇàÇ«„F¤~¾°ÕñÔ¿j„üÕ^J™úB^F>oêê½2¿·7Wùø=ÞµçGzÑ|y¨/Ÿwýr 0êöihƒõtmšeÿ¢Qw c×§†v«³Ãsòÿ¢|k@úßñ/_(¸@g0Ï'VUŸÜ²´k:[ó† ôíÀû0!ùc•‚ˆ“–Á#ó`1Ëhm£1©|™‰¤)¼SÇ(“Z–íÀÍz¤³Ó6~mô!öµTŸô¯3Œw8þ%ðò 3¤¡Âd×ìÕMÙøc¥‚eKipeÙ -LU\WݾXóA½ð_\_Ìuý²0b…h¬t#eðUåh-# åt¿â¢vH¦Nž9œèߌÿ´ %Bù.HiI/Ÿ‘ †l†L_Áð»xDŽꖑy1ëX¶¦›éYRÎÝ ÂvÈþ™ðJÂ@ÏÖPÏœÓÏׂþqÙI™ÔßB§ xgs+ÕoþõÏÒíÏ• ÂU ÂÃÒ?Ór;ÿê¿«ž›ÉÞà¿Ô DŸÌ¯&ºÖ·8ì³ÄÛ7Í[ýͤͅ‡¥~®Q UUPûÂ02îÂD/ªô$}yS|f ` ÑXë †mbLß1 þ¤ö†z2Z¶== Ñ qr¼J™xÑð>Õà¨WR2†Ÿ 5i†¿MŽ*ëŽ(íbwê°¹®%í¹{\ê§F¹kÅŠ·Úh†°Í)þ²â¢¾ßVyº¿ûµø¼Hú’G`I}OàF7õ®ZŽ÷l®ÍM¬ySˉ¯^÷rÀå®=0ÉW¾G8ß¶™¶v­ÂͰ3†o]bjzcø^\_äôe `”m,ð?2ñ TUü¿^þ±•L'ºm­ïÆPç°Jÿû½†Ö-Ó^ÌÃRÒ«z§LÂKÙ=o^ø|¸ø÷†°8Á%ËšÉvVÈvvèFÄÛ•w¯Þ\£èˤí'œQÞöÍ$¯ù—Rßs}};1ËhQnšªáûzùëLÞ2Ãò7Þ¨<7õµŠ†Á]˜èå³²³ëk̶¾\ŒºB´ÀüÄÄ7XUáKÿ¥Úõ‚ú3h6W·’}¨EÑ,åJ”B4=ƒQΰ¨u¬V@ÁðÜêCÇ$vÏžfôfÔæä~è‚6§øëìù¶HÌÛF„óñʹþHZ²¡ÝÖ0ôâs³Qnš¹®Eûy­b^ù÷íü轚ìÍ%™9¹Rßjp¹“¯tW_Ïî–E„`ÕœQÖé‹N}y×õ Àˆ¢…IƒY˜\D_uףܲKæ?Ú¦0ì¡wE:šÒì”XSÛOààÊÀ4 õzˆy7û›³’_ËÔ}2¿Úê˜Ü»bÈ.Þ˜gþ¨¡ÞÆ/Ë–ÙÈÍŽœl,NìÕ篸¨Q¯x¦%¾o’ûÛ\Ç ƒ£a£mÁ;úboàC}¯³0Ê;ƒùÖàÛ&AO ½ÄÉÕc*À>T€AÀÝÎ c¸ŽÄñÑNi2e@Ö´ä÷ï4´¯ÜÇQøñÛ¤¨òîÐâNN¦ õKÿ «ÁóÊÿYP¿9§ø ­¾”V tWÁا”ã¥3ß(I}éV_ °¢¾ 9<<oçF,h Ížw·Éþ—;ƒÑH/®/Jõ卸 À¬¢ù{@Kº{¾yí¬®M5˜à9™Ÿ6"ß}ÝMïò:c=+ï^YGBCóŸß#?9C7EC×ûfA¼‰Â¬1,ù!µ¦oÚ8¬„ƒSªº3óND8Ú„ä=ŠϽS«4y©dꉛÊñÒÁªJÃR_2îVfÈÉöÆ¥­«6H½KÖRsç]õr×$M¼EØ^ì;ô¢oÈFô E‰¾œÌY‚±-«ê½­n–ý‹jðmÓàjjÔsýÊõ£™QÆëHL¯z\ø¡±Ÿ•¦QªÊ“Já:ùÀ§ ‘,åo”_¼7CÃà,üÊ;{l~õ¾CËwÈ»g¨uN0YOµ×OÌù ]ÚyDA´gÑIÀTƒ÷Û+‰Ú¢”^€rE±‡fÁg²™(¹ÙjÛi™éX(¹aŒ^´”±¯/º~/À-Àh,Dó›Á&ÚæÓgý[à¿ÝÒÿ‰Wy®©kT®”:¯Bÿcõ“Îáä ÝóÒ^}þ¢Á=Ê ¬wêZ ø(Þ¡âM·õKÿòI]í‘©?o*Ò—~è˜RØWÙÃÙ ¢–ÑÆºÖpwSZ‰Ò-mǶ1±•½‰ÕýJÙbp.>uß<4_éî ô¿ ”î¼1|Ïè^ž¿ë¢¡Ý+óÛ—ç¡öÇ«DFך§ûoçþMÙ9ã©iõNtôRTžVË 5Ê]ë’ù½[æ÷Ù?Àÿç)ݵÕ6B½p_AÑ÷&ºõ¥ŒŒ ÁílªmF=¿ÏH|7*õ&Ù¿ n7ÈþýuòŒÒ¯ëVG³ã;€§‡W= ædÿAÙ¬¤^Àð…à;ÿú¯õ@«íÌàUWÍyåÿP¾Ø!󇎮øû„Æ`®~þ>¤I礎Ғ3öHSy·¾2Xêšß± ·Ž©(íœ0/ÙݽŠYo¢V±oµô(¿Í)IòàUEÔDáv£ß¬²PÞáå³QПƒm ª_–h¥쪡Õ,÷ׄ$IeࢶSö÷OꨦEeg\_n»~!êÎ`>ͽÁá̦2<)ùÃ…ʼÒo+®»•éÇãý¤þ–­T¿%K ðõ+¦±Æ|8Z˜:ÙÙ8š#OêøÒ‹ö]ðkEj!š· K»¦ Î,+ºgr¼ˆ‡¸E„™ŽÖQWÞg¥`¹e]¾¹-Oœ“™oÓÄe»gÚ"÷?šOyÆjᚈ3ÃYc¥AÕà}Ãùº9ùí·W2Ùº „àMaZ€¾=2ÿ¹°„Ù¼êß´ÿ ›N¶àëà‹ë ‹¾Á,ê ܤÀ§ÁØ0øÊ(|`f‹H¨ß êÞ"êß!ꈓ—d’úáÊŸÚ)Kù|rrvö:ÙŒÿ4¯òûùPÒë¯ ÞC=W˜mƒE­b4ýóGæVÅmbÙ=LÛž™úª*ÑA´\åû¯Œ>ˆZE‡ud7 «úäŠZ³+{ìëZ.- ¤þ¥ZAÈMCó1, ÇpÓ®äVÊÄÛ\ÇBÂćú•Ûæá¥Š·¨/pÍ×ìxyžá´»Å™µ”[ª8‡¨*\/è»]w89HêmXyÿ†ú¦µÉþùÄÔ]ô¢«ìŒQ}CÑ ïKú^å…häd¡È`Öæ¬m&ûœl­S6XõУ.ÿDÞ}OCû®iÔs…ÙcøŽmœSBuUïG+x|•XÔ"JÅÐ5Cùïa³Ü_&ºV·,"tƒ‹*{¦lb«Î‹Ï¶‹FªÊ2z>ç ;jéßa{(Ÿ6»sÆ^~ÈS¾—­ü@S߉:—7DU‘:k^é·ÝêìSÒ]€w+ÓæUþ N‘úçÌ·ïÌ¢éÓ/øNŽÛhjÑ?©*ò#½hèôÅ–¾!è À¨ì æ;ƒáxASh=Ôa§0vÍßbþõ_´ßª‘¿©Â`%( f‰á‰¡Å!…í\,¤õ¥‰[D¾1x—¥üÚ7ØðACë¾YÈmÛøŒÆÁ˜Š©ilíXÌYûº›“äwDƒ{ëA6K¶²ó ¿Ð¬wý]¯Ì¯¹Ê÷TÉã³bi\.Ae¬kÝ$÷÷¤äMrù¿y)k쮜4ôß‚/R_Qïö~{Õé!éâÆ‘½ ‹F˜W}–íä>Ÿ/Ü}L$Ð~«OúW=][$éE:øâúò\ßo6€Ø`#Ü`è Ö×±¢^þÃÒ$¿ŸWüuþõÿÈÃG¿Ýs„`¯7¯™øÁ³lK ?sN.ïš°Œ*çz=KŠÁÊFn±¯¤&%€ªë7XUá…‰ˆe´cbMQû˜AH1+&r¯2µœ>'ýãv^ÔÉúòñâÌáäÀvVÈ¢ÉcÚ_bƒü5m´YKç ‹¹¿(!|ì䮫*éZ§ª<=ß¿yVêû ¡­ò€¬3MÁ ßLö!êß•¾â×:'ÿïƒáÎϧ§'{Ûë!vÊÍrIy𽸾hxEËåe€!.DóÅ h. †`z’šžc½Ü5„r¢¶"Å[ò†nÌ—®„•a)—´áÙ9·t¨V–³ˆ|nê먥_/w{}CU奌½D-£^¼O-î÷Ímy䔼C¬ø÷Ù~ hÙÝÿÜŒÿH™C‰Â²~ÐÔA´ŒšŠ¡ë×d†âˆÔ?»eþ0¾Ðá=¯ò;Q[lÑðÞ¢á}¢®8y¿ä÷¬•|„É?¢—¼tè·ß+1/%á¦#Á×®â3 À‡`”vcØ`)ÃOñ*Ï‘D·J^ÈASOÙÀ%3£ :¹@Â)æ¤2,j£åŸ?»²%f áÊÒ"–QwÌC_º¼Qn¥Ù˜­Ö'ó«§Ú›&¾¢gÝÌÞ9-¹Í#ê~ù"V±ÈXE;øŽZVýÊðÖú~W-QGŒ*Y“ÜßÔZ4’¦²·l™‘{™¢òš‰ï‹•îÔÙëE8»`™^\_lè Ü<7}Ó2|Ë$ÈI]±3Q²ÊÓWúïn›†›G”vŒ»¤ÔÞµ¥ÿ§?÷lb­¢Ëkú¦áØãDáfÁ FmµŒÒUHÿÂâ[4)ùCŽò==ûûæ!”‡å>fTöL}Êh¸kŸ€˜UßLwNÎÑááDÿòÛ—Ô¼žªòµôRš¤±w1͘g¸4i»¦©ï(eŸWœU‡Yza);ãúB^|¦ I0Æ:ƒùÔ`ÆQøžcµüMdôU2ø Ô!¬¸#º¬ªU-é¦áÛæaÍd= ô¬½ÔU3”ÕË]”þ÷åÂJo¼QÑ4pzb nIe#¸¨#¥v@Ù3[A«®˜lðñi°šƒÛeÿ!Í‹YDe«’qMcõ,ÃO“ª{§tƒ 9\E‹ëQÓ¬¬vSÞÑ0¨ä‘…0T#磂çdÿq0ÚÃXàÓ㥹%pË1©D½’¡üø#³ uµVòdÙŸ'$š’üaFâ;‚Ä÷’?ŽHý³Vþ¦£–Ámóp_Ñ—7ÙQKŸºö$ÜÅçUqóˆóçñ¥ãï’k±M/®/Oõ½Áš¾ôæãÎ`ì,jj¦mÚ+ýLË(¾S׺cLû·\Óç•ÕôØ1½3¤K¹¤Î®l=vLäj1KX$ަÆ_p‰à”XÃúÔ#¨Z…üùhaé·’½™„à“íuÊ”›qÉŸâ^J‚Ÿ}nêŸøòÅ(yŠï Jj–ûÛ^Ëti›¬±{™¢(Kþó¹±õSq×.®qhF?¸#5gT•y«o(Jõ5b¨/+óWg0Æ íŽI ƒ†‡¿–}aìuáÏ»¶oÚ2ªL˜ƒ³DQXÔ*ZÃ/oba<Ð ’e¥a8©ø«­ï jùMé;ðò×…8tÄOö¶¼±îDø™©ÒËçöäXxó÷zˆíz å¢Á]ªÁå ¢o Þ!€.mµˆŒT•£Îú…­y½QùòA"¢ÀÍC³:X ×Ûú27U_Ú¹á®I€†~¤› d*=P6p&ÿ ýóVü”QÖ9®TÀù ‚k†oÙÄXE—WõLA¼»tkøçUø›âo ³ÕÒ•)Ý‘2öùºK3íTàüh†+$¯-.Ÿ• §$h•ýo£Üµ‹úªßØ)Œ9ÝÛÔ]O5Däˆ×²P¢Ù{cõõlažûÞ-óŸ;f¡´Ÿ%.Æ ½W•q}¡xÅÀ¼ì 0ƒ9Ù=IÜ4DC×¾@šþàjù›Úº¶"ä®ßo6(M¯xí•ÍíÉ‚ †ïÛÇG”tF•vÁµÏ× ÓÄßhŽ·Jd±å*Ý›”ü¡CæwgM=ÊÜ'q‹Èn™¯åù—î5ÓéÞßÝΞ;_â› ñÝå²ó¢Ñƒƒ±^Êíæ'×<õ¿–¿n¤k +·t, VU€u8-ãËŸ·±ùµW^Ù(¦A}M±¦¯ –ôe 0n0Ç#RŽ1 }bäí¬®ÙÎ].UÕÔ³ý¢o­ÁžY U½òÓ¡9kpÄðC‡„äš>ÿ¼x·;äcrüí™z›T#já.&Sì—ú©N¶é}³àw:4¿Ðïæ_ýw·2ã}÷¶7ÜçäÿÅü“@ÔÛk.ù²‡ôXï¢éÚÎॻLEGÃÑ^˜xç+Ý™fmq+v[…¼ð-ó° ž »$1«hA£¡²3æõ…`àg£f@n0M3 ‘0t«®Î&ìî²nõRRÎÀMä}¿2]ÞåžÙðØ)Ê3› ?¸õMë ´ñ0›‡µ§Ôö³!€™0uø.`ÄBÅ;ßþf¿›SøeÑâùf¢ÇvFàZ 5ÑàÞœìÕSzæd~Z²x¾S’¸[—¿ì¨|a?ðiIxùâ¡i LÖÒiÑ"QšzŽ 0¢G$ÿ¡hèzù3ÞÚ;@%½Ø/;£E_Þwý²0j;ƒÙàK ›…†o›)é¿÷xó $Ú+«và™Êõt¬ïš S÷\ºôç]Ó;å”PÒô§–~ñ.ejqC‡àöÃ,b,ÿ1£ u”»øË^ËUº{y÷_Oéü–¥¾Ÿ“ý¹Éü4+ù«2Ÿ’ûçœÜÏtwª•¿©«g7º"54Ôµ®‘»1-e6Öµµˆà`Ä鄎^”tú Ž¾Ü M!:ÙB´À,t>QH|Ë4ø±Ÿ²þ{G Ýà×réJKåE(-[ñ^Ä++M£†â¦!äà{á/“æ/ü‰SBmß´YD Œç–tI!®ïˆZF #¸ý0‹Í'§9·yXÝ/±P˜¢ò„O=–É"uò×Sß;W½ù”"J^ù ^qé,oø1Mùñ˜$4ƒ¢ßkh‹›‡Óro­åŸ?¾°†jzy_vÆõ…F_ÖæûÎ`ÔÌá %Ú¿+aò¤aàq(hÀÚóFþ'pW˜ù_éÙ¹²GFvÓV@Þ…ŽaÄMÌ*Æ0¤¨ozIº…-¡’Xâ}JaÛ¨WVÓm›8¦Óožêo¦ ÚB‘•6*õÏøW/L| ƒ »Ôàèݱˆ7pÔÒo–ý‹›(Ü-ó =ºúRæ¼™F”6 Π†^ƒ/®/Ïõå `Ü`Ô fm/aΚ}\ebu/`øòà,ķޱŒ.¯ì™„`0vNªÍjÖ ,Dd¹/ÍP×z’Íž~n²oÒmicð¸¯}r’júìâ*‘D—N¶ˆ|hh«eT¤xk\ò'v;}ƒUŸûC<ãIçf¥õ–ÜE˜^Xƒ/r¾¸¾Œ,x{e5F”tȸ¦^œ…Ãwíã#˺"J;…`˜‰ïØÄD^Òqß>Éu?$Œ½Ø…‡ãÖ"÷?]KÊã*{fE•uÙÇW!É-“4,fùÂØÛ^Ó æ•TÓá‡=2¿å)Þ}«©óÌØWÌ<‚ùg\ð}L¯/éç#zy|ù]ß\ëËÀpt£mP4¿ ÃQ¥]îéõâé¯4‹Ã÷ÎöËkc“%n$6‹(K¯4 -F~ JaF+GBZ|þG¤ª¬yÕ­3ø]Rƒ ÚÂK:¶–ù޼"‘ ‰’[hªï´õhÛóгo‘oÆÒª/Ö1à:#¤¨wô«ïM^êÊÏúq¢/àkþ¼4ØHÀ ÆN.isI®¹mCw€4ìŸ1üÈ)±~€`^ ß^‡œaœPÕ›XÕ+ñ>!rhÌ{§©; 7p‚¢‘•اo“¼²š"À«¨2Fc¤‘aø‘cBÝA3 ŸI"A^bMÿü¶Q‡øjžPtÏ4¸WêWXõ’ú9PU‰öAïÚÆJo(håKw©Õfq›Ø”Úþ Â6ŒÓËgeg¾Õ÷+À187ƒUÜ3²µ| ÆH#ÃðsçäåÍÝ{vqÌK#È0¹yg7¬äžÉ«8è®®6 çd¤ I#Ï ê_UÞ=É7âÒíå½m×4<«T€”»¼ ×5úr0n0/ †ª}ÃÁ™ ê¾9̧*ÁÍð‹wÉK;,ÎYBFbI—Ô¼–Ÿœæ[Ö1°,ñÁZFÂÔÜ%󻣦þåG´¯ªîºgut™Œ®ºmÛL˜Wô¢%ø¢rÈ• ›'pÔëû À<î ƒC±b°C|edi§âÇô+§ Ãǰ¨e´AHQßÔ"»³‡aeØ9©:³añn9¬`èÖ#ýë ô{Bÿ”¬òìlƒ ‹~ ƒÊä%ɰ'.KsŠ,¢îØÆL/iùçáÁ×}/ŒÌƒa-GsʰWVcxq»Ì‡Ô«ÿòa3XÌ*Ú2ª¬¢g’³E<àø®]\rM_HQû}ûxÞ,IÇ`Èr0¸+ºÅg*À™œÅÛvåç„òqºg·³€5zQ¨/<Ã¥ï ô¥0âÁ¸ÁhŒÂä9H ä9H,ž``ø¶MŒGfcNó0—ËiA(±V@~fã mlJVÄ7Êý ÉÚX‰ïä¯këÙ3z,ý࢜¦a ¿ü ÉvÃ’Æ^Q¯d†¤ÿ(e]â‰ï&%ì–ùOÄ+F•gêsP9[ ë à(¬ºËt`³ˆE”IXqÃà êGZ¡ øâúBŒÎ`¬Ìãr4]†Ÿ:%TtO˜G”puŽàšá‡ñõnGİv^fåün[‘Õ8dD^ý ¥=4 tÖÐMVy: ýËÔÏ£Rÿ—úiBòG@2mHIýcXêçvÙ?ƒ_+’Ü`áÎÑ °×îÒlQ>rØ¢£úÞÀõe0n°À¬âžžÙ0 ˜ÏíÉ‚»aÒ‡f4¡’ÊÄbV11åݱåÝQ ð×MÌ# \-µM>ª«û«*e(?¤¶•'Þo^9kêª~¸cÂú}*{dF–v9&Tñ™»4£î£>e4¶âô"|Tß3€õýqƒ¹3U]Â0¬é—“Ý8¨íŸËõ)ƒ9ÃWH ¨›_Uø˜ŽäˆŒ0~í•×<ü!µŽ>c‹HqópQÖV!F“xŸB^º¸íèrº€†˜Utdigpaúèe­æŒë‹5}ÏÖ‡`Ü`LFa Ãöqå‘¥JŸÒ¹ßÓ†Ÿ¾MZÙÚE~Dº;'ÕÄUö¼öÎa]ßg&¾&:–òFí>‹­~ÞÙM 7º¿b¶ý!N/o‚/2¾¦/pó €qƒ‘Íû‘Y 9%TF”´+|LƒjkaÎêÒ r-^X‹Gß³O©í.ïÿÃb‡ñcÿ¸—’cRÿ¨P1Ò±z`$‚ñ(ŒÀBȺKm·¬cZFæÌ"J!p¥ôò2øâú^Ö—`Ü` Æh9:¼¤Ý/¯ùÙÛ!èvf—aò2XÁE½Œ–ÁBcÍ€ü´úÛ¸JûŒµÎ:]2¿SJýËGíˆÂwÍB°Ë0| ñÝ ·Í“×?ç=½¨©9ãúB¦oàe}¿7ÍòŒÂ‘%™õã9XD*†Å¬¢-"K«z§xð·‹XF{d5&Öô)¸g²ØmüÐ4 _éîÅýíeÿç®®¦`ôñžY0†`!ÎÌ¿ëÛ613Ë› 3xWmFYðEo§/Ÿè{ `t Èpƒy…ÏN®éóÈlx`Ëxº0ì ‹YEÙÄ”—wOð`rWtbzý@hQ»¸u ‹TëX6ÉýMwêm³ìÿ>1|Û,[ s°ZÑ¥mwlbwI‡¼‹¼|H/ÒúaL_zC2 7u]Âl0\Ñ5a[Ϊ02|Û&:(¿%±ºî-‡¯lÁ…iu–Qe¬÷{¨©öKÿò]©æä~ž•úþÃvZ’Æ^ŸÅ"ÀB\6Þý¢;%lì죚^\_žé q×/'ó¨Í?£ }µÁ"æd€cÊ‘†—ás‰ïØÄD~Y‡ö]‡™/Îà“ÓœZÛ/Ïd6ÔÅ*td¢Êói‰/âõë-YKµEçU~SÎSº««k{Ï4üˆê~ì”è™ÕSÞ ™µ(@÷ë:”QÆaÅÝD–Ü,zù Ó—M}Ò—À¸Á¨–…\~ê”PÚ1fQÂ|ªÜ ß±‰-ïöËmF`×a¦õ礄ª^¶–àæ(ß§*»•x²µþùóçÃÉ­4ÿ%KÉ3†¿§n¾ë¬¡ýÈÄŸb0o·:fžeE­b\RëJ;Çù€[ºWZ–QeµýÓHE^˜FZa$øâú^0ÊdáÃ…?¦gÔ÷ëæ³2c>†ïÙÆ´Ž¼Kªæx¨êÏ`Xÿ9Ã¥Šb_çd~Úï¨þLs¯Ìo¥ø.=ߢÜf\ò'uÍû¦BfJxšcB5'£RÜËË`ä·¤Õ÷óŠ^_Œ–1®/S€qƒ¡4ª.aØ£°ŠGFFý€N@>‹«vÀÄð»¸úòBÐW¯ã—Ä"–Q>ÙM‰U½R.©œLÔ;hý|é u×/;(ÍÉÿköl7_`°‘Ž¥¸yæÆ‚µt{yÀ±ÝA­0»‹zq}‘Ð÷*€1e𠬌š(ü à ó¥Öö©ûä°µxä _˜ ?sNНìaw;&Z€AÒ=îüLï8š›Xu×;3˜|ËbEq #/Öçâ1ÀX…–áè*1«¨âޱ)5¤ÁžN_ŒêÈ¢¾€ý83˜‹AѸÁè5Ø6¦<²„¼%kXBÈðû¸¶Ñy5ïlö¶Œ€°þœXÝk^Â9À÷†:>38€ÁËö ”Z4Ášºö¢àí¢]Â4䱉ß3cj»k;ÒŒ_šcB`>r—ÚÄ­¢ÚÇæ!Ø€Ûô¢ªÓ—ÿõ¥ì{æƒQÕ% Ã, ?ÃâÖ¶Ÿ:%p±Ät—‚>9Í ƒìî!mä^¬x‹ð›k¤¾¦ÏŒýæâ›”TSûâ«yäÓ`ECW -ãà× ±/%â^¾ ´÷Z/ Þß3 DÞ-1«èwÉ5­#üä. ÀÑ k¯<³‚^xƒ/®/«ú²0\¢Ô`ÁŽÂo*#Š;ÜÒ¸ÜÑK†;&¬mïA±Ó‡?}›˜TÝ^ÜNÍlýà=“À¥¯£ ÷jsO|JÚ[²‘¡ ŠŽ|%ýÐÄÜÃ;MƒÙÿÎzˆ/´~é_>¨kÜ7 @°'N‰¾9Í1åÝüä.µÔ|Ë*zÿà#ô¢%øò ÓCú² 0n0v †’ြæÀüV‰wIì f˜=€aXÃ//®²çâút§šG{· /_LK~™h´ñöxeI^²™Sø7`Ð>ª½‘ú'-ºsòÿšWúmVò«ÇïÕµÄÌÂØ+«1¬¸ƒнÔÅûÔ)q}{>z…Ð@/Öƒ/ßé{`Ü`˜ ÆB9:¬¨Í#£á±C'g3È$WË›»ðì~xµÄÂQ.)µ‰Õ½ŠŸ®\8RÑàƒ¼¡Û-³PêW\ÕÕ{¥ýÒ lö”4Ðòùä˜Àk–sòd€c_J¼ÖwvWS–ú™Vß›k¾f‘ï–¬$©ëxŒIþnŒÌ¥»”&liRÔ3A0zù¬ìŒ=}/쇩AÑüa0º¦˜ÍE¤¡cXÄ"RÓ7wdvæ}ˆbüÀ>>¶¢;¾²ç®mì•çý¸W’ùJwŒt,˜P¢°¶®]üuª ±nä|zJ§½·³òþÍœÌ?ÀÍÊD ”îŒKþt¡æ¼yzH"Ï!^œYP¿AÍÁŠ·o™†<À»K °]lEeÏ$´îò%½°•Q_àæe€qƒ‘–…"ƒ#JÚ=3iæâQæá%Õ½Sp,rÉ Æ¯½²“ª{ß%Õ°bpØ&ûç'µ7Ê.wMƒî›¦ª<ž’üá|(ÖßÛùÑ'« >ÝÛÞ­Î&›JoÛj;œ¥þàÊÛ—´ËJk[\8-0Càî× >óÈÈÒNpÉcäå ½˜ ¾Wyf°@ÄsÎpjmŸ{zý=Û®¶Tâœáð3€#a˜e‰íã+À¯½²X´I‰JĜյ_ë;û«*õW¡¿œz8Þw¼¾|²½q²¹z85¸Sœ@Ô½uaŸ†Ëm·"ítw x}¼<¿hô€¶'¸CæÄ Ñ(Jt/T\RëúɾQD/ƒ/¾¨Þe[}y 0n0*.ë·+‡fgCN†`¦‹[E´&Võ>tˆg¥Ï˜ 0•á:¹ë9J÷zi&¤’ûç²­ìf¼ûVfðV²Ï²üœüÏÌéý‚·¦ÐNaÜ~[Åz˜#uKj+P¼ýÄ*ì¶M ?ÁFãâc jÕ:2o^ qµ™WôòMðåw}™ŒÌ]ÂlÌÀažVÌX•XÌ2Ò*ª´ºwú­–XÀXæCj\E·gV‹}Ưe©Õf$[Ÿô/M²U(ˆ8{ÇjäÃÍá3ç$ßÜæàÂ6þ@÷Àó+¯¯˜Ì&½|QsF·¾AX×—9ÀX48_ æìÌÃ,bA?¦Õæµ Ãµã!ÓfVœZ×oVÄ"jªƒÒÿF’Þi‰ï+„ÝÕT µ- ÝÒ*Úƒ àv1RÎ- Ä_÷Œ^Š Ë ‘b–QGÇw¬c q—ŸéÅF§/Vô½`~3½Ã²x…M¸†A»mYÚßûÞÃôÆãxd4¤×õK¹¤°ØaüVC»Kæ?HꛫxWÑàƒðùŒ©òî‰÷É5p¬ì‘YÚi[(·°¡KÛž¿M¼4é<©È ½ ¾¸¾lŒŒ.ƒáŽÂì =÷˜ ¯Äâ£Ëº¢J;A*b±ÛØPÇ¢Nî:bWÉ I~¦™²Ü66¯T€J€#8oH<„Í" C {&‰ˆG^”Ò‹éN_léË"À¸ÁŒDfÈ0ˆž¥c61eÐî1Ì®ÄT€Y2 mS÷ÉI¬êuˆ¯d½ÛXÎÀµ@ñ62úŽHýÓDÛB„¦Ü5A$oÅK€# hf¼iÂæŽñ•Ý8½¬Ò‹•!WO7‚^_Ö@ƒ1 ˸$çµ ›„q}vàŠá ³À0dÛÅV¤Ôô½fgQ~1ÓаW²—Ѐ£%©<§Yr‹¼i±EäÜʹ`´¤Û¦Á”U©iÛŸœøªòPaH¸å¸JÍàõÆVt†ˆ»°Ò‹æà‹ë +À¸Á|…?¦¥×õëåCsšàô$uËê à¼öçs%ñ-«hÿÜ–¤êÞöqlý ¹–I“ì_pë; ýoƒwÂæá´Œ€ŽOX^hó Á?5ö±×ÔsUW—0ò¤ý–~pAVãàÙÜhìrK§‹\Ð:ò)½Ž%w™^ •1¢/[ã£Ô`þp`>;rÎ0€0¶¼‹À,KÌ6ÆÒ.)Q¥^Yìþà #Ï4åÇpOF {%#nr¶ÇŽñÛ{P¥Ò{¦N:Ò¿ôKÿþZVMßéyÛ¥/§7 (¹g`ÍÚ+†V‰˜GôM/éæ¡Ú]DkÎX ¾˜Ö ùÿ®éùAf°F 6ä‰Áhž¤ô…á‹›@wî`çœuÇ::¯yø}R5+C¦!”X' ?¾²ÛŒ¥.6[Mƒ6Ù?áÓ·Cæ9× ñ4M¿ÜÑùUHô1¥ÿ¶FþËÒ˜’?VÊ »¨kÊ¸Š›†„f7}°&ÚŸ ‹ˆ•­=ùiP»‹½(¾¸¾Wè{0n0$c? Ó˜ ßµ‰i hùå²>s ‰ß&V¥Õõ+¸¥qp¢bìþJöÂFFPµ)‰ï]ÕÔÅLC/«iUÚ84Mü5 |¯®yᡇ¤þ•®üÐ^Cß; ®¨±ÿ¹s¸K-5?vŒß;8ÂéE_ðåù€gØõ¥Xà Æf9b†?¦Òb†Ã8J‰/b|Ç&&¤°-¥¦üg'}eý÷©ÊǤþ9ÀùŠ·ùÒ}Pï¬Æœæ!HÐ’4tOWzH÷ †;Í•jƒ½ÎÒ0ÖÑ¥m~9Ó‹¹‹z1|±­ïëÓ7ýåh˜£ð9Ày¬/ÜÃW ƒÄ Óâ*º=2¸šÅ¤ë˜¥ôZƒ+ä…ßè9Š˜…Ñ}ĤêÞ ‚VH{©ÿ®[ú·/+õÜÂ/srßúA©+ +M#òø,Œ»Km¶±åÕ½S(riz¡ ¾();cC_nÆ®Áˆ ËÂfþàP^1ÌÀÐIlR˜PÕ£\À¥jºŽ1/%{¤›‘ø}µulDMÃ=\eÏäÛ„*ÖC6 3жüº„úÍõp§è«žKÏçU~§| ñ]‡Ìïa¯e_ë93yVh@÷êñÌgy7(¿5¥¦§‰à‹ë«Ï`Ü`¬ Ïà,z#ÆpW³,1#Œß'W§ÕõI¾Oâ~RÓ #ÏjEŠâ 2rÌð”ÄÅŠâÚ:¶¢¦¡LkpfEÓ/—{Òî˜9ªëP}ÙNþdkíóÉÉñúò~Gõf¢ç’ìœâ/”ïŽKþ”¯xGWÇÙr4Dè~[gÎiòȨ类pÒ‹à+púRöÅ Æj9êŠ4c€e˜+€Ù‘˜Šñ›èÀü–¸Šn1ËHH&5‰™†ªê9y¾y•£t¯Sæw¶f(MmhõRêµÞÛ+SæÆÎþ (FÑŽÀš“ýÇš·ñgšãt—Ô׼갠)t…¿/UÓÒµƒ3‡³ÞØu—Úg–MB‹^Þ_4 xFZ_*À¸Áü…o@0B ßµ‰†`v0–ÿ˜UÖé–VËÎIŸ%†õ]4ôB^˧+?*Sm—ù£[ú·ËIþÔ+ýkƒÜßùJwÀ´-î_õ(OÈ“€¡ÐŽày•ß7c]?_:ŽW¶³BPsp’Ê3ÃO<—t©MÈ4|}g_æC Üåz*;#2äŠúÒŒLßàëÈÌ{†Y˜)Ã&ÐÌõÓ¬IlRPÕ£”Ïæè-V=KºkèÚÛj8©ëø«*ei›÷›WÎêZ&ÚfJúïŘ֜i›†oÎÈÜ*bƒãd{}§,™jp—Ìïo5t—UtYÌüÄ1~k„´»0Ó‹TÍ™ŸÊμÑ÷ÀÜìÏ;ƒpƒ¡2˜€adøÀaÐKü-Æï’ªÓëû_¼Kâb(5Ò;'‚f[QÓ;…$Àdƒ·Ö·s#æ_ÿRˆŽùâ¾IÀ7+zš¿0ôPÖ§ªçÚ+=g)ÃO·L‚8{oB.mW0ó+(ˆ¼ˆÓ‹Šà+èú^X` äÚ`~`˜}€aa˜1À00l~Ç&&¨ 5©ºWÔ"’ã1\ÈžSø÷zÍgÆÇÑìøš·1寅з”õßSîä®I šžã'µ7q*/r”î)Þ-_ñN¢Ê3W5µ—zoYaø&ÌèÒ¶w‰Õeã8½( ¾‚ /pó2À¸ÁØÂœ2Ì)À3|ÀK¬à–_Ñí•ÕÈÖè-ˆ<æÊæ¼–wî&.S›¸iˆ¹–Éù$àïWœ_ìl2øôèp·g⊘…Ý1 ¤ýÊk½·Ô¥4z˜„àý¶ ¢¶(¸eü }K ¯ƒ†nƒÜß´èÎÉþcþå OSþ9-ñ}¾âmu]{aÓP¢KÛª{&â*pzQ¥/o‚//ôe0n0_”£ÙdX€!ÄìÌ•Äö±iuý²®©PMmBŒäÍ]Ò³· œýìcoW5µFԯȸ–+ˆP»7¢]NI{ n)[и n Ð÷óIíÍ}Ïë¡öÛ1›±nDƒ»Ô Â^É<7òà•¸êÌ“ÄõWº ½7ù‘^¬èËâ:ÏWê À|`0ß1ÌšÄà4Èæ<s0Û$ß²ŠöËiJ­í¿e…À´cÍ~æ”æoE—~é_"^I«ê9Š‘×Ó “òZŽZ…^4y”¥_‚ÞßÝ΋¢,T9(õ¯z¹k=Ô5,ÏÛš¿ùñÊÂÙ ­µÍøOóJ_nÐ"û_-Ó/!رFç³!n¹ptß6Cè²ç.Šèå(øb®Ó—M}ÉÿÍ`Ü`´ Sþʰ̇䜦A£‚ž2ØeR€¯ÀXâ]RdIGP~+,ç}3›^P>y/ ŠÓýø|M«ÛNêÚR†ÅLƒ µÍû¤¿,w|]y§z0Ø~ztxAßýÖòe;yæË‰lÆ}<=>¢üÈNq‚Úuj!:Q婬+¯Ü¥6·Ô¹•-ìÓË£Ô‹Éà‹.}¿Ì§c­Íã(LfÈWÒ>jU é6Ãl—¦a˜ŽÄo¼³ªzÎ:‘Jcü)½®´sŒã§L™JÔ-ó[ŠòãjêŽ:E b_;q]v~½S’x8Þw´8s´0u0ܹ¹d+;'ý#s€W\5ÁOƒ—ç×CæäÿEýÖ€ô¿ý_+>7ô@]Ú~éÕ½“èwqz ¾‚¬ïW€qƒÙ0˜¢0c†Ë:ÇìbË¡Ýf˜Ý@ ?À_›YxIz]¿ºO‚åPhl&à-éà`J›‘ønXêçz¹k-²ÿý†Ré4…WÞ¿Yõ2Zõ4X~«² ~“•5ç_ÿoåƒÆḞ5Ó-‘ ßí’ùµ†¨IÂèÒ¶ðâvðâô¢+ø ’¾ßŒŒµ( Ãt†aúßµF`óp×ÔÚŒúv±pÌ0†•ꪞI{Ü!±6ÿòÏ^»¹¯ži™‰ñp¢Òαiuèt—ô LðE¾æƒQÝ%Œ¾Š´ñe€Ë˜Œ”F –;6àn`^Kly2+~@ÛæW·ÜÒ8þq·îK#§`mÓß—É‹T{¼M ×¶ò¼oä'lÆÃ]¦ˆëºyܹ‹zQ|q}YÕ—À¸Á\ŒÕ(l|àÄ¥0\Û.‘‡áD–t¸¥Ö"0ÛÚöÀ.n—txË*šã{xaèQ¤ ޤ¾ ·ô´-cò‚ ZÙÇñfë¡óvëlôÇ8ô¸+¸ô¢µì ·¾ôÆ Æf††áKó€a†C-±N@^bUaHœ`m¯=3ÇæÉÛ0p|¼cU^ p½ì5sMcq“ ð†ûç6“WýDÛËMécq}›rw¶)ÏiRø˜ŠÀ„chÛ‡”š¢¶Qn¾mè ®ƒŒ¾ƒRÿòVUyhä{Ï66µ¶ïczòâ^hŽñ­#sBf¼t—wôò ø"[væ¹¾¬šÈÀ¼4Õòø" G–´{fÖ?²aeÞ0L ÓÌÚ4bŽ$³ŒôÎjÈkºc…À|'h[rMoXQ»kY›†½Ô{Û>ëÖ–¯xû¥®xC¤Þ'ƒì_ÉCz)-¢¸=½¾_È”7îò½¨/;£X_fóÒ`Ì æE9f†ÃŠÚ<2êÙŰ¾|äÓ˜e‰YÆø©S|Hakdiâgh1¶‹-âîNžz%)?[ß>é_\ÔÔo€×®ê•_Ùm^Ì3zÏ?$eãoªw—“Ž^$éåYðÅÈ+Hõt2˜¯ æi—0ï¢p0#Î0S€Yfø*‰•>¥ô6÷iŒžÖ¶å]Ó¸T\Ì$Ø@ÛbD꟰œ¦üPVÿåÕÄ”uêäñÊ]j›Z<[îb‘^_ìéK؇Góu—0º¢0 æ5ûç6=wŠçl1KHf`6%¦‡±~P~bU–.ʾº½pN\ÞܽmÅ}ž!8Aå|ú¶Ëüa«¡'jLyæàr'¶¼ë%äû°9’ù–eÔé¼ 4üîòš^ÞÔœ¾ØruA_*À¸Á˜ÂPW¤ß%V…µÉ}HæfMi.%f`Î1¶-Ïi”x—ˆ9€Á¥Cßô¢ˆ9ƒ˜:¶ r×àÐw\ò§ˆ—RÏ Ý©çž^QÜ.í’Ìw©MùSúøÂšˆY8é5F–^<øòN_Z€qƒñ(Ln6Ñ¥à©è–ÊÅšÒÜbNfCbq‹H¯Ì†Üæ!1ò|Œì‘QŸÙ0 lÍ(âÛÆVšÒÿàb1u;að¡}*i)h½ÉDlOúvÝRk+ºÆ…MÃø4òòŒ^\_¶ô½°  c—0ú£p04sÁð x¾ã§ŽñÁ­Q%°.ôS+jõÊj6ƒlÏ=#?'5­zHspÜusM£[Æ_Ó¶EDjm_@^34ÏÜ„mw©-¥¦7²¤r€o`ˆ^cÒËOúúq£/ óÀX5˜¯£0¢ $Uõ¼ñÊ„h‡%N1¤Ó—XécZTi‡Kr5Ük}Àцf–B ¾Ìa…¢ ™†ƒµÌònOJü…¾×¬5ôïûÑ>Ê3§°kj OÐ¥mÕ=“6ÑeàUãôb6øBÐéËs}ÏÖõÁ æ·(Ìï<ÒÓëúµýr Þë@ Àß`¬íŸ›TÝk\É€j$Ûm«¨ÒÇxÈïYÜ$襮“§êKnº„§%¾/—Ù÷‚¾ä…??¦÷ülçG˜Äe5Ñ×·å>$ó‹»ìЋ_ž xf ï9ÀPì ¯ÁúØ7Qø+à n)`]ÿ\x¶fIbøµŒ(ÉjwMaÿÏc’UÜ3FfWD-"à¸saÓЇF>š:¶^ª*ÀQ¶f(zeÿò­øF×þޱ?Ý…?cʺ ‚ —í2²ä»ÄÅõÛV‘°¹+(ô¢"øbY_€Ü`”£Q°ôû¤ü–a£àÈ÷Yba¸1 sM©ÉkºeÉùPj‘ü6¡²¬s&€© ?0òy©÷Öÿí‡áH8•çÅ bm2ÐõxHêç y¡•§ïÔ4ÔtíyÑŽº¢mÖQ¥Ñeo¼³¸ã–Û‰CAù=“DQópD#/fèEsðE¤ìŒ ¾ßŒŒ‚(ÌóŠ´¸ExYç˜Ud ”' 61H'9MƒRªaÚïá¡]Œ_NS|Edóš$9¡²;¢¤]Äö…”Å,"bJk[û$ >*é9«ëÚéj[i›_hº:V*zo% >ÒM½´Ö~H® +j—qIA]Úæ•YŸ^×.°é.ïéÅnðEzÀóUú^X— €Qn0vËÑpEa–®è·.…áÄÁªÄâ–‘ *ùç5ôִì‡äðâ6Œz¸æà sÓÐŒMt„C µ‡ö±ž™õ)5½P“ .h +j{h‹°¸ZIǨKr5+C oàô¢3øò‹¾ôF‘Á<–%ð µ¼K¬5ƒl§a6ƒw`¨$~í™WÑeSÓ'Xy^ÙÜ}þ‰ÅC¤]’C‹Ú>¦ÕAÑMKnqå]Ay-"fÈ/¿LÛ¦7tr…Œ>wa¥å5g”tú¢/+Cj°n0: fÊp\yç§´šû¶QÐî4̺Äâ–ÌæRbý üäêU¯L8ÆWÃÚ”>¥O×ÄÉ]×\ë«ë¥{FjmŸiX$Ïü©c|RUkJ-ÂÜ^h·-#wö;IJîUîò/½||y§/€1g0&»„! ÃáÅ­îéµí¢!ßl˜E†ÏnbeÔ4;Ä•·>sŒGê¼ÀΉUå]bæpKšŽx,U¯,®ïŠü&(¸¥€ã*xE/¥½òÈ ,‰YD Þ]§=úúÁ§/c€ùÎ`œaÖþ˜ZVÔ*ó>Žý†Y‘øÀ!¬K|%Æâîéu¹MCœƒå-Ì •=aEm"ˆlZTß?}Ç*’.[ÿÜ貃 |Þ¾çàWŸÓ4(bŽbwÑM/?é {ð½Bß¿™ŒŒ2ƒcØ>¶,²¤]Á5Žý†YiŒ†@âGö±ÞY Åí¼Ö—¡›‡f¬)#°`Ö÷®u´KrMNÓT}´V‘%1”9HMß,ÎÖÒ⾉˜…^Ü>ÊòÀi6$V÷ÉJ¬ê1#-˜¾*îécó«Ü,áÄzStKM­é}ŸTÕF·ƒüÀ.†‡;‚·ncgÿ‘C,«èÂî.ô VÍ[ú²0ê æïr4Li6VtMÉkÒ Èeûìæa¦a…Õ½“ìOaºcý ü”š^ôXø]bUiǘøù"Xۯ̜¦A ŸlHîMÌ<<¹ª'¤ UØ, atiÛ+Ï p#n=wù™^T_Dõe`¸ËÑØ2à ³ôw+n^Þ9n^ÄÑb–0Ì `®%¶-/j¹g Ó*ðµÄÊîÐÂ6dÆŽç×÷O?„(°¾x›[Þùº<Í:º´a×#£¾¬cLÌ"œw^6kÎð_lëëË–¾lŒŒƒ©HWvOXG–p±¦4W³0Gƒôó1­6§iˆ^/ Ú=î™X°Ž.1ƒ}ím«È· %í£Pí˜ûÒ==¾¢Ë&ºAqéT˜s›C‹ZEÌðá.¯èÅZðÅ„¾Œˆd`,Ë£0û §Õô~J­¹gÉõîœ0Ì6À,KüÐ>Æ3³>¼¸Ý³9Ïõ½c¹¶½÷Ü ‰¹ËOã|s£K;¡ºC½À¼¨Òð_˜Å½¢[·zÑ*ªDÈ,)tqzQ|Q¬/`oŒ,Q˜Õ­…¡b8ª¤Ý=­ö¡m4D›,±'1ç_…±Ì‡¤°¢ÖOéµìÝâ9ɪ^™] w¥àš’ZÓûºâΉ•Ñ¥Šn©PsËòX*“ÛVë;ûOãøÎ]X»{!øú#ÙéK`Ü`È æefŸá‹»¥ÔD·‘×â€r¯CV%>…›2·ºùJ[/=Òã*ºlcʸJ<É ¸g6 ˆ["1KÍ;«¤}Tݲ9»õÑe’ï‘÷B…ùµgÆðìÊmËHœ^Ñ‹ù²3WúÒŒŒÙ( Ãäµ8ŠÛä?$óëðÕ ?qˆ]ÛÚƒü䨘›RÛû’<Ê©M¨\Ö9æ•YÌ,ƒ ü–á™¶MŠ,i)lemý)(Ä=GW[Ë2BEò±¾ûMã`ÏŒú¬†1ðP宠Ћlðň¾ÀMZ€yk0Ròø! Ãΰ¦ovf}¿ºw&L»_)ñ#»86/ÊkQŒÍÑ[yÌ1ÌSÄuuï,¨FE1iwm¢\’«Á»$ÄþcÑ}¥ícã+»A†WÜKݺښ–M²ÿ“üG®â`p^Ó 0XÄ,LpÜEGw/:ƒ/*ô½ 0,8QF†•ÝR [†uýs8g°ǯBÎ5ü6¡bn™¤z¨ïQ'w ñݬÄÿMJþ§x{¨¾FÏ?GÈ4”Çî ½P_4éë ‰¾t†Ý`A-G#Ȱ· ‹š†Vu›‡rq²à†á`8~`í—Ó˜VÛݼ&„H¶Œ,©ë›¾m«÷”&ïš’RÓk[ÕêäÆUt…B .Ë£—ÃT¤Æ%úRÚ”äsºw\´ôDŒƒ0è.ÜôòEð…©ì §¾Œƒa-G£µ"Í"Ã%í£Îñbf¡®)ÍÄ÷m¢ú¦_y¤Cð3§¸À¼æ°¢6Èg7Á 3xα]gK8Á°ºOve÷„‚[*÷F~ᖑűåj>Yðq{9þ¶Éü9s®ï—&ùýÔ¿R”>×s»‰¤»‚H/¿_ˆõe0n0¬ òpÕŽ-ëpK©¾oÉíî1|Ï&²qpZã›õ¨¹XÁ-%¼¨Íd;¨70†ÛæÆA‚Ut)ƒ˜XmÂfafáE-Ã3ÂfáPõ×¾Kª /n“zŸˆØÚËÎoÔ†¥þ9{à³6)ùc“Ìíßh ±ô‰â¡»|D/*‚/:}/ê Üd0Ï æ—.ažGaŽöά-h‘tއf“%6%¾gY?0¥ÁpCNÎËo¼2“ªzLB áÛÉŽvÇ*res÷©SÜ]Π=°‹ù”^—ZÛáóúF•¶ß¢»3<’Ó•LJþ@—¨{{Í×dAK$`ÊWf$¾–ú9Vùù~vãô ‚¾W̽ÁPË£0R ;Æ•E·É¹$B¹×!Ë_0'ëä¦Õö)}LEh)ˆ{ãÙ7½xÏ6 Væ)Mâ]Bdi»gf=Twx×&2¾¢+ ·é&R‹OÝ2ôk•ù“y·ÒŽ×—@Ûk.Y4{JexBòÇ*¹2ºï Aw1M/_õ=XÇ7˜£0· kødf7¨{eÀ²ëð%‰Á <"hÚ~Ù~9¡…-“ĵ´Ú^ðÿŒšGzap¾†Oh¬°jYRÑ5.霈à2„Øì•ÕV×wË*€UÜÓ Z‡ur¡'%áœYÒîœX‰Ø{«¨ëÔ#ý+EÙyÅ_Žg>Ÿž~þüùôèðdkm+#hNæËà,‚ÄwmÒœŒ¥ÈËßôb+ør©ï9À‚b0Î0 K¿K(ëÓçb¨·;¼c¡áéšRíŸÓXÝ=Ñ62·ºµÚÖ.‰ÜöH{‡ûGÇ'§¤Ã#ðÿŒÚ.éܘòS›»û”;!,mT÷L–vŒàå“Õà[þÆ+óÅÛò¤˜2ðŠ ›ˆ‚Ðåã0ÑË[ÀÐtrÛGçîÙDAÕM«í—[ÞiR€Ø[g©®?(õ/ ±K/ºŸiŽSÒ>©¯iþÕ©åh`ðý˜ˆ¼|O/?êëÃD_€¯f؇/†e¡Æ`D+Òœ0,d\Ó;y6 ‚õ¥å?$8[Þa€°´¾½¿½w°G"+ ˜=>9ù Ýqzz îóðø„tx î ks—´¼¹Ká9®¼Ë5¥FÇ?ç™S<$6Y\ßQóÊDàºá®uxgÊ:Ç ,[FÇ•wª{g!öv½}£1$õ3Å×§Ó½‹‘ãブù—Rsp†â=dÝå„Þ袗¿‚/ô½0ìQØKåh~‹ÂŒf q.yñ ºûÖ‘/‚Ÿ9ľO¬è7@TOÎê<9ÀƒGÑ<“}rzžYÞqìœP)ïšç:…6ð¬FçVÙÅ ðXÏãBΖà€ð>ß%’‡@]z þæüFc˜ pôûÓý:…“ãƒÁÖY©¨ýÁ2ºÎð£Ë¡»|O¯@túêÑ'òÀ‚b0Ê£0*Ž)ígägޱl-¤%ç’œßÜ2<»±³O:$gÜSÞ¡{U\þ . ɇG»û‡‹ëÛm#³”k%œÐðû¤ªüæá;Vl!@ž¦•Ý8` é(ñð¢6ð)·@ìÊ&ØùúÕŸ¼™à>{¶TÁ>¯øÂ]§¾,Œ̾Á|ɰc\9eO$V¦?µqN¨h lîvÉQ÷3ÖrD>9=+_í‘'Ö2ã*^¼åY±:§qÐ#½N À4|²ÛGçd]’!¬iÇ•wæ5³·Œ†]ô-‹ŽWÉ`àÏŸ7Væ•ÿCé ÎU¸ƒ»üD/jÎØ+;³¡/c€ñaY…¯`X?0·°uXÍ+ƒùxéWîià<»¼¹ƒQw™t'ƒ×C)YŒë¬"K"R ¦6p`”/lûìˈ·ñ• ýÓäeŸ!ºO 焈âöw‰U¬ÿˆQp~|E—ªg‹âÚ¨ëHè}ŸCz/¿{}²½Áä7¼æcB8_Aü‚B†òÚN¯µl¥tÞ#殀ÐËûà‹}™Œƒñ( /ÃR ÒvŽëä0:)˜†ÔõMmï@; ­Åjr8ÞÚ%µÏzeÖ+¸¦ˆšÁë"xˆÙåÍ'±HÿØ>Ö/»1¦¬ÂûÔñÏekô‡äêéÅ ðÞ^Úµ—aïl¢ò“.éß 4LDü)_1Ö0ú÷—iHÊÿ9Y_fòkÝJöþ°ü€…Œ55-3ïMHþ8)ùÃYûqTò5²×>½Vy¤÷ iwyÙ×Ë;za ¾¼rÅ&À¸Á¼ŠÂ¼aø¢Ä7 ƒ€¯@ÙËÝÃÆ!ùí£s{‡¨íß…;ƒ´?HX -lUù˜&Ä.IU]ãäIAð,ë’”^Ûg] á}ÚÅ”¥T÷°2ZÜ"âSj-ai£k|¼ &Ëc’känA‡$¦,­û®[ú7êB;1§$†§øÐ,bàûZaZòû™³¾aÚ¾Bøž‚=„îr:³“ô PðÕcÕÄ«†Ü`]4Œ²(Œ†SkzÁ™ñ¾u$µ.­é›Õ24³p$xòÒV 0´*¹¥B+qRUO@nyGøVǫ̃°4·Ô€%¯Î,n]Ö±±³ÞRŸ,ÃYÔ÷¡¾{ƒì_ÔÙDa/¥îz¯—Ê‹LK|Yñj^å÷£…©Ï >¬äµ±Î~6𥌤Îûb9‘Ëô^h2¿+i;Âë./#/zñà ƒ¾d€ÿÒñâ ƒQ…a«H#Ä0eEh §xJE:»a`k—ô?èÕ¨A2î›sO¯}æ `½“DýÀ<:€EÍÃ-#ŠÐÞmXQ[DqóJ2YßÒŽ]²¾Ýãó>lÄ_E]ÇVÙ?iBêÿ„êõJ9ZåÅÍ^„‹F–f/¼[9+ùõg/Ó;'óÓÊû7ûÍ%»iDý»ç;~Ÿ¯p .wù‘^T_ÔtúÒãQ ;Ä”eÔõkxez¥×-®oãвr¬oï´ ëä€0w“Óõ«Ÿ;ÅO/n‚¾8ø‰CLlY‡wV=AÁ›ã’T9³üeœTpAËY½C€™´EÃûûm•§G‡ŸOO@;œXù¨MÕ—~“üލwûdwû|íŽVê·z¤=+D#y‘¡—§5gô•‘Ñ÷+À¸ÁˆÂ¼`XÙ-¥¶or~u‹txŒËÊîÑ?½ø!¥ú±}Œ ëËýŸw F—•vŒÞ·F`—$p™eËFðÕ/DåSjruÏ;ò*Ð ô5 !ë»ôEßIâšaP[‹A²0µ-ÛÈÌ«üÎÊ-Aü]ý¨MÍÍGÄiê·Æ%ŠSzzöÈ‹ÓËŸegšæý`( Fɰ,œaÚ ÃÀ»–á¹MK;8¥ÜkÛ{±eä®PaÓЛ&¬ê’Û4Ût›ÜÌî2ÅlóùÚ3½q ó>‚MΛŽNDq›n@#}íbÊÆV©ïÐú9¹tÏÆbŠ:Ž´AÞæ_þ ²2ˆ¿§û»»UYz‚U´íasÛô¢8ø¢Kß‹óÆ`XVêàwƒaŸ®îeß'Vv“pA!9öŽ [‡U=ÓÅ-Âo^ˆÁ ÆçW ‚òDÌB!D‘n3³Œ(C{·Î qr®Ét_–ovçØí5ŠUd1»Ë@*è8µÈü>€g%¿[xsm#ÌaÍß|^ñWÚoMHþ˜¦øPÈ(mwqz‘ ¾úH•¹Ð—À|n0Î0 MØ$Ø88odvWòcïਠeXÕ#ý–%3†•>¦Nן9ÆÁ­/hì£ýs£K; ½[ÿܦԚÞÇö1—û}Ü’ëú¦hß–êž åO©,DE™†„|#H~ß-û‡¾¦)Ö"/¯GZ±G/rúþT§ï+éÌ’Á˜éFuF!â¦!>™õÄ5|¼œ “Žò[†Ã·-Ãév»¦T—´>$wð܇¤â¶›¨ïSÜ<,º´ýlôÅo=qˆÉi8<úºrËÉé©oVÃ-‹pÖzÌT¼7)ùbîÎHüߤäýÒ¿T¨>rÔ05°æÚ]~ ÝÁ½ú27{Q˜ë¾apß:"­¦w{ï7!†›‡ÎÓðÅ`J9êf»©yetO,HCÚ,ù.!¼¨õ}Rå…Jòˈˆ¢6Ê”_ê1±°f”ÏÙbËî¯_Rwÿ…=õJ|×)ó{5ͦv1¥m#sqsôòyÙ™%€yf0Ÿ•£1ÂðM£ §¸¬ú~\_äŽ)ítN5 £ÌY2 [QóÎÿ·¾À~ûØ²Š®qÈîóÌE¿œäêˈ"Z,…MBß%TN/®_x@ –~—ÀÀ¯µíÚà‡EmÓßWÊÝÐyp}î—ß2ä™Q‡zwÑA/Ÿ_èô½`4u DæÃ@_ùI5½“GÇ'¸ˆ<9f–7ÝRªŸ:Ä¥^~Jë™Xxæ‹@ü}âVØ”×í^ôáEñåê^™_÷601 ʯë ?>9qO«1 åxÇ¡ ø«Ð3ßµËü¡¨ãˆ2 ÖôÉì$>¶aÇ]œ^,_HÊÎ>Lp¼`þ7eQ~†/ê«ð!©ºg×—çG×ø‚QP^pAKf}ÿ›(H÷Å£ßd]ÈÀFÁùÐÞ­kruBE—ÄÛxÊ?oK¿K,ë»ü’ Kz¹Üì÷g¥®Û-ýÛ œ÷KÿÛNM‹bí=›È ¼æŒº>Œ¹Ë¯ôb°ìÌ6À2íQe ß4&ë[…닚cek¿atÑ/§ñ¾5ìß4ÖðÎ>¶‹†ðnAØ Éo‰/ï"ïuö•{V‘±e»¤Ã˯7·iØÌåN±ÊÏÇiÖž„¶{ŽR~NÝ…SÁ5¹ojÑ((eîÂN/êjΘ-;m:,Ìw]Â…é1|Ó(¬o7®/ŠŽÑÅ­ÄÖ‰ö±y»èÒ‡¶Ñ7Càø®U¤KRU^ó´wûÔ>6ª¤Ý'«Úõû6¾bêR×/yüóÉ©NãU㟯^mê…®KÜuÂUû(p4ðêû ¹›õ>Qòî-óp—ĪšÞI4¹·» ¾ØÓ—=€Ñd0…¹eø†Q€„SlIû®/ªŽ’ùÚ±EÒÑ1%ʾO⦔y{áŸVÛçž^ íݾü”ò®ClÙYÈyã™Ñ00M÷ÅίlYFC²µŸ–¦E£ì_Ð<#ñ]§ôÞhZS}•pЬï*Ñá.N/:—¸bU_¶†È`„VêàQÆÃí"“ªº¶öð­PtœœžÆ4O®ìŸ|Y‚˜°´aRpÏ:ò¦1ô+¹¥4 묄 •‚¤åÇ–wêøå€ÿæ›Q×wxD!ñ¦A¯ .÷õ£5¸NîT²f$þ¯OúgÕ7TeÁ•yXáðÌò-ó0”ºË÷ôb øú°Hï9ÀÚ^˜1X—O FœáÛæ¡Ñ%íøÆ‚h;ÖvI‘ cßÎÛ#F·´*le9pbt6,r×߯WÄ”vH¼3 óL¯c²–xjMïsÇX¨¦Ô¢³UN*ý1+ù=—úöKýÛý• mÌ}jSÒ>ÛÄ;wÑG/Ÿ_DËΗfß`ž Ë£0× ‹™†¸§VÏ®lâà¡íè ¬÷ÏíÐY»¾êG†¸y8TL>´ÊkJ®êè¿(dœßœVÓ R»A`n×ø<ørê•Q'b!À i~Lèˆ éz%<$õó´Ä÷œUž{¤½ ¯q°–Ofÿôâ#Û(œ^<øB¢/ À¸ÁpŒ.†…Œ‚,  K¸vh;NO?çôÌtά0è•',mØE—Ø !SÒ9!¿yÈ:²˜ã±ÇtÛS‡˜øŠÎüfmÓkŸÁ±ºµgSʽ¸–Âø˜V‚µ¬¥ÿÛ7j%ò"]Ò¿ Ký“u‰Á›dÿgûFûB‘ùMdZmoju_º‹5zùDßoæˆal•£ù¯"ÍÃ7 ]“j{'qíPx쎂k†‰›{ç[ÐÒ9öH‡~9 9.ѺiüÚ#­o’(Ižª eUù˜šPÑå–Rý)µ†ùF–C3Kä €¹÷BËorI®·£üóµ–çkåR9á6™?@®ú÷¸äOæ,wÁweÿçùJù¡î§Ë«´*º&÷L,(»%ãô¢¼æŒ!}éŒaƒù+ ÃÀðcÛ¨Ôšž=zÓ1ñƒçÇq3¹mrsÿêßNNã€SÈ„ó1÷,Â)+PBª/hºþ9‘ä9Hõö;º|ÔôN¾rOƒfOûó&b:HXRóÊoÎ……2^è¼×S7ux££ô,Véiƒìß²Ö ûø§÷+E]uq}oºÞ± /j-lâ±»‚C/¿_Z€=Ð`dXÜ,Ô;³Ž¸Žos„Þ HucKû‡Ç¬Ü¸¾JÍ3]˜SƒA†N®îñÏi„`§¸òÌúþüæ¡«®$ÀÍ$èåïë\4 zÛÈìsÇ8ÖÖ¨bi$3xJò.‰Àuý€þˆ¼|I/õ¥Œqƒá¾0Œ4Ã7MCòû§qçÐyœÆ6OL,oS' ]y–6Ô<3DÙÄtÓ8HÉ-@¥ê™­¾BÆÁ¾Ù ãó«“ĵ+Ÿbe×7Ë)sÜh4ý”Z“\ÕóÀ& Âeªn™‡ùfÕWvóAä…Ÿ^”_té ܤ Áx†×`.–z—ß™uøØ+”û‡Çõ£Ó«;' iŽõ}»˜Ò/ËP\j7Œƒ•?¦vO,߬ÈVõHoèŸfëy–wŽ)¹B³´²qPÓà´MT1TÀl£ªº'ì£KQè.—ôRZ|Eçìʦ†Wú+ªÐ~xð…¼ìÌÀØ/Gs…±U‘ÖöÍìÃyCù±wxÓ4>¾ÄÆX¬Ík:iš‘y—x¡J,ï’Ô=¾ ò1:z¿L×qŠ+[Þd¯³£ЍçÍâŽNqƒÓKr.‰PÅ_ëÈbzñ7€·îBB/¥¥Õöìì€|Û<ôb:ø²¨/»ók9šß*Ò·ÌBC šñø‹þc˜¸™Ô:µºsù=µŽ<±¡b)jjQÜ=>Õ´ ¢JÚØ2¶ÿ.¡â¬TÎ-™oãË󛇞9Ä@1÷—ÌyËÐŒ]t Â.çî2ÞœÓØÎå£Ï죤ãÁWJz9mc0 CÆ0C‰µ}ðø‹£r˜X;º¸ËþX, ï:8 +l½mFä¾Md|Egxa+äK*¾ü”ZÝÃÉ`ûÄŠ®ÇvÑÜ?Ôš^æîZ†sW"&Á^uí£³âf!ÊÁÑqE׸Üûİ–¨’6Èãïm‹°°‚ŽŸ^ëð¬¦wæM.VÏðH«‰+ïd³”M'×Þ0 xáÓ=¾`K ÐM/'Ûú«º§LžW,Ê;GŸÙGa•^Ì_оÜÌ/åhD+Ò0ŽÏ’tŠÉkÀmÃ@ýùè$±u²žÃ Ø:vö’«º[†fŒƒó XÚ9>¯i‹Áb'ñåOí9?UÜ6ü>±òö1úêTBÆAþÙõåcäøkÀW‘÷Â+ã Ü™óåi§—ÖeßÅ XÍ™×úÒpÉ=ÀÈŒGaÆí†¿]Ta _ùõgðÒö>u|r:·¾S?4{Ï*r€5¹ñ7¿ºåš\u‡£!T÷­#z&´|²ŸœLÕ¥‰¿ò.‰Ã3KšÞ¨v—;z)Í+½få|ÎéðèGê ´ÒËŸÁ—`( öäkƒ±Áð}«°˜Ò6~pT ˶ö‘+G::®^©è{Åã Í$$‚£XFcYEqÐ ½´}TÊ9Ž]q/”—…Œ‚’«ºË:GùÑÝ‹¸&Uumï}y`Q(b(ô¢N_*ÀðŒ3Œ,ÚÞéí#³¸mè?HÖŸÁ±±w×<ÑEX Ìm†bÞ-m³*a} B&GÇØ0˜Í]Úšß|¶!ç«d€ø«êž6<³¬á•Ž:w!¥—Ò*»Æ¾®¼Æê8,Dé…|° õ%£I7zƒ‘dXÈ(àSjÕÖ ç ýÇÔÊNRëäÒõç“ÓÓ‰åíÚ‘½ƒ#ÂÒÆthþ\ÕeÈÁ®ÉUOícŒÉº¨©˜YHãÀ´Yh¾¨i07³†ÄLCÊ;ÇâË;ùÛ]J»gÖ?E¤}Û [†ÛFÂJ/|éê{`>6+Q˜s†%£³úqÛðúóå´]9B,ì'wÓîå7‰C·c.Ò#½Âg;¿º Ôñ˺cveœUrMjUtMâfÊÐ ƒ߬ѹÙwñØw÷ê®\mŸŒ)âÚ·Ñg^8Dó)½¨Ö÷2ÀxÆ*æÁycs+¸m˜¨?ƒøÛ‡Týysÿ¼Üôò—W6w- ¡øŽEx(sŒ‹>îŸ÷ͪ ?¶‹:]EàÉ•©5=Ïc¸ñòŽEXmï$x8» ?½”æ’XN\Û¦}ÃV·è „Fš^TלaÒ÷ `-A2Ci61 ôάÝ?8ÂyCÿ1¹B^áú3u·% ~óÐÌCÛ(H~j\Õ Ç3ß%öN.$Vt½K(×óÏ~ù)EÂ)ö¡M„0Åã3óò›?¦TßY™ 8cˆg–ï[…ó·»Ô–PÑy¹£JÉ5]ô"PsÖå1½4óÁXˆÂp0,í NF¸mX©?×-Á½þå88:©^(êÿfšÐêÖÞ»„ H~î“VÓï²ýþ)bMïdf}_\Y‡Of{j ¥M/®gÔõz¥×R¿Bm’*­"ŠL‚óÔ<ÓÁ“¼ ž-=>ŸÙG÷Mí£K0è.'K7‹š5 LŸ\,½èûg‘¤äz±|/LŸax ÆzFÃg›çŽÏãõgLÔŸAü[Ú‚iýç ÇÖþatã8ÁßÔx› 8 Áß>$•uŒ¢ñ}><š[Ù›_i"¤×özgÔ™…(~H¼ qhAsãà´˜i0BèòÈ]j{ù1i”^GÕû„r1“` îàËŽ¾—†Ë`Á‰Â<`XƼ€-^ÆÄ1¶´ÙI@¬þ<~V&ÑÌ99Á»ï+Øž8{©æ Ï,aâŸXX× îi5^¢gâÊ»$N,¬êøfaÄ]v+ú˜R¹¸¾}ùÍ Êm¼cнxð¥øF}9šÿ¢0— ¿pˆÎ¬ëÃmÃÄQÜ?W;¶ˆPýùø¤âRý™:Щq`ú–y(7úÞ4 |—P¾©™o ·Ïøç4¼vOÍkȪïw©3ó›öéí“N ­Â9 —ÿ‚/’ú~˜—£% c˜a-¯ôN|÷_,[û‡‰­“#‹ÈÕŸ£ǦW鯒±°¶e”Ë À÷¬ÂCò›I‡ÇØë8<ªë›ÜÜ%)~H„]ÈÜõ‡n«4r“qŽ$,Ò}CÈSm"0H/:‚/§ú~Aƒù4 óˆáþÎq¥ëˆ,)Œ\ó¹=3ËÛHDFÊøgðì÷ó›…M‚8^¿Bî}B\YÇ…I¥ØbØ;³î€‡¯Ý¥¶÷ñå «[tߊÖá™çöQ|H/o‚¯ë~˜ŽÁZ|d0Ÿ2|Ï"4ª¸· ýH½ù½³mS+{ˆDƃã“ÒÁùÚ±EF78==[Qø6²Õ´}3+»*»Æ1\“Ø%Å–u<äÆ`}´»K™Y$fTм°åSjµ¶oV÷ø<¦;à"…°´®å“?ºÈE^Ú&éÓ2D¸¼þí¡àϵ»¼¦kú2Ùr4¿3 ]ß0­ÄwÌC špÞÐÌoì¥wLÖvà/?“9YÙ!…Ö¬í^}e¶°¶eQÄI°OfRe—¾ŽÜû„¢Öa¬ÿ‚NOO›‡g»òa‡Û«ü2§È7³nùª-#©£É]èS/zè½`ÞGatU¤QǰŒsl¾%Žº±ÅÊaâÆÛŸœ¶O¯&µN²X}A–€m£Šsž9Dßµ ‹ä‹a€‡GÇN±¥C+døÄ.JÂ)†ÚžÙG‰›óÈݯÓy¥œ®Ž¿€!£W R¯$ê€ÝÑd0ú£0ŠÖöÉè›\ÀyCù±wxœÑIèŸß@fû£ƒã“ä¶©žÙu–n|t\Ñ9Æ®¾·ÍC=Ók’«º…Œƒnº&UòA?ÁýSD¶B0@WÒ)Ö$8Ï#­&¡¢3¿y°¸m˜ÚÀÅqJuwH~“CL‰ª{ê]V6½‡Î]J2ôÉk\Ýܽòå³°|¹n€Ù7˜/£0’i(¶‰(\ÝÚÅ…Cù1²¸•Ó=CÜÜGD‘Ïsë»!µ£»Ç,ªÓ=>Ïq0åŸÆAy£|±&¸yWÆ ½¢&ÁÚ>™¹¥í#Ó‹Lþ I‡GÓ‹ëMƒÓcp¥¢ìš$d€½”¦á™Ú7µÀÊÀ{vzaÖ—à«þ ÂEa–$Æî©UG''¸p(?Šæ'–vY¬ûøä´ft1·g†õv>³f `-ŸÌ¤ªn}ÿlÊ?\C|ð›PõMÉS’Ó+l¤æ™UÒÖ1:ÇÖü«£ãâÚv]ß$ÈÄšÞéb¦A¹ËpñÈG6áÙõ},'Xôêò^/é¥ 0êËѨ‹ÂÆãôÂ¥/#€Ñf0Î0†5¼ÒºÆð=PÞ§HžÛ9ƒÐôßã“Ó¾يaöÆå-mì¸$U°°ü‡„¸²öO©Õ´_”sI(á—*ôðÌò…éC¢&AvQÅí#3‡ÇPþONNAB-j—/¾nFĽ}í¢Šú¦ˆ‡ì|ê.ì3½|ÉíÌMFãóÔ`6Ê%,­ãÈ¡ù˜\ÙÎê" 3ý÷óÙöGUC‹ln6 "OVëëúge5ôÿÒ~QÄ4Ø+£v{Ö„ÙÙ?tŠ¥ê+f®6àevpx<6·’PÞ©æ‘*dÀ±»Üè{pt,÷>©Ô‹߯h2gÕ ;DsÓ…eC •ÃÄÍ}$~M ºõÌ­Ç5O°»×áÖ)¾¼ƒE}o8Æ–´ Þ·¿ð--ß̾(Éì…þ¢¯GZ5Õõ­]RóÁ7«NéCâ9ÃìîOêûØ&Ü-¹bpzñÍŠ aiCÊ)æ%5ÐJ/¼Á—™¾¬Ìÿc‘a!#p^À…Có±¾wÚ>Ý?¿q„Èî¿ÀÝÄÖɶi¶ƒ|iµ=, Üõɬ‹-k¿ü­»–aa…-ûˆ ö†»8¹ª‹RyesHõmŸœœ.mìTw»&UH:F ú³N/¸±ºgjju×ìòÆ1û3#¦_8Da‘^Œ_€5Ý1h0¯£0¯¾gQÔŒ#‡æ£{v­ oŽÝ‚0gžYÞ¨ê ÌiPý”,jxåhgMïô°‚æ¶‘™í=ÇúUtŽ>¶ ç=½|)í_fÉ`< sc0Ä ?wˆL¯íÁ‘CíqptœÓ=òè>"»ÿžœžÖŽ.æõÌræM]ß$‹;æä4¼ü˜B÷»w,‚óš8f%Çéééô⺶OÆð̯žHÃ+›»£³àÏÜ#µÊ80GÅ5ñ™]$ðXÌ$ð…}Ô«I¦Á¹Þ5Ùõ}à¢g}g›ynI•÷,C›^/„éýß7³Ê0ÿGaL0¬ð>ßÍÇÄòvf'aj¡áW€ù šaðpœýxïä+Ë? 9Ç—å4ö‹™†0ºª{jCÿæ«ÐÇ'-C4<Òáqmkˆ°Ø6\×;Ù>2 ®–Ö·¡` ¿e„ zÑ]sfOßK#g0ü ë ¶" Ãàú·q` wµGùЈ¤[ˆ ¿Ä/o…Öp¼Ö4‹?³Éo +har1Ó`·äÊùÕ->(D ÎÇUÇ'㆟Ӌ>}é …Á…düÁ –pçÐy,o“2:§‡ˆ›Çˆ ¿:9=ÍìšÞs|,üÚ=5©²Ë<¬€ùÍ^8ÆdÖõ `˜>V6vdcqz¦—1ÀXí † ²§ˆkø¹GÛôJéàüòö>2·¶{àW5´ÁÅÜAÂâ‹°+6 ÎËo<›#Ëìf7 ôü³;ñUb0r´Ì<·ä[zQ¬/c€ñ(Œn†q€Q{ìçôÌtVIGHD@±ëF—Ò;¦¹¹“±ù¹÷ ÌY½mú)µ:³¾OØ8èJªo™…¸&U×ñÏú¤ÊÎû–¡HÐ+Á—}¯Ã£# ÃÆ°¶wúÀô"~î@á1DÜÌí™Alõ+ð(!µ##‹\õ¹N,¬¾ü˜ÌÜTÙwñ±¥ížé5,î•ûÐ&"¼°em{ÿH üpˆ.1 ÀéE2ø² 0|åh^Ea¾`ø‰Mx\Yû!"+ ãëÇÑÉiAßlýøÒ.RëQL®lÕ s™¶YXÛ'3·q@×7ëÂ.LšÔÛØ´š¬ÏJâïcycç¥[â5=_þ¡ Á—€ñ(Œ>†oèûix¦6NãgT„µÝ¬.ÂØB›‚#»›P=JäòNÎfH©°q s|YiûÈ‹PÖ7¿A^¸ƒ¼U0> µGCÿ$;À8½žPÑ{ÖÜÀŸÎš;Ï¢°6Î0'‹:Dã=Á¨:jF«FˆëHíIr¶_å÷{Î.o˜ç2¡ô±-yÜÈâVÖõ¥4!£u¯´ÚÞ Ü`t^éÕ·Lƒø—^”_о´#g0º¢0–Óð]óפ Ü`”KÛû„¾ù df£~l)©u’û´M\Ûv>ß~€nù8¥ºË6²ˆ]€)éYÓ;7ŸØõmÕOÉׯ¨?£ž^Ô߿ء÷2ÀŸÐWŽÆLæÃ¬Bƒó6ð¡.(8Ú§WJæ‘YüùóÙfÃA5ÃÃD–¼X\ß~ŸPÎQ£ œâ¶a©·±L1XÅ-)§±Ÿ?ö+䛣¨eè‰m4î²O/†kÎ\_FCh0š£0ÿ0|MÏ÷™]dTQ n0oÍýÃìî™öéÕƒ#„rÞØÒVxý($Çà{–ažé5©5ÝBFœLé–}—RݽŽPQsØDùãô"|=.+y`t–£±T‘F˜aŠÁ~Yux-š‡ÇÀÂFQÿÜÌÚî)R˜Ú>U?ÍT´Õ­]¿¬zFvʽ‹+ëpO­æX_ªÁÏ¢¼3jñ*޾ɹwq׬6cª»Þà{%À¼.Gó6 óªcX‡ýkÏsƒïYàýÁ<;HGÇù½³Í“ËÈì}ôùlõ+ŸŠÁ-4kMoí‘*:Á©ã›YÜ:¬æ‘Æ%ÀÔшyc0 ÊÑ8Ãì0,f¨í^Ñ9Š¯ÑØqtrZ:8_?¾´ƒÔâG' þÖv ºCÒáQIÛ],Ÿ;Dç5æ6@¥/µýÄ6Ò2¬ q`<:þ)BøpO­¼eˆqzÑW F}YXà£0¦2ô“yUܲ¼±ƒŸh8¦WwòzfG—¶Z{ãs×ÌZlóø!t%ÜÓÓÓö‘YºRª{¦å5 èúerh­³&j$ý6Ö#µzxf ¯H#vôNÌ+}ˆg#þ &½ÚðÒKA“E€‘6˜F@bð§õÀ2ä]\)¾e!ñ·bh¡|haÁ 6Ñã½sëÐrß=1™Oã@§ØÒÚÞ‰ûVaìâÊz»mòÒ-)(·q|~õègÞcÿðÈ5©\œÅø+(ô"|©b²0Ò#³x=8 ó ‹›ª{¤4ì’ñóLÇìúnnÏÌÀÂbkOÖvª‡÷ í5:»,ãwÆÇ6~YuQÅ­7ôý¡â–n÷Ï"0œ×0±°zŒ3 ÛQÓ3.ësEüÕá)½:<¥—«àËž¾Œ´Á¼ŽÂØfø¦¯„C¤wz58©ñß©dk—Ô80ÅÛçP?¶T9L\ßE.þfw@æ†Üûñùפ .*»&¥Tu™çA-®/ÝvCßï®EˆKByûÈ,qmëï†úX\Û2 È2ðÃéEr¨3]z9åh40¬ƒ†Á¥îm³ …sú6w÷ùêl²¾]ÏÃß·öAüí›_G,þîý«†–·¡ß_hvyÃ<$Ÿ–É›þ–aù5=¬Â¡"–•]ÒWÚ®íî]RÚ6²±³Ã ÕœÛpÏ"uÕfÌל9Ô÷ `OŒGa,1|ÃÀ÷¡u¨ctQ×øÜá1Ÿ ÞÞ#%Wu©y¤ò*7Œ/öÍ!¶öägòì#bZÇ4ã•@â$/Mƒè#ëˆ ÜÆÌºÞëßÔŸ}amm"Ê:F좊„ ýÅLŸØF¼ú˜TÑ9 žÞÒÆ>¶Ÿ›£¬}Dî]ìõ Åg§—Á÷[€yo0Æ£0F5ö—~”[âœP@îžYRú(û..¬ y}Ñ5»Y]„Ι5Ķ^ ,þLXÝ#ooî’@PùC"Ð×>ªnti›UxAnc¿ºG*õ+êž©í#3^é5Š´¼Ó¢‹Ã šR«»3j{¨íSJ•s|™¶O:¸‚KÅ­ÃÎðâÚ–]T¡¨q€ÓË’¾HÒ{ `< £a¶$–rŒJªè›[)ï± Ëc2Óà†>yéJ]ßôª®±ý ‘>==]ÛÞKªì<;ÿúݵ UpIøX^Ý=¾¸£Ä_â/¹øûùlöQß<\íÁ½‚ I…ðže¨gZMV}ßM?Äô^æ7€|ãìAŸÚE¶ ¦VwÉ8Ç}©¸²Õ€Ê¬Ãl#‹Kë§§§¨ïþá‘GZÕ]ó œ^ô_ÆÃm0¿Ea1 Îo'™ƒ£cnëû&-CóÄM™Œ‘~`jžß<4½p„iƒA~îN¸g+>´—tŠÑòNwK®Œ-mO­î¦4°Â ›ú§¸\} ùø;º´X3² ç¯idf™¼:ÿ™…òïâ+:‘¬?ƒßCLIFmÏëOÉàÿïZ„f7ô¥Tu)¸ÄÓF[Κ°q üûøâÖ!A›àô ÎkxdJÞt·î ½,ë Ü„Î`Daœaj»©ïëžR¹½÷eˆì!`x{0l’+nÀˆaaC¿‡g ·`–a`ðÞÁáðÌR`NÃËÉ´é`|Û<䎹)~H+hî›$ C”øÛAX=F0Q%·M6L,Á¸g–6,Bò(êødTw?·„ÉZº \!äÔß· 1ˆ(l©ê×ðJã^_J;Û"4$¿Ip–Ü"ë›ÛðØ:Œ}±O/BÛqL/¥Qþ)Ã…yϰ»¸òŽÚ?BÀðúö^Cߤ9`ؘìBíÃŒ®Í{rrº³°²¹;±° ÎÝ ÀygÔ€æ—U_ÞÞ'¡ùMçõçê̺ޜ֟9RÁ%¡¬cÄ*¼\3뤊ÎQß !ÃHô¥6óÐüÁèú†p¤/N/bú^ÂXb˜®Ä7ô|­ÂòÆæ–/ü5oìì† ü3… |Õ2ô»ob˜]Ò6„ÝIà ݂ˎýƒCà1¥| Uî!‚øÛMŽ¿'ÆßÂþ¹ÒÁy¸£¸ð*j|*º$dÕõÚEqi*[ím\itI«‚K¼wF-¸Z2ʽièÑûP¸„ þسë[±¡/äg'œÞ+õ½ 0/ Ɔ”á[&¾5tG8ƒSÏÒÆv^S¿š{²>C†oøÞ1 ÒöNKªìÀwt¸p4N,—-¬!¸ôÕ6é0°fxiknñÁÝwÏ?² 7 Émžyjù7üîRšˆq@F]{Zõ§”ª¦Ái‡˜bƒ!÷BK­éfÞ ||rÚ3±Ð56—Uß—XÑ[ÒfU^ØœRÕUÓ;±²‰?‡Åµí·±Å·MYÔ—ŸéEkðe° Ea1 ›Ä×t¼ŸÙF¤UwÑ-µ’§“†«ºÆL³ÅŒM^º¡ï+n ÷.Ö7³fba_ž÷óÙÆG”¥¯N[9LÌì$Žxÿ ‹ë. åA¹ Ùõ}<æ ©º§”´ —uŒ6L;Æ‹™AÂíåVÛ;q |½º{ü‘uØ]‹»æ!·LƒÄMÅL… ÉsŸÀÿß6 ~nù!¡|dfµQpå¤ã.là'Hô²|ÿBMðý ð5>þ%ómFšáëº>/ì#3jºuwž¥áí=RCߤq`¶¨Q£iÄ×ô|DŒüïšÛD4Líî¾G'§UÃÄ’y$7>îúT’·þE¦â½¶½WÖ1’ÓÐoYˆ˜¾ }L®Ÿ_™"®9Æ”\¥¯çMׇÉ–à/"4¿ ܆I™RØÐÿ™]d`NÚö8Ù?¿º‰äüWôÄߜ9DãoÛôjvaÿ¡qCà׺¾K*ë¿c‚˜¾ q‚ø <û˜Rù­¾>ܶoù81¹‚):>Ìþ°žÈÄÚ>é#³h‰Â}“ ”?áëLËκ˿ôB§ï730µåhœá«¢°®÷s»ˆÌ« >;ížì‘û§<Óª[‡1YZëúY ~lfUXÓ3.8’ŽŽË‡ªGˆ{ñ7¤vd`a±Ëƒ£Ò¾™7þù׌¿ õÏ,…4=Ÿ=HŽÐ\Ë™ü-ìÝÐ÷c`J»¡ï+é^ÛÃÛOæÌÒzPn½¤cÔM}_tD^Ñ‹‘š33€)G‚Ô`Œv #Ä0 ó0¸®‡•©'§§‡GsË›‘…Í2o£éü=SëÒg˜²²´Víèì2ß,"nævÏŒ,n!ù Ý³k -»NÎ^ØÜ‹¨vJª†ÇZ:dÚGͯÆ$¢¯éCÉíåVо¼Øƒ‚ÌÝ4ìG.QíVëÇ–ÀçÄ3½‚.X¦Í.ª¨š86·RÜ:üÆ=Zk/7ÿ,&Àà¢SÛ;ý»¥~þÉ5¡ö‘…Ís°¥á•¼Æ~ãÀì!7õ}¯é ‚»¼îî…Sß+Æ`ÆfØ®ëùX†æ Ï,±õ7zzzt|B\ÝJ¯éVý”ÄpzM'18 ú‰³ê{W¶v±¾þÊ© w¶ft±z”˜Ü65”ÁÀûæÉåCkûs{ñ-“„Õð¯î5 €Ußα٠܆âÖ¡³]âC`r—Ú’«º˜ì„ ÂëuâÙt÷┳É{·Í5©n›Y„}8ˆ¿¡u£[ûÈq#tV3: §_†ölØGA>™Òì"‹š¦ßÅ—ª~J.i&Oy‚Yß[¦LêÏà“™ÓÐϸL6ý¼®ïsÃÀ÷žE0øü¿/M,o¯èí[f²âúÎþÁèìróàTN}¯{J¥¾oÆS›p€î =DKÍ8½šHè ܼ`tEaT0ì‰i†ŸQE-ëÛœl_zv¶ZZßÎkPý˜$Ä|¾ÿy, œ”?Ä{¦Uµ0$1eåžÙµóBåIÓÄrdÃøïÞ\ýÁݳkeÞƒÛÖŸWw úæºÏ_)¸Øªíx` y§,à¶yp˜$lèï–TWÚ®ð>n€Áƒî1±.§œbK¸D—I,ŸòŸÀy»An¾ ÚÙmtÉí¹!8ªùjwƒ^D‚/E_6Æfæ†áªKfL¹9eF§‰kþYuÏí"À‰ãJ‰©ç£ÛffÁ99}s+àNP«1éè¸bx¡t`þBGìøòv\óDVòý@äÍïu+îúúVµL­ S‚—Dg/j‡F©Õ­ÝàÜF1òÌ©&,½/2ô1 ÈkìÈ©#ï˜ /ÀC„E&—}àjã¶Y„è~Ót k0º‹ŠÈËë‘VÈÒË6À˜ÂüÎ0§?¶ K(o_ÛÞãžÀö‘¯´j­)Wî,bLž©láWRÕ=¶±³Α§(ê2îŸßÈè$Œ,nÒ•²lp>¬~¤n (|ÈåS/yÿðpP=œ×3 vëÔ ˆÝ!µ£È„à݃£†ñ¥’¹ _ï›\Pt&žŠd××õN˜…ä}ÁWt}3Òkzôý2áÖ×>ªˆÉ„uðæ—wŒàîò)½(«9k^„’m€1˜ÇiTŽÏ‚+›‘£ð š;¤ƒÊÎѳ…àƒnèù^gGâkz>*® ÞéÕU]c³Ë ”ŸPDæ¾ë{…}s5£‹GŒß™ÙõÝä¶©°º‘ºÑÅõݶž-¸%¸=hàNJæ=ÊÒ:¦6ö¦×vÀ›g½¿I­“µc‹ð‡`âÖ>x¬ñ勳œI‡GÍâ¦\%TpAöÔ6"±¢£ypÚÀ?‹úõ Ü†È–çv‘°ê{]ÏwiüßrŒ)Bº8½ÈÑ«Åz9˜r4–+ÒXe˜}‰ŸØ„Gµ×¶ êÝÙ?¨èuŠ!KL·©çsù¹F÷âz[’ŽQïâK“«º† ‹‡Ç‡Çà@dð æôÌ\Yd><>™^ÝIïœö©LiŸjŸ^Ÿœ‚Fñ•¶Ÿ’¿Dߨ;XØ(îŸ «©7¿wvasïäìµeuêÇIg£ä–·IÕÃãËðή/¡gvL¿ox“\ˆfg„ðÅ¥*¤brújzÆÕ° ¥ý–˜q@JU—of-ï2yCß· y€ù"¬àÓ¢H¾2à_tÑå.:èE¬æ¬ÉŒÞË `Ʀ?O)¢°y~u¦ž·÷ú'ãJÛL‚²o›‰œ{ì{M—m¯ëû<²5ðÏ$ƒÓzËÐ4= y•÷Î`f½| nÓ3»–Ó=B0½΄µÝкQâæþå§™Ü6I6x‡yâß=8ª§7üŠÎÔdÙ`V¶+¸¦ç{Ë4èSJeçè¬wz øÿ 7PóHÍkì· Ë‡ÊZ:Ÿ =ǘâ­=Òãì&Gîò½ ¾Œ†Ö`Þ †3 £uùˆ%–yÄÚÖ.Ü-ŒÍ-µ d×›f?·‹¸C&9PÔÈŸR²f¨2Óó¯˜I€Šk¼Q@–GjUtqKiûpëÀ¼¹»¿½GÚ=ãØ||iìÙìúnbëdQÿÂË>Y³Aü!2z\ƒ#Ç&–·¡˜´¸µŸÐ:Áâò^C„EÀl惔üÂ>¤Þö‘û¨"á³ÏxöL«‰)i“vŠjá‹Kú¼_LšY¾¢ø ¾é]„Œ¸È¹‹•ÈËÇôj²DïÿÎÜüÿUw»d0¿DaAg‚!Óšž©£«g #0ü <0²ct6£¦'¦¸Õ1ºÈ80ë…}Ä=óËo›Þ2 7!óLi”è œ¾i@§ ƒÛi€äÛf I;E›‡ä¾-I©ê¢h¶Ü;8ª!úW $Z7¶ˆ¤Á„µØæ‰u¦u`Ê<¥Ú±E[!ùmì·N¯$0~E÷œ^4Ì6 ¸Æ ì¬ú)¹°e°ª{\Ó+.®¬BÓk{@>&¯âü[ ï›°É…Õ+ +›;àóÀ'èb(ò ½ŸèÒû߯Ãn0O£0Î0לL+;G×¶÷@däɤ ×·÷ºÇçºÆf«»ÇÊÚ) ¤[·¤r‹ÐÜËÍ.ªÐ?»Žz˼Æ~ðã ×=DïÜzf'axq³on=®y¼îŒ:†]œfwÚ¦WHGW¼½ËÛ¤ÄÖ‰àš‘î™5ðÜ@æ¬Ãüéèx|y+¬~¤d`ž­»˜_Ýô˪{`J;4úy£èÓà܆þÉ”ª.šÉE´/k{§Á¡ïu=Ÿ§¶á-CÓ¬”m‚rê¯a]4º‹&zÑWsþß·\žLß`ÁŒÂüÊ0W‹ùÛE¶Ì†iGîòÅqzV|Îîž©[¢LüXÞNh™Ìï›%níÀ; Ð 2÷ê‰ÕJ܈l ©i_šßØÇ„_ÝÉ nnïàx~c¯tpÞ½¬ß­¸/®™í-‡·÷H¹ }JâÁ§$Îú¾OlÃý²j»Ææ|3jȱ’7 |cJ[ÃòÉˉC­/x ïãÚ†L6] âüÜ.w—·½|B/ûÁ—À˜ŒÂXg}ø*‰Avixyc‡ŸÕŒ·{‡´q³ o6©u$ã­ýCÈkðà÷'–½ÊÉ+?“g±óãà!·wÆ«|0¦i¼ftqdq ` žçÎÁÑM:Zß;[Únž\Îì"„ÖŽ¤´MÅ7OôÎæöÌ´N­p¤§ׂà{Ï<8(§~s‡Õ¥¹÷_ØGb],º eµ>zy|™,Qg ‰Ãµ=3Kë».ßhñù”¼ìFN÷LÛô “E6š&–AИuϬ­ì€”äqP§ì>ÖéÁñÉéhly;»›V7Z20QO^ùyli ÜÿÔê—k‚RÖ¶¼Ð€²«;ß ïÚ;8ÞçõÎ|>[׺t`DaŽ×¼Ü#6N;ƽpˆ7 ¼®Oó#›°Ôê.´*!_HÖœº®çsÇ4HÛ+­¦{|Ÿ*zjU× =_T‹‹vwqz¹ ¾,,Q˜‡ ó‘Äòïã¢KZ&V·v÷y5J‹ãccï°r˜XÜ?å²;G=³ë)íSQc…}³½sëÄÍ}`óîÁÑ>y±Ì“£³(Oi¸¥ô¹‚ nn Bgûô*ˆÚáõ£U#D€"P?³‹°¾GÖ±z„˜ÑIXÛ=€ûJæôlöQTãøäÊ6åy‚'²8—›/Í-‡4©~JzdvË4ð†¾/íàdǘâìú^-V†_]%¢ß]óà×n‰é5ÝÛ{ìe÷ý ‡Èk¨Eíî¢^-LÒËÀHŒÌ‚Ã`œaH|ß2äSreçØÜÒY÷0&ôp’ûD; &²þS«;$Y– ¼Æ5Oä÷΂4Ù=»6HÜœXÙ¶­î€6·±;²´œn_Êëmžî‚,lP&8m“Žb›Æûæ×)ì$µM˜ÉÛ+Ái0éè\¤wNÓ–ÄÇ—·ÀkÏ–û½vI]ãs¡ùÚ>i/ì#X…‚X|Ï"8¾¬- »NÌ$€ãy·7õ}ï˜=µ0 ΖoîîsP!ˆ(lfy‰.?º‹½H.kµ¾,Œá(Œ3ŒˆÄßb,jäoàŸYÝ56·²±µGBs]¨3¸°rì÷ÂÆ@«vt± w6»‹ ® ¬<ëÖ±|$ìÂ*0ž6_ š&—³@ü¥™û þ?¡åÜ`Øâïò6)©ur˜¸y¡7wˆHî Ouï²…H—Ö·«ºÆ€»>5¥mÃnI¬Âî[„—#5"Ïáf²y%ø–°Ÿ¸Ià]³àÇÖaQú¾ eíãó+_áåË´ˆ‹ wùƒ^w´ÑËÀPGaôV¤ág˜ÓîaŒI¬èœÛ02»´²‰Æ@ €"æôÌÔÏ;BøXÙ&톉[j0Lµh³Û « ­“—«Íà+#‹[‰­“àŠae‡ùÛ²³w0¹°Z×;«VíÛØbd_¹%Ê9ÇRš¤CÔs»i§hÊ?_º&X†åù¤×$–w´ Mƒ—GÇʯëùàîâô¢A_vÆ£0b £7³±¨±¿ux~MÏøÌòÆæî>JòðéY×oqÿ|JÛÔ…ÑIˆ…ïò¡…âþ9ʾ¿`pRÛdnÏ qsïàâ>õ½ƒì®™¾ù FZð 9Ý3éÓcÄ!aøäô”•!k³ËSD Ë,@qa#?Ü]4¹+¸ôr0†£0Ÿ1Œ1‰•>ć€@<³D\Û¢]ý‘'ÇÞáqËäJHíHRëdÏìúá1ÒÇ@øŽo™˜\Ùf4§ ¸[68nÓ6½J^ò ¢0ztr2¸°î–ùKÞ?<î ¬Æ4ç÷ÎŽ,n³ÉÏà”óߨ›YÛExyí‹W;ûZÞi×ôðID8½¨ —S€‘‹Â8ØÄ,K¬MÄÆÙE-ƒãó+k[{<)M{zçÖAÂëžY¼¥vLcެBƒ'×C·µsÕÌ™!â&À2«‹0Dܱ˜Ë4 ]ØÜKh¬åÆ+;¤êblóxv7¡{vmncH¼{Àêü«Ó³W 24x‰­“)mS3ìŒtƒöÏ9¬ IÈÀeèbÁ]œ^Øônr 0¶£0JÆx f㇖¡^iÕµ=ã“ « š æx ÑÅ­Ôö©æÉeê¶IGuc‹™]FËÁC ›ÉmSs뻬ŒPè6Œ/EÔåöÌtά·ÈŸØ’àq@è‚‚WêY>PÔ?Çz¤Þ!uÍ®eu¢ÇÁuCãÄ2ÄÙ¥íýÕÒúÞxi|qy›®~£t`>±e2»{\F€ë^ ÊëŸdú7ŠÜõHwQO¯&rôRØ•sƒ¡ŽÂ|ǰ`b6$–vŒÍkl™™YZ‡[bÜ€ ù½³C ¤óðM™LYè ­öŽAønZa QÀpÏìzZÇt|Ëdqÿ<øqà7 Äâ-Ò!ø.hÞ:ðOÒÑ xEkä Q{@ñئñ%}™Ó Ô‚ ¶,oÝæ9Ë‚àždÃXBËDFç4e mofAßlJû<áÖéð<ÁÓ«&–.l“xÐû°¾½§í“ãØ+mÌå]þ£×;ô~¤å’°+W k`º"^†ù"³„ñß:ÞÚ^i¡ù­Ãä]{7vö —bYÉÀ|^ïì…57Hg]ž •¥€0EaŠaµ£‹ñÍ‹[Ž3š}sº áõ£¹Â¾¹ª"H– .nÒ®~5²¸ ÌnœX±5¡eX2tTãåÀÏ®p´ö$µ¢ ¶ ®Z@.¿ÐF·–¶öÁ¥íŒ/oƒg žÂ!˜tx–ß(lèÇ#q½Pö—È¡»ÈU›QD/ŒÁ—.À˜Âºg7NO×Ö·9±uz¶ŠdËäJzÇôôê“[ÀÍ] ,öœ ;™•Äæ¢ÏGgµßmÒ@wasXÛ>½’ß;Ó4î]1þ0î„ल Èô-S+ SÂ=xXÁµÙà=ä8— y½³à"±.ÿ±ù•Wn‰×9ùŒmtyy1B¯&OéÕø‚&]€!Â|]‘FU]Z s _ñM}_]ŸôмƪÎÑ‘ò²l-»z6Œ¨mš¬ï…µŸvî}Y¢9£s$¶Âêøò6 te›<æ$é „Ë¥­}êÜÆ.amgˆH®ý6Œ/öÏ¥¶O'%ѾùõNÂ* \€øU.nì @ðéÙÚ™qÍ㠴òÀËÉê& ž?2—Àݦ‰eðn7‘˜>*v‘…ì|Öætyå.½HÓ Sð¥6Fc¥"3Ìg3ôdbÅwq>é5ÍSŕͭݫ{1)SZ“Ú&6ÙMó»g+EOƒì0¦Tt/Œ9­lp’kSÚ§(ôÍ€‰‹[_z”ÁE@N7¡qbi÷ìêPÖAîr¢ÃxM“ËI—–¾»¼MÊî&€'?s6׉ñP{àm¬!n“àMÞkÛ{9õ¢Æþ0ˆë…â?þ¼°Ò‹tðe`tEalt #Ë0?–¦¯Àøº®Ï »H‡¨¢„²öŽÑÙ‰ùUF«]T@v¶œM:âfá`ÕØò6ˆ¶—[ÿü¾Ä­ý òºU'Œ’ˆÔK4ÝÏÀàôÎiƒA„¯$ ”=Ûøhlli‹îw¼%óàÒ¼®(…è¬.»ãÀÙj~[Ò*n âòÖ]œ^Îée`ÔEaħ*!É0.1{‹ùëùdøeÖ–·ôNÌO/®Ÿm‰x ¡¾ÜÀZ‹/o4h¹9¯wv|y{÷àûÀ¥CÙà|NÏ ó"A;a‘ø¢Ç7ôȱØ24/®´­¶w¢or¡ul!±yœçúc ûȵkºCŽ·ökF‰à*Dä¹õ=ÒÑ1„ÏÄYjHíÈòU3Ž(Q¸j„˜Ö1]1¼0¸°±´½¿ËÅ@pð£ó{õcKÚÒÁù… ðO°wÈ+uÌ®ï‚Ù0Ö5³¶©Á@ßâÖ¡g}ùP\ÜåAäå!½šè¥—`V ÆÆL]ZÀ$þÆca?9çX-ß,‡Äê†þ©!ÂâÂêÖ.éy}`}së™]ÂÚ.ÌÆ–¶@HÍïí ¬ÖvÎJÙ§\ÐS`~zçtLÓ8‹Ž‚l B9¸VHn›*ìŸkœXYÜvƒ<ü„•;÷|ÖY³»gÀ‹êž]ׄܞÙêÑÅ–©•³Ý‘gÀ{¢?`¸sfeHÒÿ¹¾,ë‹­7oÝÅéåj°ÕU³Á0º faM,2ŒK̹ÇbÆjîÉ®‰åiÕ]ÍÓgoî!…1ð,µc °Jºje+@ Vyÿà…žÙµ™õ]J9Xœ dî•ÒèâÐ7 z8¢al‰u?NÏ ‚æõ̤´M˂ڱEð@,y<+rUy‡DÛ–·I]ðÝþùº±%@/·uj…ú±+Û­Ó+Õ#Ħ³Å,7É£Óȵh qÓäòêΗuoð;-jznÇ\_,~ŒÊ],v÷r|ŒÙ(ü_ÞDa,1,Ài·LÔ=RÜÎ0n˜œ^œ[ÞÑøž5 ¦d`¾¨nu—ÕJ@8pRë$ˆ®‰›S+Û VA;Sù˜¶¯€¯ìÁm€»@¾ÒùкQÏòàhÙàxGìï¤ "/ˆ³à² yr0œÒ>•y¶ödqÿÜ…qàÃDð2Á¥CzÇtÅq˜¸¹ÃÚ’“ÝáÅMˆË‡¦œŽÄÞ%ë;ø‚¬/Ö¹E»Œ¼˜¢—ÀÈDaœa\bž¶Û¦).ñ¥±%­U]£ä\ĵµ­½#ˆÖ¡zQö\šZÝá 'uïðhÚ>½ `Kë˜Îê&€No4»³xAl%níS’.m—€OJ¨åàžÁ}‚— ž6Äàb…Ý;YßÞ+hxaOÑ—¯ÑeÁ]žE^LÑËÚóE€ÿ¤ 0Faþc—š&fì¯ò!Þ.² 4¯¡°y e\©ž_ÝÜ?8䦸 ô@B2Ð\àèàÂæÀÂFÛ¹KÛ&–À×Ï:mì›aõ£ÄÍ=Jª™8¹m’ã¨8»„Õø–‰Üž™‘ÅÍm«ã¿ˆk[àê©M–õE‰»Ø¬6£„^ $Li‚…q†á“˜0¾¡ç Îæz>énIå©Õ]µ=ãÝãsSÄÕ•ÍÝ–×Â7-œ/˜_åbÃnÖ½Šmož\þf$vÿ\f'aåb8òÇúîANÏ ëàyÖŽ.Ž/omí2aøøäd|~Å7£æŽY ¢‹rwqz¹£÷"À¼ŒÂ8Ã’X`0¦t¿rMá8 ».³¶§®w¢javycsgŸQ±úøä´sf5»{†°¶s‚øö·G'åC |Ó®{u¶ÅøbÙà< s0x—@į&/(6½º3²¸þDaÀ0ˆòKÛû¤KƒÂwI-CÓÖáùbFþ¸»Øq§÷Bsý`TFad;†!f˜'U™˜O$¦´ûÁZ^©ïãK# ›òûëû&ú'¿x|| $«‹Ð3·ŽÌâŽ$#ŸëF‰›û—¿è-˜Ëë™"Oüë¹Q¦7G—¶–¶Ï¼EãÙ8¯Òù‚¾ÙÙõ/“µŽŽÁÛX1´.œo›^™\ÙwKé^XÝC¯Ünêûº¹‹Ó‹})€Ô`”Fa¬2Ìë@ ©Ä|…ñ =Ÿ'Ö¡ÚÞid š²ë{kzÆ;Çæ›Fòº¦V¶÷‘/>/oïG7·L­0ºÁÖþaõÙžŒmS+ ›8£Ò»M:šXÞp&µN‚G)\OH<·¾»¾{ا¶õ½ƒ¹ÝÁ… ð|2»à¿K—¶‡¢ÌKn9ƒ]ÔOÞù¸“°Ú:2ë^}Ï<ˆÐÕF]Œ»ËwôÒLÇ`œa~aA‰cJ{dòêSÒ߬w‰©U•£mÄÁiò2 Û{$¸÷àªö‘—¶8dÊ*øîÀÂFv÷LAïlûôÊÜÆ‹S†˜G'§ žŽ,nÖ-‚{î‚À îè r-à|¥nl©yr™ÚÀ-KæAÀ-Z_Þf>O|\Ѥ5Ú%Õ(»& úò=º¨p§zzÝ.@I}ó-Ø—ǘ•vÏ,HåC¼‘æ§äЍ¢æœ†¾š³!]c³Ë‹k[ûä6 #dY Z\ó+sŽAÐy´er%§›\à­]$Ï®ï®ìX\<ñƒ£p'à§€»„Õªa"¸·âyjwiö‹Þ“W!oмÚ0¾Dm ‚7WvH¬¬ùµ´±SÝ=æ_оàë»+(ôj@Lïe€1…q†ùUb¾õø¦¾Ï3Ûp ËÐ\ÔÊø²¶Üƾšî±î±¹Q@òúöþ!‡+2‚YÜb´åD”ƒÄ `0©à¿à õãK]3kÀãÑÅ­‰erŠ]Ø$·¹³…®À·ýóë@Sà}íØ"ø©Â¾¹³u+—§Ww ß\ayc§¡Ò7³FÆ)ú†ž7váu=‘—gô~DŒ^F Vf›aTÕ¥1'1Ž1MÒ÷yn®éù…ä¸Ò6’AÔk& LAJ^ßÞce5qs?¡e²q|‰ã¡[g#¡6©”½©@VðÿÔý«Fˆà+ •œ–¢T•[ÏRìò6éðú!]dzû&}3jdߢ^è“.¹Ëcz±Usf`œaä<‰9Á˜Ÿ=¦üÂ.âµ[¢¡¦{Je`v]ZuWaóP¹klެòú6PùôÛý”²ºEýsP)xtrº±w¸ºs\]Ú¢´±å­Ùõ]ðEж¹î3fÖÝ{x4>¿RÞ1â^-û6憞Ž® ¸+`ô^ ðHã ÃÌ0š$fcÜcF«fšH8Djy¥UȪK­ê*h¨êk"ä·û—÷׎?cö8>9× ú§TvÚ†ç?¶½¦ë…jqy‰.×îb&òòˆ^ $èe` Ea~b˜çØò³ü „ÇçkYJ:D‚¬¬ô1Ù$4ß#µ2¶´5µª³¤uÀÜ56Û?Eœ"®-mloî xJÒ!aq½yp:½¦ûSr…êÇ$dÖ€K\þu—÷ôþíô²¬ïš¬Œ3ŒY†¡‘˜×ã³ÖþÖñzl*åEŽËþ™öQ… 1ûgÕ&Ut€Ð\Ñ1RÙ5Ú24Ý79?8½'àykéÅ2·÷HàÊ }˜PØ<QÐäSüÊ-AÌØuÜräîÿpwqzYÖ—-€á0» D–a¾•AŒ‘dÚ5®%ì#€Íª ü2Lƒ²?&•ƒÐ]—PÞ„Ϊë)k­¦g¼wb´¾É…ñù•ÅÿßÎý´ÈQEQÏ—š® nÜé7p#˜tODĨËÌdúO  ¢!ˆAAnuë7ÈBwêšéd˜Iª{êÏ»÷ž{ï³í†yÕïþú¼ªé'mòäï~?ÜñÏ¿ÿ5/i^ؼIón¿þþçwÿh¾|òí/Í7ƒYýÕ«ï}úÒ[Áq !îI™Ý è®1½+zL†ýb`‰‡`<Öã¼$?W_y÷^#t“×oñöÇ_7yçÞ7Ü´øòÇMî>üéóï?øá·ŽiÚí݇?7/üðþ£æÝÞXMi†«ì {.Ä…%®FÛõñ¹%ú*“qݺ¾Ý @o±âûÀ2 c·a‰e1.çqy’ë}¥ñWˆg=ªÓ§èÅÚWMÊm-8d Ð…v·Ú‚cãæe€3¶a5†Wv •Ø9ÆR*Óf;e¸•A׋»¤w½›4ß)m°ÐóYn.ÄøÛ`,HrB¤U–qß2àèÖâcd»aéõ¢wqÑÊ Àw^ød£»“8Æ0cšmý·c|j©ørwRy¥é/¾­›Vaýi2ìIb ±lް+[ûA×]Ò»ƒÞV€É°Õ¹tD‰e1Fô˜<;ñUW\tÍÝŨ¼è]ìÀ±à6†§Š'Ò& ÏȰkŒxÒi·Ë^ûD·Všø•ׄÞY1z¯X© ÝVd8µÄû&™ñÇmtGTÞ´ôVCéí°¯é| XÕc’Lq¡›Ö]…½öôvغ #2œYâ0SeZ‹&n­º‘G¸KzÇëÛ`2 Âp&‰Í<¦Ê´V]]wUÞ¸ô¸Í`2,ÀpB¬-± Æ–æÐꉫŽ.¢»yé°P&Ãb…Ø@â<ÓfçÊj‹kî¼Ãˆ ½ò·{[rs Àª W€ Sb4Œ=ÎŒ4ü…˜kfMwÃÑ»Iï&cöx"í›aç¯u§ž’ñÙ±†óèÒ]pz§—¸ °Ói÷ û—Xãh$38Öº@×ê©fÒÛNoA€É0r!Æ—xm71ɹu‹®kwÓÓ[`¡i2œJbk 3­Eׇ»š•žÞ­úž¢Y`¹*Œa£`Œá1aN-ºÞÝ%½—é}ð# ƒÓ2lTˆƒJŒç1mŽ£,ž¸]Ñ]wÙ줷½ iz/¼‰‚ÁnŽSˆ K ‡ñ{ŽgEÚ×E™ã}ªén4z[¡¼°Z–¼1ŒÎ°]!î,ñÊ­Ä=Æg;äzb~tË¡+ï.|å5¡wÚƒÞ6€5ž’á(ãbÔc&·ýÐMënXzŸ¼÷"À"ƒ1 r{ØZâdSerë ]'î’ÞAú>¸Ý`g'Ò^餼Ä>0&É´–èBUÞô^˜ SâþGŘ0ZPténGwñémXÑ`2ì@bbL›i­$ºhe×ê¨9#½í“a? ÃJ¼ê=†æñBJ#úªˆnw]Ñ;-Iï.€·2,b°èóYš §˜Óé,²]oî"Ò{<Ò¾]ëVai†‡0ŒVˆÁ$Ç8Çš¢s­ ĵpweç.éíp¬é<…_âAÓcW\|tm+oáÓfïôö˜ »exi±É`Lâ†@×[åAoo€!N¤3œQbÕrL’qn×¾\VIÝuxÚ¬Hï€É0t!†—Xµ“d¦·ŽÄuîn2zOsãhÀd½{x(Æ£=&Éä¶´¸Ö肸ëó´Ù„Þ3}G¬n°1à w•Øã“dZk .ºÏUIU^%z§fôž|8Æà  ‡+Ä~jñhŒWåæ2‘ í(naÄuÞwG¹‡Þ‹5˜ —cGâ%̸éñªô§ÍøÊàI\œ²ë¿òbÐ;9sóàC©*šaß…Ø¡ÄåH^‰M| ­¯lk!ÅÅ)»!*/ ½“gh>0Fcx¡·»Üb\Ècy’£:m°n« ÜvF×…»ÉéÝ^|÷vìñDZaJŒŽqQ’í`fÊA‹Ím:wUO›QéÝ 0†eXQâY‰eH&Ï Êúᶺ^Ü…ª¼¦ÿ_t%½]Ç0%Î]‹U¦Ð²¾:´]ÛÊ™ÞÉN»,f0ö(q?Œ—•¿ù¨£²k°Í§òXt“T^8z{L† 0,_ˆ»7:ÆH0gI!=·F,wIoG¯í½yx2ÌBLŒÉ3‰ Žn8w éíy»w'Àý>"Ã…دĽ1^Va‡rF¤«,Y¦@·€»¤· ÀºUØèù,JŒñ²J4Äqåæ²»­¹JîÚTÞôn„a ƒ2ì]âÓc†5WÑ]V^Û½}& ƒH €1=fp{°„ØJÝHo€HïdYâY‰‡cL’uq#¡‹ìn\zÏrxÀéF,Ĺ:qI2S”Û¤­¡å.jå@ï&Ý&à CI †qI2­õ+n9tÁÝ5¯¼Zôž|»‡ÁdCâJUb<Œ‹‘L•i-&·Ú7wíÝMFï&ÿM~`µIEND®B`‚v1.6.3~dfsg/test/data/page.html0000644000000000000000000000004412275460205015144 0ustar rootroot

    This page is 100% Awesome.

    v1.6.3~dfsg/test/sourcemaps/0000755000000000000000000000000012275460205014614 5ustar rootrootv1.6.3~dfsg/test/sourcemaps/basic.json0000644000000000000000000000202612275460205016570 0ustar rootroot{"version":3,"file":"sourcemaps/basic.css","sources":["testweb/sourcemaps/imported.css","testweb/sourcemaps/basic.less"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;ACAA;EACE,YAAA;EAJA,UAAA;EAWA,iBAAA;EALA,WAAA;EACA,mBAAA;;AAJF,EASE;AATF,EASM;EACF,gBAAA;;AACA,EAFF,GAEI,KAFJ;AAEE,EAFF,GAEI,KAFA;AAEF,EAFE,GAEA,KAFJ;AAEE,EAFE,GAEA,KAFA;EAGA,UAAA;;AALN;AAAI;AAUJ;EATE,iBAAA;;AADF,EAEE;AAFE,EAEF;AAFF,EAEM;AAFF,EAEE;AAQN,OARE;AAQF,OARM;EACF,gBAAA;;AACA,EAFF,GAEI,KAFJ;AAEE,EAFF,GAEI,KAFJ;AAEE,EAFF,GAEI,KAFA;AAEF,EAFF,GAEI,KAFA;AAEF,EAFF,GAEI,KAFJ;AAEE,EAFF,GAEI,KAFJ;AAEE,EAFF,GAEI,KAFA;AAEF,EAFF,GAEI,KAFA;AAEF,EAFE,GAEA,KAFJ;AAEE,EAFE,GAEA,KAFJ;AAEE,EAFE,GAEA,KAFA;AAEF,EAFE,GAEA,KAFA;AAEF,EAFE,GAEA,KAFJ;AAEE,EAFE,GAEA,KAFJ;AAEE,EAFE,GAEA,KAFA;AAEF,EAFE,GAEA,KAFA;AAQN,OARE,GAQF,UARE;AAQF,OARE,GAEI,KAFJ;AAQF,OARE,GAQF,UARM;AAQN,OARE,GAEI,KAFA;AAEF,EAFF,GAQF,UARE;AAEE,EAFF,GAQF,UARM;AAQN,OARM,GAQN,UARE;AAQF,OARM,GAEA,KAFJ;AAQF,OARM,GAQN,UARM;AAQN,OARM,GAEA,KAFA;AAEF,EAFE,GAQN,UARE;AAEE,EAFE,GAQN,UARM;EAGA,UAAA;;AAKN;EACE,WAAA"}v1.6.3~dfsg/test/sourcemaps/index.html0000644000000000000000000000113012275460205016604 0ustar rootroot
    id import-test
    id import-test
    class imported inline
    class mixin
    class a
    class b
    class b
    class c
    class a
    class d
    class extend
    class c
    v1.6.3~dfsg/test/less-test.js0000644000000000000000000002124212275460205014715 0ustar rootroot/*jshint latedef: nofunc */ module.exports = function() { 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 isVerbose = process.env.npm_config_loglevel === 'verbose'; 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"); } }; function testSourcemap(name, err, compiledLess, doReplacements, sourcemap) { fs.readFile(path.join('test/', name) + '.json', 'utf8', function (e, expectedSourcemap) { sys.print("- " + name + ": "); if (sourcemap === expectedSourcemap) { ok('OK'); } else if (err) { fail("ERROR: " + (err && err.message)); if (isVerbose) { console.error(); console.error(err.stack); } } else { difference("FAIL", expectedSourcemap, sourcemap); } }); } function testErrors(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); } } }); } 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, getFilename) { foldername = foldername || ""; if(!doReplacements) { doReplacements = globalReplacements; } function getBasename(file) { return foldername + path.basename(file, '.less'); } fs.readdirSync(path.join('test/less/', foldername)).forEach(function (file) { if (! /\.less/.test(file)) { return; } var name = getBasename(file); if (oneTestOnly && name !== oneTestOnly) { return; } totalTests++; if (options.sourceMap) { var sourceMapOutput; options.writeSourceMap = function(output) { sourceMapOutput = output; }; options.sourceMapOutputFilename = name + ".css"; options.sourceMapBasepath = path.join(process.cwd(), "test/less"); options.sourceMapRootpath = "testweb/"; } options.getVars = function(file) { return JSON.parse(fs.readFileSync(getFilename(getBasename(file), 'vars'), 'utf8')); }; toCSS(options, path.join('test/less/', foldername + file), function (err, less) { if (verifyFunction) { return verifyFunction(name, err, less, doReplacements, sourceMapOutput); } 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)); if (isVerbose) { console.error(); console.error(err.stack); } } else { difference("FAIL", css, less); } }); }); }); } function diff(left, right) { require('diff').diffLines(left, right).forEach(function(item) { if(item.added || item.removed) { var text = item.value.replace("\n", String.fromCharCode(182) + "\n"); sys.print(stylize(text, item.added ? 'green' : 'red')); } else { sys.print(item.value); } }); console.log(""); } function fail(msg) { console.error(stylize(msg, 'red')); failedTests++; endTest(); } function difference(msg, left, right) { console.warn(stylize(msg, 'yellow')); failedTests++; diff(left, right); endTest(); } function ok(msg) { console.log(stylize(msg, 'green')); passedTests++; endTest(); } function endTest() { var leaked = checkGlobalLeaks(); if (failedTests + passedTests === totalTests) { console.log(""); if (failedTests > 0) { console.error(failedTests + stylize(" Failed", "red") + ", " + passedTests + " passed"); } else { console.log(stylize("All Passed ", "green") + passedTests + " run"); } if (leaked.length > 0) { console.log(""); console.warn(stylize("Global leak detected: ", "red") + leaked.join(', ')); } if (leaked.length || failedTests) { //process.exit(1); process.on('exit', function() { process.reallyExit(1) }); } } } function toCSS(options, path, callback) { var 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; var parser = new(less.Parser)(options); var additionalData = {}; if (options.globalVars) { additionalData.globalVars = options.getVars(path); } else if (options.modifyVars) { additionalData.modifyVars = options.getVars(path); } if (options.banner) { additionalData.banner = options.banner; } parser.parse(str, function (err, tree) { if (err) { callback(err); } else { try { css = tree.toCSS(options); var css2 = tree.toCSS(options); // integration test that 2nd call gets same output if (css2 !== css) { throw new Error("css not equal to 2nd call"); } callback(null, css); } catch (e) { callback(e); } } }, additionalData); }); } 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")); } return { runTestSet: runTestSet, testErrors: testErrors, testSourcemap: testSourcemap, testNoOptions: testNoOptions }; }; v1.6.3~dfsg/test/less/0000755000000000000000000000000012275460205013401 5ustar rootrootv1.6.3~dfsg/test/less/compression/0000755000000000000000000000000012275460205015742 5ustar rootrootv1.6.3~dfsg/test/less/compression/compression.less0000644000000000000000000000110312275460205021166 0ustar rootroot#colours { color1: #fea; color2: #ffeeaa; color3: rgba(255, 238, 170, 0.1); @color1: #fea; string: "@{color1}"; /* comments are stripped */ // both types! /*! but not this type Note preserved whitespace */ } dimensions { val: 0.1px; val: 0em; val: 4cm; val: 0.2; val: 5; angles-must-have-unit: 0deg; durations-must-have-unit: 0s; length-doesnt-have-unit: 0px; width: auto\9; } @page { marks: none; @top-left-corner { vertical-align: top; } @top-left { vertical-align: top; } } .shadow ^ .dom, body ^^ .shadow { display: done; } v1.6.3~dfsg/test/less/mixins-important.less0000644000000000000000000000047512275460205017621 0ustar rootroot.submixin(@a) { border-width: @a; } .mixin (9) { border: 9 !important; } .mixin (@a: 0) { border: @a; boxer: @a; .inner { test: @a; } // comment .submixin(@a); } .class { .mixin(1); .mixin(2) !important; .mixin(3); .mixin(4) !important; .mixin(5); .mixin !important; .mixin(9); } v1.6.3~dfsg/test/less/modifyVars/0000755000000000000000000000000012275460205015524 5ustar rootrootv1.6.3~dfsg/test/less/modifyVars/extended.less0000644000000000000000000000036312275460205020216 0ustar rootroot#header { color: (@base-color * 3); border-left: @the-border; border-right: (@the-border * 2); } #footer { color: (@base-color + #003300); border-color: @red; } @red: blue; // var is overridden by the modifyVars //@base-color: green;v1.6.3~dfsg/test/less/modifyVars/extended.json0000644000000000000000000000011312275460205020212 0ustar rootroot{ "the-border": "1px", "base-color": "#111", "red": "#842210" }v1.6.3~dfsg/test/less/extend.less0000644000000000000000000000176412275460205015570 0ustar rootroot.error { border: 1px #f00; background: #fdd; } .error.intrusion { font-size: 1.3em; font-weight: bold; } .intrusion .error { display: none; } .badError { &:extend(.error all); border-width: 3px; } .foo .bar, .foo .baz { display: none; } .ext1 .ext2 { &:extend(.foo all); } .ext3, .ext4 { &:extend(.foo all); &:extend(.bar all); } div.ext5, .ext6 > .ext5 { width: 100px; } .ext7 { &:extend(.ext5 all); } .ext8.ext9 { result: add-foo; } .ext8 .ext9, .ext8 + .ext9, .ext8 > .ext9 { result: bar-matched; } .ext8.nomatch { result: none; } .ext8 { .ext9 { result: match-nested-bar; } } .ext8 { &.ext9 { result: match-nested-foo; } } .fuu:extend(.ext8.ext9 all) {} .buu:extend(.ext8 .ext9 all) {} .zap:extend(.ext8 + .ext9 all) {} .zoo:extend(.ext8 > .ext9 all) {} .aa { color: black; .dd { background: red; } } .bb { background: red; .bb { color: black; } } .cc:extend(.aa,.bb) {} .ee:extend(.dd all,.bb) {} .ff:extend(.dd,.bb all) {}v1.6.3~dfsg/test/less/ie-filters.less0000644000000000000000000000065212275460205016337 0ustar rootroot@fat: 0; @cloudhead: "#000000"; .nav { filter: progid:DXImageTransform.Microsoft.Alpha(opacity = 20); filter: progid:DXImageTransform.Microsoft.Alpha(opacity=@fat); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#333333", endColorstr=@cloudhead, GradientType=@fat); } .evalTest(@arg) { filter: progid:DXImageTransform.Microsoft.Alpha(opacity=@arg); } .evalTest1 { .evalTest(30); .evalTest(5); }v1.6.3~dfsg/test/less/extract-and-length.less0000644000000000000000000000576712275460205020001 0ustar rootroot // simple array/list: .multiunit { @v: abc "abc" 1 1px 1% #123; length: length(@v); extract: extract(@v, 1) extract(@v, 2) extract(@v, 3) extract(@v, 4) extract(@v, 5) extract(@v, 6); } .incorrect-index { @v1: a b c; @v2: a, b, c; v1: extract(@v1, 5); v2: extract(@v2, -2); } .scalar { @var: variable; var-value: extract(@var, 1); var-length: length(@var); ill-index: extract(@var, 2); name-value: extract(name, 1); string-value: extract("string", 1); number-value: extract(12345678, 1); color-value: extract(blue, 1); rgba-value: extract(rgba(80, 160, 240, 0.67), 1); empty-value: extract(~'', 1); name-length: length(name); string-length: length("string"); number-length: length(12345678); color-length: length(blue); rgba-length: length(rgba(80, 160, 240, 0.67)); empty-length: length(~''); } .mixin-arguments { .mixin-args(a b c d); .mixin-args(a, b, c, d); .mixin-args(1; 2; 3; 4); } .mixin-args(@value) { &-1 { length: length(@value); extract: extract(@value, 3) ~"|" extract(@value, 2) ~"|" extract(@value, 1); } } .mixin-args(...) { &-2 { length: length(@arguments); extract: extract(@arguments, 3) ~"|" extract(@arguments, 2) ~"|" extract(@arguments, 1); } } .mixin-args(@values...) { &-3 { length: length(@values); extract: extract(@values, 3) ~"|" extract(@values, 2) ~"|" extract(@values, 1); } } .mixin-args(@head, @tail...) { &-4 { length: length(@tail); extract: extract(@tail, 2) ~"|" extract(@tail, 1); } } // "multidimensional" array/list .md-space-comma { @v: a b c, 1 2 3, "x" "y" "z"; length-1: length(@v); extract-1: extract(@v, 2); length-2: length(extract(@v, 2)); extract-2: extract(extract(@v, 2), 2); &-as-args {.mixin-args(a b c, 1 2 3, "x" "y" "z")} } .md-cat-space-comma { @a: a b c; @b: 1 2 3; @c: "x" "y" "z"; @v: @a, @b, @c; length-1: length(@v); extract-1: extract(@v, 2); length-2: length(extract(@v, 2)); extract-2: extract(extract(@v, 2), 2); &-as-args {.mixin-args(@a, @b, @c)} } .md-cat-comma-space { @a: a, b, c; @b: 1, 2, 3; @c: "x", "y", "z"; @v: @a @b @c; length-1: length(@v); extract-1: extract(@v, 2); length-2: length(extract(@v, 2)); extract-2: extract(extract(@v, 2), 2); &-as-args {.mixin-args(@a @b @c)} } .md-3D { @a: a b c d, 1 2 3 4; @b: 5 6 7 8, e f g h; .3D(@a, @b); .3D(...) { @v1: @arguments; length-1: length(@v1); extract-1: extract(@v1, 1); @v2: extract(@v1, 2); length-2: length(@v2); extract-2: extract(@v2, 1); @v3: extract(@v2, 1); length-3: length(@v3); extract-3: extract(@v3, 3); @v4: extract(@v3, 4); length-4: length(@v4); extract-4: extract(@v4, 1); } } v1.6.3~dfsg/test/less/merge.less0000644000000000000000000000237012275460205015372 0ustar rootroot.first-transform() { transform+: rotate(90deg), skew(30deg); } .second-transform() { transform+: scale(2,4); } .third-transform() { transform: scaleX(45deg); } .fourth-transform() { transform+: scaleX(45deg); } .fifth-transform() { transform+: scale(2,4) !important; } .first-background() { background+: url(data://img1.png); } .second-background() { background+: url(data://img2.png); } .test1 { // Can merge values .first-transform(); .second-transform(); } .test2 { // Wont merge values without +: merge directive, for backwards compatibility with css .first-transform(); .third-transform(); } .test3 { // Wont merge values from two sources with different properties .fourth-transform(); .first-background(); } .test4 { // Wont merge values from sources that merked as !important, for backwards compatibility with css .first-transform(); .fifth-transform(); } .test5 { // Wont merge values from mixins that merked as !important, for backwards compatibility with css .first-transform(); .second-transform() !important; } .test6 { // Ignores !merge if no peers found .second-transform(); } .test-interleaved { transform+: t1; background+: b1; transform+: t2; background+: b2, b3; transform+: t3; }v1.6.3~dfsg/test/less/debug/0000755000000000000000000000000012275460205014467 5ustar rootrootv1.6.3~dfsg/test/less/debug/import/0000755000000000000000000000000012275460205016001 5ustar rootrootv1.6.3~dfsg/test/less/debug/import/test.less0000644000000000000000000000054212275460205017651 0ustar rootroot@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; }v1.6.3~dfsg/test/less/debug/linenumbers.less0000644000000000000000000000046412275460205017706 0ustar rootroot@charset "UTF-8"; @import "import/test.less"; .start() { .test2 { color: red; } } .mix() { color: black; } .test1 { .mix(); } .start(); .mixin_import1(); .mixin_import2(); @debug: 1; & when (@debug = 1) { .test { color: red; & when (@debug = 1) { width: 2; } } }v1.6.3~dfsg/test/less/mixins-named-args.less0000644000000000000000000000077312275460205017623 0ustar rootroot.mixin (@a: 1px, @b: 50%) { width: (@a * 5); height: (@b - 1%); args: @arguments; } .mixin (@a: 1px, @b: 50%) when (@b > 75%){ text-align: center; } .named-arg { color: blue; .mixin(@b: 100%); } .class { @var: 20%; .mixin(@b: @var); } .all-args-wrong-args { .mixin(@b: 10%, @a: 2px); } .mixin2 (@a: 1px, @b: 50%, @c: 50) { width: (@a * 5); height: (@b - 1%); color: (#000000 + @c); } .named-args2 { .mixin2(3px, @c: 100); } .named-args3 { .mixin2(@b: 30%, @c: #123456); }v1.6.3~dfsg/test/less/no-js-errors/0000755000000000000000000000000012275460205015741 5ustar rootrootv1.6.3~dfsg/test/less/no-js-errors/no-js-errors.txt0000644000000000000000000000021312275460205021036 0ustar rootrootSyntaxError: You are using JavaScript, which has been disabled. in {path}no-js-errors.less on line 2, column 6: 1 .a { 2 a: `1 + 1`; 3 } v1.6.3~dfsg/test/less/no-js-errors/no-js-errors.less0000644000000000000000000000002412275460205021165 0ustar rootroot.a { a: `1 + 1`; }v1.6.3~dfsg/test/less/import/0000755000000000000000000000000012275460205014713 5ustar rootrootv1.6.3~dfsg/test/less/import/import-test-e.less0000644000000000000000000000002612275460205020312 0ustar rootroot body { width: 100% } v1.6.3~dfsg/test/less/import/import-test-a.less0000644000000000000000000000007312275460205020310 0ustar rootroot@import "import-test-b.less"; @a: 20%; @import "urls.less";v1.6.3~dfsg/test/less/import/import-test-c.less0000644000000000000000000000004412275460205020310 0ustar rootroot @c: red; #import { color: @c; } v1.6.3~dfsg/test/less/import/imports/0000755000000000000000000000000012275460205016410 5ustar rootrootv1.6.3~dfsg/test/less/import/imports/font.less0000644000000000000000000000016712275460205020252 0ustar rootroot@font-face { font-family: xecret; src: url('../assets/xecret.ttf'); } #secret { font-family: xecret, sans-serif; } v1.6.3~dfsg/test/less/import/imports/logo.less0000644000000000000000000000012412275460205020235 0ustar rootroot#logo { width: 100px; height: 100px; background: url('../assets/logo.png'); } v1.6.3~dfsg/test/less/import/import-test-f.less0000644000000000000000000000006612275460205020317 0ustar rootroot@import "import-test-e"; .test-f { height: 10px; } v1.6.3~dfsg/test/less/import/import-charset-test.less0000644000000000000000000000002612275460205021517 0ustar rootroot@charset "ISO-8859-1";v1.6.3~dfsg/test/less/import/import-test-d.css0000644000000000000000000000003012275460205020126 0ustar rootroot#css { color: yellow; } v1.6.3~dfsg/test/less/import/import-reference.less0000644000000000000000000000063012275460205021050 0ustar rootroot.z { color: red; .c { color: green; } } .only-with-visible, .z { color: green; &:hover { color: green; } & { color: green; } & + & { color: green; .sub { color: green; } } } & { .hidden { hidden: true; } } @media tv { .hidden { hidden: true; } } /* comment is not output */ .zz { .y { pulled-in: yes; } /* comment pulled in */ }v1.6.3~dfsg/test/less/import/deeper/0000755000000000000000000000000012275460205016157 5ustar rootrootv1.6.3~dfsg/test/less/import/deeper/import-once-test-a.less0000644000000000000000000000004012275460205022470 0ustar rootroot@import "../import-once-test-c";v1.6.3~dfsg/test/less/import/import-once-test-c.less0000644000000000000000000000004412275460205021232 0ustar rootroot @c: red; #import { color: @c; } v1.6.3~dfsg/test/less/import/invalid-css.less0000644000000000000000000000003212275460205020012 0ustar rootrootthis isn't very valid CSS.v1.6.3~dfsg/test/less/import/import-test-b.less0000644000000000000000000000011512275460205020306 0ustar rootroot@import "import-test-c"; @b: 100%; .mixin { height: 10px; color: @c; } v1.6.3~dfsg/test/less/import/import-and-relative-paths-test.less0000644000000000000000000000057612275460205023570 0ustar rootroot@import "../css/background.css"; @import "import-test-d.css"; @import "imports/logo"; @import "imports/font"; .unquoted-relative-path-bg() { background-image: url(../../data/image.jpg); } .quoted-relative-path-border-image() { border-image: url('../../data/image.jpg'); } #imported-relative-path { .unquoted-relative-path-bg; .quoted-relative-path-border-image; }v1.6.3~dfsg/test/less/import/import-interpolation2.less0000644000000000000000000000006312275460205022063 0ustar rootroot.a { var: test; } @in: "redefined-does-nothing";v1.6.3~dfsg/test/less/import/urls.less0000644000000000000000000000010112275460205016560 0ustar rootroot// empty file showing that it loads from the relative path first v1.6.3~dfsg/test/less/import/import-interpolation.less0000644000000000000000000000005312275460205022000 0ustar rootroot@import "import-@{in}@{terpolation}2.less";v1.6.3~dfsg/test/less/extend-clearfix.less0000644000000000000000000000032612275460205017354 0ustar rootroot.clearfix { *zoom: 1; &:after { content: ''; display: block; clear: both; height: 0; } } .foo { &:extend(.clearfix all); color: red; } .bar { &:extend(.clearfix all); color: blue; } v1.6.3~dfsg/test/less/sourcemaps/0000755000000000000000000000000012275460205015562 5ustar rootrootv1.6.3~dfsg/test/less/sourcemaps/imported.css0000644000000000000000000000011612275460205020115 0ustar rootroot/*comments*/ .unused-css { color: white; } .imported { color: black; }v1.6.3~dfsg/test/less/sourcemaps/basic.json0000644000000000000000000000002612275460205017534 0ustar rootroot{ "my-color": "red" }v1.6.3~dfsg/test/less/sourcemaps/basic.less0000644000000000000000000000043512275460205017535 0ustar rootroot@var: black; .a() { color: red; } .b { color: green; .a(); color: blue; background: @var; } .a, .b { background: green; .c, .d { background: gray; & + & { color: red; } } } .extend:extend(.a all) { color: pink; } @import (inline) "imported.css";v1.6.3~dfsg/test/less/mixins.less0000644000000000000000000000376412275460205015612 0ustar rootroot.mixin { border: 1px solid black; } .mixout { border-color: orange; } .borders { border-style: dashed; } #namespace { .borders { border-style: dotted; } .biohazard { content: "death"; .man { color: transparent; } } } #theme { > .mixin { background-color: grey; } } #container { color: black; .mixin; .mixout; #theme > .mixin; } #header { .milk { color: white; .mixin; #theme > .mixin; } #cookie { .chips { #namespace .borders; .calories { #container; } } .borders; } } .secure-zone { #namespace .biohazard .man; } .direct { #namespace > .borders; } .bo, .bar { width: 100%; } .bo { border: 1px; } .ar.bo.ca { color: black; } .jo.ki { background: none; } .amp { &.support { color: orange; .higher { top: 0px; } &.deeper { height: auto; } } } .extended { .bo; .jo.ki; .amp.support; .amp.support.higher; .amp.support.deeper; } .do .re .mi .fa { .sol .la { .si { color: cyan; } } } .mutli-selector-parents { .do.re.mi.fa.sol.la.si; } .foo .bar { .bar; } .has_parents() { & .underParents { color: red; } } .has_parents(); .parent { .has_parents(); } .margin_between(@above, @below) { * + & { margin-top: @above; } legend + & { margin-top: 0; } & + * { margin-top: @below; } } h1 { .margin_between(25px, 10px); } h2 { .margin_between(20px, 8px); } h3 { .margin_between(15px, 5px); } .mixin_def(@url, @position){ background-image: @url; background-position: @position; } .error{ @s: "/"; .mixin_def( "@{s}a.png", center center); } .recursion() { color: black; } .test-rec { .recursion { .recursion(); } } .paddingFloat(@padding) { padding-left: @padding; } .button { .paddingFloat(((10px + 12) * 2)); &.large { .paddingFloat(((10em * 2) * 2)); } } .clearfix() { // ... } .clearfix { .clearfix(); } .foo { .clearfix(); }v1.6.3~dfsg/test/less/mixins-nested.less0000644000000000000000000000033412275460205017060 0ustar rootroot.mix-inner (@var) { border-width: @var; } .mix (@a: 10) { .inner { height: (@a * 10); .innest { width: @a; .mix-inner((@a * 2)); } } } .class { .mix(30); } .class2 { .mix(60); } v1.6.3~dfsg/test/less/extend-nest.less0000644000000000000000000000152412275460205016531 0ustar rootroot.sidebar { width: 300px; background: red; .box { background: #FFF; border: 1px solid #000; margin: 10px 0; } } .sidebar2 { &:extend(.sidebar all); background: blue; } .type1 { .sidebar3 { &:extend(.sidebar all); background: green; } } .type2 { &.sidebar4 { &:extend(.sidebar all); background: red; } } .button { color: black; &:hover { color: white; } } .submit { &:extend(.button); &:hover:extend(.button:hover) {} } .nomatch { &:hover:extend(.button :hover) {} } .button2 { :hover { nested: white; } } .button2 :hover { notnested: black; } .nomatch :extend(.button2:hover) {} .amp-test-a, .amp-test-b { .amp-test-c &.amp-test-d&.amp-test-e { .amp-test-f&+&.amp-test-g:extend(.amp-test-h) {} } } .amp-test-h { test: extended by masses of selectors; }v1.6.3~dfsg/test/less/extend-media.less0000644000000000000000000000046312275460205016640 0ustar rootroot.ext1 .ext2 { background: black; } @media tv { .ext1 .ext3 { color: white; } .tv-lowres :extend(.ext1 all) { background: blue; } @media hires { .ext1 .ext4 { color: green; } .tv-hires :extend(.ext1 all) { background: red; } } } .all:extend(.ext1 all) { }v1.6.3~dfsg/test/less/variables.less0000644000000000000000000000251112275460205016240 0ustar rootroot@a: 2; @x: (@a * @a); @y: (@x + 1); @z: (@x * 2 + @y); @var: -1; .variables { width: (@z + 1cm); // 14cm } @b: @a * 10; @c: #888; @fonts: "Trebuchet MS", Verdana, sans-serif; @f: @fonts; @quotes: "~" "~"; @q: @quotes; @onePixel: 1px; .variables { height: (@b + @x + 0px); // 24px color: @c; font-family: @f; quotes: @q; } .redef { @var: 0; .inition { @var: 4; @var: 2; three: @var; @var: 3; } zero: @var; } .values { minus-one: @var; @a: 'Trebuchet'; @multi: 'A', B, C; font-family: @a, @a, @a; color: @c !important; multi: something @multi, @a; } .variable-names { @var: 'hello'; @name: 'var'; name: @@name; } .alpha { @var: 42; filter: alpha(opacity=@var); } .polluteMixin() { @a: 'pollution'; } .testPollution { @a: 'no-pollution'; a: @a; .polluteMixin(); a: @a; } .units { width: @onePixel; same-unit-as-previously: (@onePixel / @onePixel); square-pixel-divided: (@onePixel * @onePixel / @onePixel); odd-unit: unit((@onePixel * 4em / 2cm)); percentage: (10 * 50%); pixels: (50px * 10); conversion-metric-a: (20mm + 1cm); conversion-metric-b: (1cm + 20mm); conversion-imperial: (1in + 72pt + 6pc); custom-unit: (42octocats * 10); custom-unit-cancelling: (8cats * 9dogs / 4cats); mix-units: (1px + 1em); invalid-units: (1px * 1px); } v1.6.3~dfsg/test/less/rulesets.less0000644000000000000000000000100112275460205016127 0ustar rootroot#first > .one { > #second .two > #deux { width: 50%; #third { &:focus { color: black; #fifth { > #sixth { .seventh #eighth { + #ninth { color: purple; } } } } } height: 100%; } #fourth, #five, #six { color: #110000; .seven, .eight > #nine { border: 1px solid black; } #ten { color: red; } } } font-size: 2em; } v1.6.3~dfsg/test/less/strings.less0000644000000000000000000000213112275460205015757 0ustar rootroot#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 { @var: '/dev'; url: "http://lesscss.org@{var}/image.jpg"; @var2: 256; url2: "http://lesscss.org/image-@{var2}.jpg"; @var3: #456; url3: "http://lesscss.org@{var3}"; @var4: hello; url4: "http://lesscss.org/@{var4}"; @var5: 54.4px; url5: "http://lesscss.org/@{var5}"; } // multiple calls with string interpolation .mix-mul (@a: green) { color: ~"@{a}"; } .mix-mul-class { .mix-mul(blue); .mix-mul(red); .mix-mul(black); .mix-mul(orange); } @test: Arial, Verdana, San-Serif; .watermark { @family: ~"Univers, @{test}"; family: @family; } v1.6.3~dfsg/test/less/extend-selector.less0000644000000000000000000000253212275460205017400 0ustar rootroot.error { border: 1px #f00; background: #fdd; } .error.intrusion { font-size: 1.3em; font-weight: bold; } .intrusion .error { display: none; } .badError:extend(.error all) { border-width: 3px; } .foo .bar, .foo .baz { display: none; } .ext1 .ext2 :extend(.foo all) { } .ext3:extend(.foo all), .ext4:extend(.foo all) { } div.ext5, .ext6 > .ext5 { width: 100px; } .should-not-exist-in-output, .ext7:extend(.ext5 all) { } .ext { test: 1; } // same as // .a .c:extend(.ext all) // .b .c:extend(.ext all) // .a .c .d // .b .c .d .a, .b { test: 2; .c:extend(.ext all) { test: 3; .d { test: 4; } } } .replace.replace, .c.replace + .replace { .replace, .c { prop: copy-paste-replace; } } .rep_ace:extend(.replace all) {} .attributes { [data="test"] { extend: attributes; } .attribute-test { &:extend([data="test"] all); } [data] { extend: attributes2; } .attribute-test2 { &:extend([data] all); //you could argue it should match [data="test"]... not for now though... } @attr-data: "test3"; [data=@{attr-data}] { extend: attributes2; } .attribute-test { &:extend([data="test3"] all); } } .header { .header-nav { background: red; &:before { background: blue; } } } .footer { .footer-nav { &:extend( .header .header-nav all ); } }v1.6.3~dfsg/test/less/static-urls/0000755000000000000000000000000012275460205015653 5ustar rootrootv1.6.3~dfsg/test/less/static-urls/urls.less0000644000000000000000000000175712275460205017542 0ustar rootroot@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, '); } .comma-delimited { background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg); } .values { @a: 'Trebuchet'; url: url(@a); } @import "../import/import-and-relative-paths-test"; v1.6.3~dfsg/test/less/colors.less0000644000000000000000000000272712275460205015602 0ustar rootroot#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 .e { color: rgba(-99.9, 31.4159, 321, 0.42); } } #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%)); } } #percentage { color: red(rgb(100%, 0, 0)); border-color: rgba(100%, 0, 0, 50%); } v1.6.3~dfsg/test/less/css-guards.less0000644000000000000000000000261112275460205016344 0ustar rootroot .light when (lightness(@a) > 50%) { color: green; } .dark when (lightness(@a) < 50%) { color: orange; } @a: #ddd; .see-the { @a: #444; // this mirrors what mixins do - they evaluate the guards at the point of definition .light(); .dark(); } .hide-the { .light(); .dark(); } .multiple-conditions-1 when (@b = 1), (@c = 2), (@d = 3) { color: red; } .multiple-conditions-2 when (@b = 1), (@c = 2), (@d = 2) { color: blue; } @b: 2; @c: 3; @d: 3; .inheritance when (@b = 2) { .test { color: black; } &:hover { color: pink; } .hideme when (@b = 1) { color: green; } & when (@b = 1) { hideme: green; } } .hideme when (@b = 1) { .test { color: black; } &:hover { color: pink; } .hideme when (@b = 1) { color: green; } } & when (@b = 1) { .hideme { color: red; } } .mixin-with-guard-inside(@colWidth) { // selector with guard (applies also to & when() ...) .clsWithGuard when (@colWidth <= 0) { dispaly: none; } } .mixin-with-guard-inside(0px); .dont-split-me-up { width: 1px; & when (@c = 3) { color: red; } & when (@c = 3) { height: 1px; } + & when (@c = 3) { // creates invalid css but tests that we don't fold it in sibling: true; } } .scope-check when (@c = 3) { @k: 1px; & when (@c = 3) { @k: 2px; sub-prop: @k; } prop: @k; } .scope-check-2 { .scope-check(); @k:4px; } v1.6.3~dfsg/test/less/extend-exact.less0000644000000000000000000000101712275460205016661 0ustar rootroot.replace.replace, .c.replace + .replace { .replace, .c { prop: copy-paste-replace; } } .rep_ace:extend(.replace.replace .replace) {} .a .b .c { prop: not_effected; } .a { prop: is_effected; .b { prop: not_effected; } .b.c { prop: not_effected; } } .c, .a { .b, .a { .a, .c { prop: not_effected; } } } .effected { &:extend(.a); &:extend(.b); &:extend(.c); } .e { && { prop: extend-double; &:hover { hover: not-extended; } } } .dbl:extend(.e.e) {} v1.6.3~dfsg/test/less/lazy-eval.less0000644000000000000000000000006312275460205016174 0ustar rootroot@var: @a; @a: 100%; .lazy-eval { width: @var; } v1.6.3~dfsg/test/less/scope.less0000644000000000000000000000257612275460205015414 0ustar rootroot@x: red; @x: blue; @z: transparent; @mix: none; .mixin { @mix: #989; } @mix: blue; .tiny-scope { color: @mix; // #989 .mixin; } .scope1 { @y: orange; @z: black; color: @x; // blue border-color: @z; // black .hidden { @x: #131313; } .scope2 { @y: red; color: @x; // blue .scope3 { @local: white; color: @y; // red border-color: @z; // black background-color: @local; // white } } } #namespace { .scoped_mixin() { @local-will-be-made-global: green; .scope { scoped-val: @local-will-be-made-global; } } } #namespace > .scoped_mixin(); .setHeight(@h) { @height: 1024px; } .useHeightInMixinCall(@h) { .useHeightInMixinCall { mixin-height: @h; } } @mainHeight: 50%; .setHeight(@mainHeight); .heightIsSet { height: @height; } .useHeightInMixinCall(@height); .importRuleset() { .imported { exists: true; } } .importRuleset(); .testImported { .imported; } @parameterDefault: 'top level'; @anotherVariable: 'top level'; //mixin uses top-level variables .mixinNoParam(@parameter: @parameterDefault) when (@parameter = 'top level') { default: @parameter; scope: @anotherVariable; sub-scope-only: @subScopeOnly; } #allAreUsedHere { //redefine top-level variables in different scope @parameterDefault: 'inside'; @anotherVariable: 'inside'; @subScopeOnly: 'inside'; //use the mixin .mixinNoParam(); }v1.6.3~dfsg/test/less/import-reference.less0000644000000000000000000000057212275460205017543 0ustar rootroot@import (reference) url("import-once.less"); @import (reference) url("css-3.less"); @import (reference) url("media.less"); /* The media statement above is invalid (no selector) We should ban invalid media queries with properties and no selector? */ @import (reference) url("import/import-reference.less"); .b { .z(); } .zz(); .visible:extend(.z all) { extend: test; }v1.6.3~dfsg/test/less/errors/0000755000000000000000000000000012275460205014715 5ustar rootrootv1.6.3~dfsg/test/less/errors/multiply-mixed-units.txt0000644000000000000000000000030112275460205021573 0ustar rootrootSyntaxError: Multiple units in dimension. Correct the units or use the unit function. Bad unit: em*px in {path}multiply-mixed-units.less on line 6, column 3: 5 .a { 6 error: (1px * 1em); 7 } v1.6.3~dfsg/test/less/errors/parens-error-1.less0000644000000000000000000000005212275460205020357 0ustar rootroot.a { something: (12 (13 + 5 -23) + 5); }v1.6.3~dfsg/test/less/errors/extend-not-at-end.txt0000644000000000000000000000023512275460205020711 0ustar rootrootSyntaxError: 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; v1.6.3~dfsg/test/less/errors/property-asterisk-only-name.txt0000644000000000000000000000016512275460205023064 0ustar rootrootParseError: Unrecognised input in {path}property-asterisk-only-name.less on line 2, column 5: 1 a { 2 * : 1; 3 } v1.6.3~dfsg/test/less/errors/javascript-error.txt0000644000000000000000000000030012275460205020744 0ustar rootrootSyntaxError: JavaScript evaluation error: 'TypeError: Cannot call method 'toJS' of undefined' in {path}javascript-error.less on line 2, column 27: 1 .scope { 2 var: `this.foo.toJS()`; 3 } v1.6.3~dfsg/test/less/errors/property-asterisk-only-name.less0000644000000000000000000000002012275460205023201 0ustar rootroota { * : 1; }v1.6.3~dfsg/test/less/errors/property-interp-not-defined.less0000644000000000000000000000003312275460205023156 0ustar rootroota {outline-@{color}: green}v1.6.3~dfsg/test/less/errors/mixin-not-matched2.txt0000644000000000000000000000023212275460205021062 0ustar rootrootRuntimeError: No matching definition was found for `.mixin(@a:trumpete)` in {path}mixin-not-matched2.less on line 6, column 1: 5 6 .mixin(@a: @saxofon); v1.6.3~dfsg/test/less/errors/mixed-mixin-definition-args-1.txt0000644000000000000000000000025412275460205023125 0ustar rootrootSyntaxError: Cannot mix ; and , as delimiter types in {path}mixed-mixin-definition-args-1.less on line 5, column 30: 4 .mixin-test { 5 .mixin(@a: 5; @b: 6, @c: 7); 6 } v1.6.3~dfsg/test/less/errors/parse-error-with-import.txt0000644000000000000000000000015412275460205022200 0ustar rootrootParseError: Unrecognised input in {path}parse-error-with-import.less on line 8, column 9: 7 8 nonsense; 9 v1.6.3~dfsg/test/less/errors/parens-error-2.less0000644000000000000000000000005012275460205020356 0ustar rootroot.a { something: (12 * (13 + 5 -23)); }v1.6.3~dfsg/test/less/errors/multiple-guards-on-css-selectors2.txt0000644000000000000000000000025712275460205024063 0ustar rootrootSyntaxError: Guards are only currently allowed on a single selector. in {path}multiple-guards-on-css-selectors2.less on line 3, column 23: 2 .a, 3 .b when (@ie8 = true) { 4 } v1.6.3~dfsg/test/less/errors/property-interp-not-defined.txt0000644000000000000000000000021012275460205023024 0ustar rootrootNameError: variable @color is undefined in {path}property-interp-not-defined.less on line 1, column 12: 1 a {outline-@{color}: green} v1.6.3~dfsg/test/less/errors/import-subfolder1.txt0000644000000000000000000000017612275460205021040 0ustar rootrootNameError: .mixin-not-defined is undefined in {path}mixin-not-defined.less on line 11, column 1: 10 11 .mixin-not-defined(); v1.6.3~dfsg/test/less/errors/unit-function.less0000644000000000000000000000004412275460205020405 0ustar rootroot.a { font-size: unit(80/16,rem); }v1.6.3~dfsg/test/less/errors/add-mixed-units2.less0000644000000000000000000000005412275460205020662 0ustar rootroot.a { error: ((1px * 2px) + (3em * 3px)); }v1.6.3~dfsg/test/less/errors/svg-gradient2.txt0000644000000000000000000000043512275460205020134 0ustar rootrootArgumentError: error evaluating function `svg-gradient`: svg-gradient expects direction, start_color [start_position], [color position,]..., end_color [end_position] in {path}svg-gradient2.less on line 2, column 6: 1 .a { 2 a: svg-gradient(to bottom, black, orange, 45%, white); 3 } v1.6.3~dfsg/test/less/errors/add-mixed-units2.txt0000644000000000000000000000032312275460205020532 0ustar rootrootSyntaxError: 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 2, column 3: 1 .a { 2 error: ((1px * 2px) + (3em * 3px)); 3 } v1.6.3~dfsg/test/less/errors/svg-gradient3.less0000644000000000000000000000005012275460205020255 0ustar rootroot.a { a: svg-gradient(black, orange); }v1.6.3~dfsg/test/less/errors/comment-in-selector.txt0000644000000000000000000000020112275460205021333 0ustar rootrootParseError: Unrecognised input in {path}comment-in-selector.less on line 1, column 21: 1 #gaga /* Comment */ span { color: red } v1.6.3~dfsg/test/less/errors/mixin-not-defined.less0000644000000000000000000000017312275460205021124 0ustar rootroot .error-is-further-on() { } .pad-here-to-reproduce-error-in() { } .the-import-subfolder-test() { } .mixin-not-defined();v1.6.3~dfsg/test/less/errors/svg-gradient1.less0000644000000000000000000000006312275460205020257 0ustar rootroot.a { a: svg-gradient(horizontal, black, white); }v1.6.3~dfsg/test/less/errors/comment-in-selector.less0000644000000000000000000000004712275460205021472 0ustar rootroot#gaga /* Comment */ span { color: red }v1.6.3~dfsg/test/less/errors/parens-error-2.txt0000644000000000000000000000020412275460205020230 0ustar rootrootSyntaxError: expected ')' got '-' in {path}parens-error-2.less on line 2, column 28: 1 .a { 2 something: (12 * (13 + 5 -23)); 3 } v1.6.3~dfsg/test/less/errors/parse-error-missing-parens.txt0000644000000000000000000000020612275460205022652 0ustar rootrootParseError: missing closing `)` in {path}parse-error-missing-parens.less on line 1, column 8: 1 @media (missing: bracket { 2 body { v1.6.3~dfsg/test/less/errors/mixins-guards-default-func-2.txt0000644000000000000000000000025512275460205022764 0ustar rootrootRuntimeError: Ambiguous use of `default()` found when matching for `.m(3)` in {path}mixins-guards-default-func-2.less on line 8, column 5: 7 .m(2); 8 .m(3); 9 } v1.6.3~dfsg/test/less/errors/import-subfolder2.less0000644000000000000000000000005112275460205021160 0ustar rootroot@import "imports/import-subfolder2.less";v1.6.3~dfsg/test/less/errors/mixin-not-matched.less0000644000000000000000000000007212275460205021131 0ustar rootroot@saxofon:trumpete; .mixin(saxofon) { } .mixin(@saxofon);v1.6.3~dfsg/test/less/errors/unit-function.txt0000644000000000000000000000033312275460205020257 0ustar rootrootArgumentError: error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis? in {path}unit-function.less on line 2, column 14: 1 .a { 2 font-size: unit(80/16,rem); 3 } v1.6.3~dfsg/test/less/errors/svg-gradient1.txt0000644000000000000000000000042512275460205020132 0ustar rootrootArgumentError: error evaluating function `svg-gradient`: svg-gradient direction must be 'to bottom', 'to right', 'to bottom right', 'to top right' or 'ellipse at center' in {path}svg-gradient1.less on line 2, column 6: 1 .a { 2 a: svg-gradient(horizontal, black, white); 3 } v1.6.3~dfsg/test/less/errors/mixin-not-matched2.less0000644000000000000000000000007512275460205021216 0ustar rootroot@saxofon:trumpete; .mixin(@a, @b) { } .mixin(@a: @saxofon);v1.6.3~dfsg/test/less/errors/property-ie5-hack.txt0000644000000000000000000000021312275460205020722 0ustar rootrootParseError: Unrecognised input in {path}property-ie5-hack.less on line 2, column 3: 1 .test { 2 display/*/: block; /*sorry for IE5*/ 3 } v1.6.3~dfsg/test/less/errors/parse-error-missing-parens.less0000644000000000000000000000010612275460205023000 0ustar rootroot@media (missing: bracket { body { background-color: #fff; } } v1.6.3~dfsg/test/less/errors/property-in-root3.txt0000644000000000000000000000023212275460205021007 0ustar rootrootSyntaxError: properties must be inside selector blocks, they cannot be in the root. in {path}property-in-root3.less on line 1, column 1: 1 prop:1; 2 .a { v1.6.3~dfsg/test/less/errors/property-in-root.txt0000644000000000000000000000024112275460205020724 0ustar rootrootSyntaxError: properties must be inside selector blocks, they cannot be in the root. in {path}property-in-root.less on line 2, column 3: 1 .a() { 2 prop:1; 3 } v1.6.3~dfsg/test/less/errors/import-subfolder2.txt0000644000000000000000000000015212275460205021033 0ustar rootrootParseError: missing opening `{` in {path}parse-error-curly-bracket.less on line 4, column 1: 3 } 4 } 5 v1.6.3~dfsg/test/less/errors/mixed-mixin-definition-args-1.less0000644000000000000000000000014212275460205023250 0ustar rootroot.mixin(@a : 4, @b : 3, @c: 2) { will: fail; } .mixin-test { .mixin(@a: 5; @b: 6, @c: 7); }v1.6.3~dfsg/test/less/errors/property-in-root.less0000644000000000000000000000003012275460205021047 0ustar rootroot.a() { prop:1; } .a();v1.6.3~dfsg/test/less/errors/css-guard-default-func.less0000644000000000000000000000005712275460205022052 0ustar rootroot selector when (default()) { color: red; } v1.6.3~dfsg/test/less/errors/javascript-undefined-var.txt0000644000000000000000000000020612275460205022347 0ustar rootrootNameError: variable @b is undefined in {path}javascript-undefined-var.less on line 2, column 15: 1 .scope { 2 @a: `@{b}`; 3 } v1.6.3~dfsg/test/less/errors/import-no-semi.less0000644000000000000000000000005012275460205020457 0ustar rootroot@import "this-statement-is-invalid.less"v1.6.3~dfsg/test/less/errors/property-in-root3.less0000644000000000000000000000003012275460205021132 0ustar rootrootprop:1; .a { prop:1; }v1.6.3~dfsg/test/less/errors/imports/0000755000000000000000000000000012275460205016412 5ustar rootrootv1.6.3~dfsg/test/less/errors/imports/import-subfolder2.less0000644000000000000000000000006312275460205022660 0ustar rootroot@import "subfolder/parse-error-curly-bracket.less";v1.6.3~dfsg/test/less/errors/imports/import-subfolder1.less0000644000000000000000000000005312275460205022656 0ustar rootroot@import "subfolder/mixin-not-defined.less";v1.6.3~dfsg/test/less/errors/imports/subfolder/0000755000000000000000000000000012275460205020377 5ustar rootrootv1.6.3~dfsg/test/less/errors/imports/subfolder/mixin-not-defined.less0000644000000000000000000000004712275460205024606 0ustar rootroot@import "../../mixin-not-defined.less";v1.6.3~dfsg/test/less/errors/imports/subfolder/parse-error-curly-bracket.less0000644000000000000000000000005712275460205026277 0ustar rootroot@import "../../parse-error-curly-bracket.less";v1.6.3~dfsg/test/less/errors/imports/import-test.less0000644000000000000000000000004512275460205021570 0ustar rootroot.someclass { font-weight: bold; }v1.6.3~dfsg/test/less/errors/extend-not-at-end.less0000644000000000000000000000005012275460205021033 0ustar rootroot.a:extend(.b all).c { property: red; }v1.6.3~dfsg/test/less/errors/mixin-not-defined.txt0000644000000000000000000000017612275460205021000 0ustar rootrootNameError: .mixin-not-defined is undefined in {path}mixin-not-defined.less on line 11, column 1: 10 11 .mixin-not-defined(); v1.6.3~dfsg/test/less/errors/multiple-guards-on-css-selectors.less0000644000000000000000000000005112275460205024120 0ustar rootroot@ie8: true; .a when (@ie8 = true), .b { }v1.6.3~dfsg/test/less/errors/mixin-not-matched.txt0000644000000000000000000000022212275460205020777 0ustar rootrootRuntimeError: No matching definition was found for `.mixin(trumpete)` in {path}mixin-not-matched.less on line 6, column 1: 5 6 .mixin(@saxofon); v1.6.3~dfsg/test/less/errors/bad-variable-declaration1.less0000644000000000000000000000001512275460205022456 0ustar rootroot@@demo: "hi";v1.6.3~dfsg/test/less/errors/divide-mixed-units.less0000644000000000000000000000003412275460205021312 0ustar rootroot.a { error: (1px / 3em); }v1.6.3~dfsg/test/less/errors/color-func-invalid-color.txt0000644000000000000000000000033212275460205022263 0ustar rootrootArgumentError: error evaluating function `color`: argument must be a color keyword or 3/6 digit hex e.g. #FFF in {path}color-func-invalid-color.less on line 2, column 10: 1 .test { 2 color: color("NOT A COLOR"); 3 } v1.6.3~dfsg/test/less/errors/parse-error-extra-parens.txt0000644000000000000000000000020512275460205022323 0ustar rootrootParseError: missing opening `(` in {path}parse-error-extra-parens.less on line 1, column 24: 1 @media (extra: bracket)) { 2 body { v1.6.3~dfsg/test/less/errors/parse-error-extra-parens.less0000644000000000000000000000010612275460205022452 0ustar rootroot@media (extra: bracket)) { body { background-color: #fff; } } v1.6.3~dfsg/test/less/errors/parse-error-with-import.less0000644000000000000000000000020012275460205022317 0ustar rootroot@import 'import/import-test.less'; body { font-family: arial, sans-serif; } nonsense; .clickable { cursor: pointer; }v1.6.3~dfsg/test/less/errors/add-mixed-units.txt0000644000000000000000000000027412275460205020455 0ustar rootrootSyntaxError: Incompatible units. Change the units or use the unit function. Bad units: 'px' and 'em'. in {path}add-mixed-units.less on line 2, column 3: 1 .a { 2 error: (1px + 3em); 3 } v1.6.3~dfsg/test/less/errors/divide-mixed-units.txt0000644000000000000000000000027712275460205021174 0ustar rootrootSyntaxError: 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 } v1.6.3~dfsg/test/less/errors/parens-error-3.txt0000644000000000000000000000020512275460205020232 0ustar rootrootSyntaxError: expected ')' got '-' in {path}parens-error-3.less on line 2, column 29: 1 .a { 2 something: (12 + (13 + 10 -23)); 3 } v1.6.3~dfsg/test/less/errors/mixed-mixin-definition-args-2.less0000644000000000000000000000014312275460205023252 0ustar rootroot.mixin(@a : 4, @b : 3, @c: 2) { will: fail; } .mixin-test { .mixin(@a: 5, @b: 6; @c: 7); } v1.6.3~dfsg/test/less/errors/bad-variable-declaration1.txt0000644000000000000000000000015412275460205022333 0ustar rootrootParseError: Unrecognised input in {path}bad-variable-declaration1.less on line 1, column 1: 1 @@demo: "hi"; v1.6.3~dfsg/test/less/errors/mixins-guards-default-func-2.less0000644000000000000000000000027412275460205023114 0ustar rootroot guard-default-func-conflict { .m(1) {} .m(@x) when not(default()) {} .m(@x) when (@x = 3) and (default()) {} .m(2); .m(3); } v1.6.3~dfsg/test/less/errors/import-subfolder1.less0000644000000000000000000000005112275460205021157 0ustar rootroot@import "imports/import-subfolder1.less";v1.6.3~dfsg/test/less/errors/parens-error-1.txt0000644000000000000000000000020612275460205020231 0ustar rootrootSyntaxError: expected ')' got '(' in {path}parens-error-1.less on line 2, column 18: 1 .a { 2 something: (12 (13 + 5 -23) + 5); 3 } v1.6.3~dfsg/test/less/errors/parse-error-curly-bracket.less0000644000000000000000000000005112275460205022607 0ustar rootrootbody { background-color: #fff; } } v1.6.3~dfsg/test/less/errors/multiple-guards-on-css-selectors.txt0000644000000000000000000000025512275460205023777 0ustar rootrootSyntaxError: Guards are only currently allowed on a single selector. in {path}multiple-guards-on-css-selectors.less on line 3, column 1: 2 .a when (@ie8 = true), 3 .b { 4 } v1.6.3~dfsg/test/less/errors/parens-error-3.less0000644000000000000000000000005112275460205020360 0ustar rootroot.a { something: (12 + (13 + 10 -23)); }v1.6.3~dfsg/test/less/errors/svg-gradient3.txt0000644000000000000000000000040612275460205020133 0ustar rootrootArgumentError: error evaluating function `svg-gradient`: svg-gradient expects direction, start_color [start_position], [color position,]..., end_color [end_position] in {path}svg-gradient3.less on line 2, column 6: 1 .a { 2 a: svg-gradient(black, orange); 3 } v1.6.3~dfsg/test/less/errors/javascript-error.less0000644000000000000000000000004712275460205021103 0ustar rootroot.scope { var: `this.foo.toJS()`; } v1.6.3~dfsg/test/less/errors/svg-gradient2.less0000644000000000000000000000007712275460205020265 0ustar rootroot.a { a: svg-gradient(to bottom, black, orange, 45%, white); }v1.6.3~dfsg/test/less/errors/property-ie5-hack.less0000644000000000000000000000006012275460205021051 0ustar rootroot.test { display/*/: block; /*sorry for IE5*/ }v1.6.3~dfsg/test/less/errors/parse-error-missing-bracket.less0000644000000000000000000000004112275460205023121 0ustar rootrootbody { background-color: #fff; v1.6.3~dfsg/test/less/errors/javascript-undefined-var.less0000644000000000000000000000003312275460205022474 0ustar rootroot.scope { @a: `@{b}`; } v1.6.3~dfsg/test/less/errors/mixins-guards-default-func-1.txt0000644000000000000000000000026612275460205022765 0ustar rootrootRuntimeError: Ambiguous use of `default()` found when matching for `.m(1, 2)` in {path}mixins-guards-default-func-1.less on line 8, column 5: 7 .m(1, 1); 8 .m(1, 2); 9 } v1.6.3~dfsg/test/less/errors/recursive-variable.less0000644000000000000000000000004412275460205021375 0ustar rootroot@bodyColor: darken(@bodyColor, 30%);v1.6.3~dfsg/test/less/errors/mixed-mixin-definition-args-2.txt0000644000000000000000000000025412275460205023126 0ustar rootrootSyntaxError: Cannot mix ; and , as delimiter types in {path}mixed-mixin-definition-args-2.less on line 5, column 26: 4 .mixin-test { 5 .mixin(@a: 5, @b: 6; @c: 7); 6 } v1.6.3~dfsg/test/less/errors/css-guard-default-func.txt0000644000000000000000000000033512275460205021722 0ustar rootrootSyntaxError: error evaluating function `default`: it is currently only allowed in parametric mixin guards, in {path}css-guard-default-func.less on line 2, column 16: 1 2 selector when (default()) { 3 color: red; v1.6.3~dfsg/test/less/errors/property-in-root2.txt0000644000000000000000000000024112275460205021006 0ustar rootrootSyntaxError: properties must be inside selector blocks, they cannot be in the root. in {path}property-in-root.less on line 2, column 3: 1 .a() { 2 prop:1; 3 } v1.6.3~dfsg/test/less/errors/import-missing.txt0000644000000000000000000000024312275460205020436 0ustar rootrootFileError: '{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"; v1.6.3~dfsg/test/less/errors/recursive-variable.txt0000644000000000000000000000022612275460205021250 0ustar rootrootNameError: Recursive variable definition for @bodyColor in {path}recursive-variable.less on line 1, column 20: 1 @bodyColor: darken(@bodyColor, 30%); v1.6.3~dfsg/test/less/errors/multiple-guards-on-css-selectors2.less0000644000000000000000000000005112275460205024202 0ustar rootroot@ie8: true; .a, .b when (@ie8 = true) { }v1.6.3~dfsg/test/less/errors/color-func-invalid-color.less0000644000000000000000000000005012275460205022407 0ustar rootroot.test { color: color("NOT A COLOR"); }v1.6.3~dfsg/test/less/errors/parse-error-curly-bracket.txt0000644000000000000000000000015212275460205022462 0ustar rootrootParseError: missing opening `{` in {path}parse-error-curly-bracket.less on line 4, column 1: 3 } 4 } 5 v1.6.3~dfsg/test/less/errors/import-missing.less0000644000000000000000000000016312275460205020566 0ustar rootroot.a { color: green; // tests line number for import reference is correct } @import "file-does-not-exist.less";v1.6.3~dfsg/test/less/errors/multiply-mixed-units.less0000644000000000000000000000007312275460205021730 0ustar rootroot/* Test */ #blah { // blah } .a { error: (1px * 1em); }v1.6.3~dfsg/test/less/errors/import-no-semi.txt0000644000000000000000000000017412275460205020337 0ustar rootrootParseError: Unrecognised input in {path}import-no-semi.less on line 1, column 1: 1 @import "this-statement-is-invalid.less" v1.6.3~dfsg/test/less/errors/property-in-root2.less0000644000000000000000000000003312275460205021134 0ustar rootroot@import "property-in-root";v1.6.3~dfsg/test/less/errors/mixins-guards-default-func-1.less0000644000000000000000000000024412275460205023110 0ustar rootroot guard-default-func-conflict { .m(@x, 1) {} .m(@x, 2) when (default()) {} .m(@x, 2) when (default()) {} .m(1, 1); .m(1, 2); } v1.6.3~dfsg/test/less/errors/mixins-guards-default-func-3.txt0000644000000000000000000000025512275460205022765 0ustar rootrootRuntimeError: Ambiguous use of `default()` found when matching for `.m(2)` in {path}mixins-guards-default-func-3.less on line 8, column 5: 7 .m(1); 8 .m(2); 9 } v1.6.3~dfsg/test/less/errors/parse-error-missing-bracket.txt0000644000000000000000000000020412275460205022773 0ustar rootrootParseError: missing closing `}` in {path}parse-error-missing-bracket.less on line 1, column 6: 1 body { 2 background-color: #fff; v1.6.3~dfsg/test/less/errors/add-mixed-units.less0000644000000000000000000000003412275460205020576 0ustar rootroot.a { error: (1px + 3em); }v1.6.3~dfsg/test/less/errors/extend-no-selector.txt0000644000000000000000000000026212275460205021175 0ustar rootrootSyntaxError: 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; v1.6.3~dfsg/test/less/errors/extend-no-selector.less0000644000000000000000000000004412275460205021322 0ustar rootroot:extend(.a all) { property: red; }v1.6.3~dfsg/test/less/errors/mixins-guards-default-func-3.less0000644000000000000000000000023612275460205023113 0ustar rootroot guard-default-func-conflict { .m(1) {} .m(@x) when not(default()) {} .m(@x) when not(default()) {} .m(1); .m(2); } v1.6.3~dfsg/test/less/css-escapes.less0000644000000000000000000000066712275460205016513 0ustar rootroot@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; } v1.6.3~dfsg/test/less/mixins-guards-default-func.less0000644000000000000000000001050612275460205021440 0ustar rootroot // basics: guard-default-basic-1 { .m(1) {case: 1} .m(@x) when (default()) {default: @x} &-1 {.m(1)} &-2 {.m(2)} } guard-default-basic-2 { .m(1) {case: 1} .m(2) {case: 2} .m(3) {case: 3} .m(@x) when (default()) {default: @x} &-0 {.m(0)} &-2 {.m(2)} } guard-default-basic-3 { .m(@x) when (@x = 1) {case: 1} .m(2) {case: 2} .m(@x) when (@x = 3) {case: 3} .m(@x) when (default()) {default: @x} &-0 {.m(0)} &-2 {.m(2)} &-3 {.m(3)} } guard-default-definition-order { .m(@x) when (default()) {default: @x} .m(@x) when (@x = 1) {case: 1} .m(2) {case: 2} .m(@x) when (@x = 3) {case: 3} &-0 {.m(0)} &-2 {.m(2)} &-2 {.m(3)} } // out of guard: guard-default-out-of-guard { .m(1) {case-1: 1} .m(@x: default()) when (default()) {default: @x} &-0 { case-0: default(); .m(1); .m(2); case-2: default(); } &-1 {.m(default())} &-2 {.m()} } // expressions: guard-default-expr-not { .m(1) {case: 1} .m(@x) when not(default()) {default: @x} &-1 {.m(1)} &-2 {.m(2)} } guard-default-expr-eq { .m(@x) when (@x = true) {case: @x} .m(@x) when (@x = false) {case: @x} .m(@x) when (@x = default()) {default: @x} &-true {.m(true)} &-false {.m(false)} } guard-default-expr-or { .m(1) {case: 1} .m(2) {case: 2} .m(@x) when (default()), (@x = 2) {default: @x} &-1 {.m(1)} &-2 {.m(2)} &-3 {.m(3)} } guard-default-expr-and { .m(1) {case: 1} .m(2) {case: 2} .m(@x) when (default()) and (@x = 3) {default: @x} &-1 {.m(1)} &-2 {.m(2)} &-3 {.m(3)} &-4 {.m(4)} } guard-default-expr-always { .m(1) {case: 1} .m(@x) when (default()), not(default()) {default: @x} // always match &-1 {.m(1)} &-2 {.m(2)} } guard-default-expr-never { .m(1) {case: 1} .m(@x) when (default()) and not(default()) {default: @x} // never match &-1 {.m(1)} &-2 {.m(2)} } // not conflicting multiple default() uses: guard-default-multi-1 { .m(0) {case: 0} .m(@x) when (default()) {default-1: @x} .m(2) when (default()) {default-2: @x} &-0 {.m(0)} &-1 {.m(1)} } guard-default-multi-2 { .m(1, @x) when (default()) {default-1: @x} .m(2, @x) when (default()) {default-2: @x} .m(@x, yes) when (default()) {default-3: @x} &-1 {.m(1, no)} &-2 {.m(2, no)} &-3 {.m(3, yes)} } guard-default-multi-3 { .m(red) {case-1: darkred} .m(blue) {case-2: darkblue} .m(@x) when (iscolor(@x)) and (default()) {default-color: @x} .m('foo') {case-1: I am 'foo'} .m('bar') {case-2: I am 'bar'} .m(@x) when (isstring(@x)) and (default()) {default-string: I am @x} &-blue {.m(blue)} &-green {.m(green)} &-foo {.m('foo')} &-baz {.m('baz')} } guard-default-multi-4 { .m(@x) when (default()), not(default()) {always: @x} .m(@x) when (default()) and not(default()) {never: @x} .m(2) {case: 2} .m(1); .m(2); } guard-default-not-ambiguos-2 { .m(@x) {case: 1} .m(@x) when (default()) {default: @x} .m(@x) when not(default()) {not-default: @x} .m(2); } guard-default-not-ambiguos-3 { .m(@x) {case: 1} .m(@x) when not(default()) {not-default-1: @x} .m(@x) when not(default()) {not-default-2: @x} .m(2); } // default & scope guard-default-scopes { .s1() {.m(@v) {1: no condition}} .s2() {.m(@v) when (@v) {2: when true}} .s3() {.m(@v) when (default()) {3: when default}} &-3 { .s2(); .s3(); .m(false); } &-1 { .s1(); .s3(); .m(false); } } v1.6.3~dfsg/test/less/property-name-interp.less0000644000000000000000000000176412275460205020402 0ustar rootroot pi-test { @prefix: ufo-; @a: border; @bb: top; @c_c: left; @d-d4: radius; @-: -; @{a}: 0; @{prefix}width: 50%; *-z-@{a} :1px dashed blue; -www-@{a}-@{bb}: 2px; @{d-d4}-is-not-a-@{a}:true; @{a}-@{bb}-@{c_c}-@{d-d4} : 2em; @{a}@{-}@{bb}@{-}red@{-}@{d-d4}-: 3pt; .mixin(mixer); .merge(ish, base); } @global: global; .mixin(@arg) { @local: local; @{global}-@{local}-@{arg}-property: strong; } .merge(@p, @v) { &-merge { @prefix: pre; @suffix: ish; @{prefix}-property-ish+ :high; pre-property-@{suffix} +: middle; @{prefix}-property-@{suffix}+: low; @{prefix}-property-@{p} + : @v; @subterfuge: ~'+'; pre-property-ish@{subterfuge}: nice try dude; } } pi-indirect-vars { @{p}: @p; @p: @@a; @a: b; @b: auto; } pi-complex-values { @{p}@{p}: none; @p: (1 + 2px) fadeout(#ff0, 50%), pi() /* foo */; } v1.6.3~dfsg/test/less/mixins-args.less0000644000000000000000000000607312275460205016540 0ustar rootroot.mixin (@a: 1px, @b: 50%) { width: (@a * 5); height: (@b - 1%); } .mixina (@style, @width, @color: black) { border: @width @style @color; } .mixiny (@a: 0, @b: 0) { margin: @a; padding: @b; } .hidden() { color: transparent; // asd } #hidden { .hidden; } #hidden1 { .hidden(); } .two-args { color: blue; .mixin(2px, 100%); .mixina(dotted, 2px); } .one-arg { .mixin(3px); } .no-parens { .mixin; } .no-args { .mixin(); } .var-args { @var: 9; .mixin(@var, (@var * 2)); } .multi-mix { .mixin(2px, 30%); .mixiny(4, 5); } .maxa(@arg1: 10, @arg2: #f00) { padding: (@arg1 * 2px); color: @arg2; } body { .maxa(15); } @glob: 5; .global-mixin(@a:2) { width: (@glob + @a); } .scope-mix { .global-mixin(3); } .nested-ruleset (@width: 200px) { width: @width; .column { margin: @width; } } .content { .nested-ruleset(600px); } // .same-var-name2(@radius) { radius: @radius; } .same-var-name(@radius) { .same-var-name2(@radius); } #same-var-name { .same-var-name(5px); } // .var-inside () { @var: 10px; width: @var; } #var-inside { .var-inside; } .mixin-arguments (@width: 0px, ...) { border: @arguments; width: @width; } .arguments { .mixin-arguments(1px, solid, black); } .arguments2 { .mixin-arguments(); } .arguments3 { .mixin-arguments; } .mixin-arguments2 (@width, @rest...) { border: @arguments; rest: @rest; width: @width; } .arguments4 { .mixin-arguments2(0, 1, 2, 3, 4); } // Edge cases .edge-case { .mixin-arguments("{"); } // Division vs. Literal Slash .border-radius(@r: 2px/5px) { border-radius: @r; } .slash-vs-math { .border-radius(); .border-radius(5px/10px); .border-radius((3px * 2)); } // semi-colon vs comma for delimiting .mixin-takes-one(@a) { one: @a; } .mixin-takes-two(@a; @b) { one: @a; two: @b; } .comma-vs-semi-colon { .mixin-takes-two(@a : a; @b : b, c); .mixin-takes-two(@a : d, e; @b : f); .mixin-takes-one(@a: g); .mixin-takes-one(@a : h;); .mixin-takes-one(i); .mixin-takes-one(j;); .mixin-takes-two(k, l); .mixin-takes-one(m, n;); .mixin-takes-two(o, p; q); .mixin-takes-two(r, s; t;); } .mixin-conflict(@a:defA, @b:defB, @c:defC) { three: @a, @b, @c; } .mixin-conflict(@a:defA, @b:defB, @c:defC, @d:defD) { four: @a, @b, @c, @d; } #named-conflict { .mixin-conflict(11, 12, 13, @a:a); .mixin-conflict(@a:a, 21, 22, 23); } @a: 3px; .mixin-default-arg(@a: 1px, @b: @a, @c: @b) { defaults: 1px 1px 1px; defaults: 2px 2px 2px; } .test-mixin-default-arg { .mixin-default-arg(); .mixin-default-arg(2px); } .mixin-comma-default1(@color; @padding; @margin: 2, 2, 2, 2) { margin: @margin; } .selector { .mixin-comma-default1(#33acfe; 4); } .mixin-comma-default2(@margin: 2, 2, 2, 2;) { margin: @margin; } .selector2 { .mixin-comma-default2(); } .mixin-comma-default3(@margin: 2, 2, 2, 2) { margin: @margin; } .selector3 { .mixin-comma-default3(4,2,2,2); } .test-calling-one-arg-mixin(@a) { } .test-calling-one-arg-mixin(@a, @b, @rest...) { } div { .test-calling-one-arg-mixin(1); }v1.6.3~dfsg/test/less/selectors.less0000644000000000000000000000424012275460205016274 0ustar rootrooth1, h2, h3 { a, 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; &:hover { color: blue; } div & { color: green; } p & span { color: yellow; } } .foo { .bar, .baz { & .qux { display: block; } .qux & { display: inline; } .qux& { display: inline-block; } .qux & .biz { display: none; } } } .b { &.c { .a& { color: red; } } } .b { .c & { &.a { color: red; } } } .p { .foo &.bar { color: red; } } .p { .foo&.bar { color: red; } } .foo { .foo + & { background: amber; } & + & { background: amber; } } .foo, .bar { & + & { background: amber; } } .foo, .bar { a, b { & > & { background: amber; } } } .other ::fnord { color: red } .other::fnord { color: red } .other { ::bnord {color: red } &::bnord {color: red } } // selector interpolation @theme: blood; @selector: ~".@{theme}"; @{selector} { color:red; } @{selector}red { color: green; } .red { #@{theme}.@{theme}&.black { color:black; } } @num: 3; :nth-child(@{num}) { selector: interpolated; } .test { &:nth-child(odd):not(:nth-child(3)) { color: #ff0000; } } [prop], [prop=10%], [prop="value@{num}"], [prop*="val@{num}"], [|prop~="val@{num}"], [*|prop$="val@{num}"], [ns|prop^="val@{num}"], [@{num}^="val@{num}"], [@{num}=@{num}], [@{num}] { attributes: yes; } /* Large comment means chunk will be emitted after } which means chunk will begin with whitespace... blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank */ @{selector} { color: red; }v1.6.3~dfsg/test/less/css-3.less0000644000000000000000000000403412275460205015222 0ustar rootroot.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; } .upper-test { UpperCaseProperties: allowed; } @host { div { display: block; } } ::distributed(input::placeholder) { color: #b3b3b3; } .shadow ^ .dom, body ^^ .shadow { display: done; }v1.6.3~dfsg/test/less/functions.less0000644000000000000000000001141112275460205016277 0ustar rootroot#functions { @var: 10; @colors: #000, #fff; color: _color("evil red"); // #660000 width: increment(15); height: undefined("self"); border-width: add(2, 3); variable: increment(@var); background: linear-gradient(@colors); } #built-in { @r: 32; escaped: e("-Some::weird(#thing, y)"); lighten: lighten(#ff0000, 40%); darken: darken(#ff0000, 40%); saturate: saturate(#29332f, 20%); desaturate: desaturate(#203c31, 20%); greyscale: greyscale(#203c31); hsl-clamp: hsl(380, 150%, 150%); spin-p: spin(hsl(340, 50%, 50%), 40); spin-n: spin(hsl(30, 50%, 50%), -40); luma-white: luma(#fff); luma-black: luma(#000); luma-black-alpha: luma(rgba(0,0,0,0.5)); luma-red: luma(#ff0000); luma-green: luma(#00ff00); luma-blue: luma(#0000ff); luma-yellow: luma(#ffff00); luma-cyan: luma(#00ffff); luma-white-alpha: luma(rgba(255,255,255,0.5)); contrast-filter: contrast(30%); saturate-filter: saturate(5%); contrast-white: contrast(#fff); contrast-black: contrast(#000); contrast-red: contrast(#ff0000); contrast-green: contrast(#00ff00); contrast-blue: contrast(#0000ff); contrast-yellow: contrast(#ffff00); contrast-cyan: contrast(#00ffff); contrast-light: contrast(#fff, #111111, #eeeeee); contrast-dark: contrast(#000, #111111, #eeeeee); contrast-wrongorder: contrast(#fff, #eeeeee, #111111, 0.5); contrast-light-thresh: contrast(#fff, #111111, #eeeeee, 0.5); contrast-dark-thresh: contrast(#000, #111111, #eeeeee, 0.5); contrast-high-thresh: contrast(#555, #111111, #eeeeee, 0.6); contrast-low-thresh: contrast(#555, #111111, #eeeeee, 0.1); contrast-light-thresh-per: contrast(#fff, #111111, #eeeeee, 50%); contrast-dark-thresh-per: contrast(#000, #111111, #eeeeee, 50%); contrast-high-thresh-per: contrast(#555, #111111, #eeeeee, 60%); contrast-low-thresh-per: contrast(#555, #111111, #eeeeee, 10%); format: %("rgb(%d, %d, %d)", @r, 128, 64); format-string: %("hello %s", "world"); format-multiple: %("hello %s %d", "earth", 2); format-url-encode: %('red is %A', #ff0000); eformat: e(%("rgb(%d, %d, %d)", @r, 128, 64)); unitless: unit(12px); unit: unit((13px + 1px), em); hue: hue(hsl(98, 12%, 95%)); saturation: saturation(hsl(98, 12%, 95%)); lightness: lightness(hsl(98, 12%, 95%)); hsvhue: hsvhue(hsv(98, 12%, 95%)); hsvsaturation: hsvsaturation(hsv(98, 12%, 95%)); hsvvalue: hsvvalue(hsv(98, 12%, 95%)); red: red(#f00); green: green(#0f0); blue: blue(#00f); rounded: round((@r/3)); rounded-two: round((@r/3), 2); roundedpx: round((10px / 3)); roundedpx-three: round((10px / 3), 3); rounded-percentage: round(10.2%); ceil: ceil(10.1px); floor: floor(12.9px); sqrt: sqrt(25px); pi: pi(); mod: mod(13m, 11cm); // could take into account units, doesn't at the moment abs: abs(-4%); tan: tan(42deg); sin: sin(10deg); cos: cos(12); atan: atan(tan(0.1rad)); atan: convert(acos(cos(34deg)), deg); atan: convert(acos(cos(50grad)), deg); pow: pow(8px, 2); pow: pow(4, 3); pow: pow(3, 3em); min: min(0); min: min("junk", 6, 5); min: min(1pc, 3pt); max: max(1, 3); max: max(3%, 1cm, 8%, 2mm); percentage: percentage((10px / 50)); color: color("#ff0011"); tint: tint(#777777, 13); tint-full: tint(#777777, 100); tint-percent: tint(#777777, 13%); tint-negative: tint(#777777, -13%); shade: shade(#777777, 13); shade-full: shade(#777777, 100); shade-percent: shade(#777777, 13%); shade-negative: shade(#777777, -13%); fade-out: fadeOut(red, 5%); // support fadeOut and fadeout fade-in: fadein(fadeout(red, 10%), 5%); hsv: hsv(5, 50%, 30%); hsva: hsva(3, 50%, 30%, 0.2); mix: mix(#ff0000, #ffff00, 80); mix-0: mix(#ff0000, #ffff00, 0); mix-100: mix(#ff0000, #ffff00, 100); mix-weightless: mix(#ff0000, #ffff00); mixt: mix(#ff0000, transparent); .is-a { color: iscolor(#ddd); color1: iscolor(red); color2: iscolor(rgb(0, 0, 0)); color3: iscolor(transparent); keyword: iskeyword(hello); number: isnumber(32); string: isstring("hello"); pixel: ispixel(32px); percent: ispercentage(32%); em: isem(32em); cat: isunit(32cat, cat); } } #alpha { alpha: darken(hsla(25, 50%, 50%, 0.6), 10%); alpha2: alpha(rgba(3, 4, 5, 0.5)); alpha3: alpha(transparent); } #blendmodes { multiply: multiply(#f60000, #f60000); screen: screen(#f60000, #0000f6); overlay: overlay(#f60000, #0000f6); softlight: softlight(#f60000, #ffffff); hardlight: hardlight(#f60000, #0000f6); difference: difference(#f60000, #0000f6); exclusion: exclusion(#f60000, #0000f6); average: average(#f60000, #0000f6); negation: negation(#f60000, #313131); } #extract-and-length { @anon: A B C 1 2 3; extract: extract(@anon, 6) extract(@anon, 5) extract(@anon, 4) extract(@anon, 3) extract(@anon, 2) extract(@anon, 1); length: length(@anon); } v1.6.3~dfsg/test/less/operations.less0000644000000000000000000000234512275460205016460 0ustar rootroot#operations { color: (#110000 + #000011 + #001100); // #111111 height: (10px / 2px + 6px - 1px * 2); // 9px width: (2 * 4 - 5em); // 3em .spacing { height: (10px / 2px+6px-1px*2); width: (2 * 4-5em); } substraction: (20 - 10 - 5 - 5); // 0 division: (20 / 5 / 4); // 1 } @x: 4; @y: 12em; .with-variables { height: (@x + @y); // 16em width: (12 + @y); // 24em size: (5cm - @x); // 1cm } .with-functions { color: (rgb(200, 200, 200) / 2); color: (2 * hsl(0, 50%, 50%)); color: (rgb(10, 10, 10) + hsl(0, 50%, 50%)); } @z: -2; .negative { height: (2px + @z); // 0px width: (2px - @z); // 4px } .shorthands { padding: -1px 2px 0 -4px; // } .rem-dimensions { font-size: (20rem / 5 + 1.5rem); // 5.5rem } .colors { color: #123; // #112233 border-color: (#234 + #111111); // #334455 background-color: (#222222 - #fff); // #000000 .other { color: (2 * #111); // #222222 border-color: (#333333 / 3 + #111); // #222222 } } .negations { @var: 4px; variable: (-@var); // 4 variable1: (-@var + @var); // 0 variable2: (@var + -@var); // 0 variable3: (@var - -@var); // 8 variable4: (-@var - -@var); // 0 paren: (-(@var)); // -4px paren2: (-(2 + 2) * -@var); // 16 } v1.6.3~dfsg/test/less/comments.less0000644000000000000000000000263412275460205016123 0ustar rootroot/******************\ * * * 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 *//* boo again*/, //.commented_out1 //.commented_out2 //.commented_out3 .comments //end of comments1 //end of comments2 { /**/ // 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; }/* } */ v1.6.3~dfsg/test/less/legacy/0000755000000000000000000000000012275460205014645 5ustar rootrootv1.6.3~dfsg/test/less/legacy/legacy.less0000644000000000000000000000023412275460205017000 0ustar rootroot@media (-o-min-device-pixel-ratio: 2/1) { .test-math-and-units { font: ignores 0/0 rules; test-division: 4 / 2 + 5em; simple: 1px + 1px; } }v1.6.3~dfsg/test/less/parens.less0000644000000000000000000000205712275460205015565 0ustar rootroot.parens { @var: 1px; border: (@var * 2) solid black; margin: (@var * 1) (@var + 2) (4 * 4) 3; width: (6 * 6); padding: 2px (6 * 6px); } .more-parens { @var: (2 * 2); padding: (2 * @var) 4 4 (@var * 1px); width-all: ((@var * @var) * 6); width-first: ((@var * @var)) * 6; width-keep: (@var * @var) * 6; height-keep: (7 * 7) + (8 * 8); height-all: ((7 * 7) + (8 * 8)); height-parts: ((7 * 7)) + ((8 * 8)); margin-keep: (4 * (5 + 5) / 2) - (@var * 2); margin-parts: ((4 * (5 + 5) / 2)) - ((@var * 2)); margin-all: ((4 * (5 + 5) / 2) + (-(@var * 2))); border-radius-keep: 4px * (1 + 1) / @var + 3px; border-radius-parts: ((4px * (1 + 1))) / ((@var + 3px)); border-radius-all: (4px * (1 + 1) / @var + 3px); //margin: (6 * 6)px; } .negative { @var: 1; neg-var: -@var; // -1 ? neg-var-paren: -(@var); // -(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: (2px + 4px) 1em 2px 2; } .test-false-negatives { a: ~"("; } v1.6.3~dfsg/test/less/no-output.less0000644000000000000000000000001412275460205016236 0ustar rootroot.mixin() { }v1.6.3~dfsg/test/less/javascript.less0000644000000000000000000000107212275460205016437 0ustar rootroot.eval { js: `42`; js: `1 + 1`; js: `"hello world"`; js: `[1, 2, 3]`; title: `typeof process.title`; ternary: `(1 + 1 == 2 ? true : false)`; multiline: `(function(){var x = 1 + 1; return x})()`; } .scope { @foo: 42; var: `parseInt(this.foo.toJS())`; escaped: ~`2 + 5 + 'px'`; } .vars { @var: `4 + 4`; width: @var; } .escape-interpol { @world: "world"; width: ~`"hello" + " " + @{world}`; } .arrays { @ary: 1, 2, 3; @ary2: 1 2 3; ary: `@{ary}.join(', ')`; ary1: `@{ary2}.join(', ')`; } v1.6.3~dfsg/test/less/whitespace.less0000644000000000000000000000104012275460205016420 0ustar rootroot .whitespace { color: white; } .whitespace { color: white; } .whitespace { color: white; } .whitespace{color:white;} .whitespace { color : white ; } .white, .space, .mania { color: white; } .no-semi-column { color: white } .no-semi-column { color: white; white-space: pre } .no-semi-column {border: 2px solid white} .newlines { background: the, great, wall; border: 2px solid black; } .empty { } .sel .newline_ws .tab_ws { color: white; background-position: 45 -23; } v1.6.3~dfsg/test/less/empty.less0000644000000000000000000000000012275460205015415 0ustar rootrootv1.6.3~dfsg/test/less/extend-chaining.less0000644000000000000000000000244312275460205017341 0ustar rootroot//very simple chaining .a { color: black; } .b:extend(.a) {} .c:extend(.b) {} //very simple chaining, ordering not important .d:extend(.e) {} .e:extend(.f) {} .f { color: black; } //extend with all .g.h { color: black; } .i.j:extend(.g all) { color: white; } .k:extend(.i all) {} //extend multi-chaining .l { color: black; } .m:extend(.l){} .n:extend(.m){} .o:extend(.n){} .p:extend(.o){} .q:extend(.p){} .r:extend(.q){} .s:extend(.r){} .t:extend(.s){} // self referencing is ignored .u {color: black;} .v.u.v:extend(.u all){} // circular reference because the new extend product will match the existing extend .w:extend(.w) {color: black;} .v.w.v:extend(.w all){} // classic circular references .x:extend(.z) { color: x; } .y:extend(.x) { color: y; } .z:extend(.y) { color: z; } //very simple chaining, but with the extend inside the ruleset .va { color: black; } .vb { &:extend(.va); color: white; } .vc { &:extend(.vb); } // media queries - dont extend outside, do extend inside @media tv { .ma:extend(.a,.b,.c,.d,.e,.f,.g,.h,.i,.j,.k,.l,.m,.n,.o,.p,.q,.r,.s,.t,.u,.v,.w,.x,.y,.z,.md) { color: black; } .md { color: white; } @media plasma { .me, .mf { &:extend(.mb,.md); background: red; } } } .mb:extend(.ma) {}; .mc:extend(.mb) {};v1.6.3~dfsg/test/less/media.less0000644000000000000000000000650712275460205015360 0ustar rootroot // For now, variables can't be declared inside @media blocks. @var: 42; @media print { .class { color: blue; .sub { width: @var; } } .top, header > h1 { color: (#222 * 2); } } @media screen { @base: 8; body { max-width: (@base * 60); } } @ratio_large: 16; @ratio_small: 9; @media all and (device-aspect-ratio: @ratio_large / @ratio_small) { body { max-width: 800px; } } @media all and (orientation:portrait) { aside { float: none; } } @media handheld and (min-width: @var), screen and (min-width: 20em) { body { max-width: 480px; } } body { @media print { padding: 20px; header { background-color: red; } @media (orientation:landscape) { margin-left: 20px; } } } @media screen { .sidebar { width: 300px; @media (orientation: landscape) { width: 500px; } } } @media a { .first { @media b { .second { .third { width: 300px; @media c { width: 500px; } } .fourth { width: 3; } } } } } body { @media a, b and c { width: 95%; @media x, y { width: 100%; } } } .mediaMixin(@fallback: 200px) { background: black; @media handheld { background: white; @media (max-width: @fallback) { background: red; } } } .a { .mediaMixin(100px); } .b { .mediaMixin(); } @smartphone: ~"only screen and (max-width: 200px)"; @media @smartphone { body { 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; } } .bg() { background: red; @media (max-width: 500px) { background: green; } } body { .bg(); } @bpMedium: 1000px; @media (max-width: @bpMedium) { body { .bg(); background: blue; } } @media (max-width: 1200px) { /* a comment */ @media (max-width: 900px) { body { font-size: 11px; } } } .nav-justified { @media (min-width: 480px) { > li { display: table-cell; } } } .menu { @media (min-width: 768px) { .nav-justified(); } } @all: ~"all"; @tv: ~"tv"; @media @all and @tv { .all-and-tv-variables { var: all-and-tv; } }v1.6.3~dfsg/test/less/mixins-pattern.less0000644000000000000000000000204512275460205017254 0ustar rootroot.mixin (...) { variadic: true; } .mixin () { zero: 0; } .mixin (@a: 1px) { one: 1; } .mixin (@a) { one-req: 1; } .mixin (@a: 1px, @b: 2px) { two: 2; } .mixin (@a, @b, @c) { three-req: 3; } .mixin (@a: 1px, @b: 2px, @c: 3px) { three: 3; } .zero { .mixin(); } .one { .mixin(1); } .two { .mixin(1, 2); } .three { .mixin(1, 2, 3); } // .mixout ('left') { left: 1; } .mixout ('right') { right: 1; } .left { .mixout('left'); } .right { .mixout('right'); } // .border (@side, @width) { color: black; .border-side(@side, @width); } .border-side (left, @w) { border-left: @w; } .border-side (right, @w) { border-right: @w; } .border-right { .border(right, 4px); } .border-left { .border(left, 4px); } // .border-radius (@r) { both: (@r * 10); } .border-radius (@r, left) { left: @r; } .border-radius (@r, right) { right: @r; } .only-right { .border-radius(33, right); } .only-left { .border-radius(33, left); } .left-right { .border-radius(33); } v1.6.3~dfsg/test/less/css.less0000644000000000000000000000254612275460205015070 0ustar rootroot@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; } v1.6.3~dfsg/test/less/mixins-closure.less0000644000000000000000000000044512275460205017255 0ustar rootroot.scope { @var: 99px; .mixin () { width: @var; } } .class { .scope > .mixin; } .overwrite { @var: 0px; .scope > .mixin; } .nested { @var: 5px; .mixin () { width: @var; } .class { @var: 10px; .mixin; } } v1.6.3~dfsg/test/less/charsets.less0000644000000000000000000000007012275460205016102 0ustar rootroot@charset "UTF-8"; @import "import/import-charset-test";v1.6.3~dfsg/test/less/url-args/0000755000000000000000000000000012275460205015135 5ustar rootrootv1.6.3~dfsg/test/less/url-args/urls.less0000644000000000000000000000373712275460205017024 0ustar rootroot@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: #fff 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); background-image: url("http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700"); } #svg-data-uri { background: transparent url('data:image/svg+xml, '); } .comma-delimited { background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg); } .values { @a: 'Trebuchet'; url: url(@a); } @import "../import/imports/font"; #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'); } #svg-functions { background-image: svg-gradient(to bottom, black, white); background-image: svg-gradient(to bottom, black, orange 3%, white); @green_5: green 5%; @orange_percentage: 3%; @orange_color: orange; background-image: svg-gradient(to bottom, (mix(black, white) + #444) 1%, @orange_color @orange_percentage, ((@green_5)), white 95%); } #data-uri-with-spaces { background-image: url( data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==); background-image: url( ' data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9=='); } v1.6.3~dfsg/test/less/import-inline.less0000644000000000000000000000017112275460205017056 0ustar rootroot@import (inline) url("import/import-test-d.css") (min-width:600px); @import (inline, css) url("import/invalid-css.less");v1.6.3~dfsg/test/less/urls.less0000644000000000000000000000406212275460205015260 0ustar rootroot@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: #fff 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); background-image: url("http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700"); } #svg-data-uri { background: transparent url('data:image/svg+xml, '); } .comma-delimited { background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg); } .values { @a: 'Trebuchet'; url: url(@a); } @import "import/import-and-relative-paths-test"; #relative-url-import { .unquoted-relative-path-bg; .quoted-relative-path-border-image; } #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'); } .add_an_import(@file_to_import) { @import "@{file_to_import}"; } .add_an_import("file.css"); #svg-functions { background-image: svg-gradient(to bottom, black, white); background-image: svg-gradient(to bottom, black, orange 3%, white); @green_5: green 5%; @orange_percentage: 3%; @orange_color: orange; background-image: svg-gradient(to bottom, (mix(black, white) + #444) 1%, @orange_color @orange_percentage, ((@green_5)), white 95%); } v1.6.3~dfsg/test/less/import.less0000644000000000000000000000116112275460205015602 0ustar rootroot@import url(http://fonts.googleapis.com/css?family=Open+Sans); @import url(/absolute/something.css) screen and (color) and (max-width: 600px); @var: 100px; @import url("//ha.com/file.css") (min-width:@var); #import-test { .mixin; width: 10px; height: (@a + 10%); } @import "import/import-test-e" screen and (max-width: 600px); @import url("import/import-test-a.less"); @import (less, multiple) "import/import-test-d.css" screen and (max-width: 601px); @import (multiple) "import/import-test-e" screen and (max-width: 602px); @import (less, multiple) url("import/import-test-d.css") screen and (max-width: 603px);v1.6.3~dfsg/test/less/import-interpolation.less0000644000000000000000000000023312275460205020466 0ustar rootroot@my_theme: "test"; @import "import/import-@{my_theme}-e.less"; @import "import/import-@{in}@{terpolation}.less"; @in: "in"; @terpolation: "terpolation";v1.6.3~dfsg/test/less/mixins-guards.less0000644000000000000000000000742612275460205017074 0ustar rootroot // Stacking, functions.. .light (@a) when (lightness(@a) > 50%) { color: white; } .light (@a) when (lightness(@a) < 50%) { color: black; } .light (@a) { margin: 1px; } .light1 { .light(#ddd) } .light2 { .light(#444) } // Arguments against each other .max (@a, @b) when (@a > @b) { width: @a; } .max (@a, @b) when (@a < @b) { width: @b; } .max1 { .max(3, 6) } .max2 { .max(8, 1) } // Globals inside guards @g: auto; .glob (@a) when (@a = @g) { margin: @a @g; } .glob1 { .glob(auto) } // Other operators .ops (@a) when (@a >= 0) { height: gt-or-eq; } .ops (@a) when (@a =< 0) { height: lt-or-eq; } .ops (@a) when (@a <= 0) { height: lt-or-eq-alias; } .ops (@a) when not(@a = 0) { height: not-eq; } .ops1 { .ops(0) } .ops2 { .ops(1) } .ops3 { .ops(-1) } // Scope and default values @a: auto; .default (@a: inherit) when (@a = inherit) { content: default; } .default1 { .default } // true & false keywords .test (@a) when (@a) { content: "true."; } .test (@a) when not (@a) { content: "false."; } .test1 { .test(true) } .test2 { .test(false) } .test3 { .test(1) } .test4 { .test(boo) } .test5 { .test("true") } // Boolean expressions .bool () when (true) and (false) { content: true and false } // FALSE .bool () when (true) and (true) { content: true and true } // TRUE .bool () when (true) { content: true } // TRUE .bool () when (false) and (false) { content: true } // FALSE .bool () when (false), (true) { content: false, true } // TRUE .bool () when (false) and (true) and (true), (true) { content: false and true and true, true } // TRUE .bool () when (true) and (true) and (false), (false) { content: true and true and false, false } // FALSE .bool () when (false), (true) and (true) { content: false, true and true } // TRUE .bool () when (false), (false), (true) { content: false, false, true } // TRUE .bool () when (false), (false) and (true), (false) { content: false, false and true, false } // FALSE .bool () when (false), (true) and (true) and (true), (false) { content: false, true and true and true, false } // TRUE .bool () when not (false) { content: not false } .bool () when not (true) and not (false) { content: not true and not false } .bool () when not (true) and not (true) { content: not true and not true } .bool () when not (false) and (false), not (false) { content: not false and false, not false } .bool1 { .bool } .equality-unit-test(@num) when (@num = 1%) { test: fail; } .equality-unit-test(@num) when (@num = 2) { test: pass; } .equality-units { .equality-unit-test(1px); .equality-unit-test(2px); } .colorguard(@col) when (@col = red) { content: is @col; } .colorguard(@col) when not (blue = @col) { content: is not blue its @col; } .colorguard(@col) {} .colorguardtest { .colorguard(red); .colorguard(blue); .colorguard(purple); } .stringguard(@str) when (@str = "theme1") { content: is theme1; } .stringguard(@str) when not ("theme2" = @str) { content: is not theme2; } .stringguard(@str) when (~"theme1" = @str) { content: is theme1 no quotes; } .stringguard(@str) {} .stringguardtest { .stringguard("theme1"); .stringguard("theme2"); .stringguard(theme1); } .mixin(...) { catch:all; } .mixin(@var) when (@var=4) { declare: 4; } .mixin(@var) when (@var=4px) { declare: 4px; } #tryNumberPx { .mixin(4px); } .lock-mixin(@a) { .inner-locked-mixin(@x: @a) when (@a = 1) { a: @a; x: @x; } } .call-lock-mixin { .lock-mixin(1); .call-inner-lock-mixin { .inner-locked-mixin(); } }v1.6.3~dfsg/test/less/globalVars/0000755000000000000000000000000012275460205015475 5ustar rootrootv1.6.3~dfsg/test/less/globalVars/extended.less0000644000000000000000000000044312275460205020166 0ustar rootroot#header { color: (@base-color * 3); border-left: @the-border; border-right: (@the-border * 2); } #footer { color: (@base-color + #003300); border-color: @red; } @red: desaturate(red, 10%); // less file overrides passed in color <- note line comment on last line to check it is okayv1.6.3~dfsg/test/less/globalVars/simple.less0000644000000000000000000000003612275460205017655 0ustar rootroot.class { color: @my-color; }v1.6.3~dfsg/test/less/globalVars/extended.json0000644000000000000000000000011312275460205020163 0ustar rootroot{ "the-border": "1px", "base-color": "#111", "red": "#842210" }v1.6.3~dfsg/test/less/globalVars/simple.json0000644000000000000000000000002612275460205017657 0ustar rootroot{ "my-color": "red" }v1.6.3~dfsg/test/less/mixins-interpolated.less0000644000000000000000000000133312275460205020270 0ustar rootroot @a1: foo; @a2: ~".foo"; @a4: ~"#foo"; .@{a1} { a: 1; } @{a2} { a: 2; } #@{a1} { a: 3; } @{a4} { a: 4; } mi-test-a { .foo; #foo; } .b .bb { &.@{a1}-xxx .yyy-@{a1}@{a4} { & @{a2}.bbb { b: 1; } } } mi-test-b { .b.bb.foo-xxx.yyy-foo#foo.foo.bbb; } @c1: @a1; @c2: bar; @c3: baz; #@{c1}-foo { > .@{c2} { .@{c3} { c: c; } } } mi-test-c { &-1 {#foo-foo;} &-2 {#foo-foo > .bar;} &-3 {#foo-foo > .bar.baz;} } .Person(@name, @gender_) { .@{name} { @gender: @gender_; .sayGender() { gender: @gender; } } } mi-test-d { .Person(person, "Male"); .person.sayGender(); } v1.6.3~dfsg/test/less/import-once.less0000644000000000000000000000037712275460205016534 0ustar rootroot@import "import/import-once-test-c"; @import "import/import-once-test-c"; @import "import/import-once-test-c.less"; @import "import/deeper/import-once-test-a"; @import (multiple) "import/import-test-f.less"; @import (multiple) "import/import-test-f.less";v1.6.3~dfsg/test/browser/0000755000000000000000000000000012275460205014116 5ustar rootrootv1.6.3~dfsg/test/browser/runner-global-vars-spec.js0000644000000000000000000000011712275460205021123 0ustar rootrootdescribe("less.js global vars", function() { testLessEqualsInDocument(); }); v1.6.3~dfsg/test/browser/runner-no-js-errors-spec.js0000644000000000000000000000014412275460205021252 0ustar rootrootdescribe("less.js javascript disabled error tests", function() { testLessErrorsInDocument(); }); v1.6.3~dfsg/test/browser/runner-relative-urls-spec.js0000644000000000000000000000014312275460205021507 0ustar rootrootdescribe("less.js browser test - relative url's", function() { testLessEqualsInDocument(); }); v1.6.3~dfsg/test/browser/runner-production-spec.js0000644000000000000000000000024112275460205021076 0ustar rootrootdescribe("less.js production behaviour", function() { it("doesn't log any messages", function() { expect(logMessages.length).toEqual(0); }); }); v1.6.3~dfsg/test/browser/common.js0000644000000000000000000001362412275460205015752 0ustar rootroot/* record log messages for testing */ // var logAllIds = function() { // var allTags = document.head.getElementsByTagName('style'); // var ids = []; // for (var tg = 0; tg < allTags.length; tg++) { // var tag = allTags[tg]; // if (tag.id) { // console.log(tag.id); // } // } // }; var logMessages = [], realConsoleLog = console.log; console.log = function(msg) { logMessages.push(msg); realConsoleLog.call(console, msg); }; var testLessEqualsInDocument = function() { testLessInDocument(testSheet); }; var testLessErrorsInDocument = function(isConsole) { testLessInDocument(isConsole ? testErrorSheetConsole : 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, lessOutputObj, lessOutput, expectedOutputHref = document.getElementById(expectedOutputId).href, expectedOutput = loadFile(expectedOutputHref); // Browser spec generates less on the fly, so we need to loose control waitsFor(function() { lessOutputObj = document.getElementById(lessOutputId); // the type condition is necessary because of inline browser tests return lessOutputObj !== null && lessOutputObj.type === "text/css"; }, "generation of " + lessOutputId + "", 700); runs(function() { lessOutput = lessOutputObj.innerText || lessOutputObj.innerHTML; }); waitsFor(function() { return expectedOutput.loaded; }, "failed to load expected outout", 10000); runs(function() { // use sheet to do testing expect(expectedOutput.text).toEqual(lessOutput); }); }); }; //TODO: do it cleaner - the same way as in css function extractId(href) { return href.replace(/^[a-z-]+:\/+?[^\/]+/, '') // Remove protocol & domain .replace(/^\//, '') // Remove root / .replace(/\.[a-zA-Z]+$/, '') // Remove simple extension .replace(/[^\.\w-]+/g, '-') // Replace illegal characters .replace(/\./g, ':'); // Replace dots with colons(for valid id) } var testErrorSheet = function(sheet) { it(sheet.id + " should match an error", function() { var lessHref = sheet.href, id = "less-error-message:" + extractId(lessHref), // id = sheet.id.replace(/^original-less:/, "less-error-message:"), errorHref = lessHref.replace(/.less$/, ".txt"), errorFile = loadFile(errorHref), actualErrorElement, actualErrorMsg; // Less.js sets 10ms timer in order to add error message on top of page. waitsFor(function() { actualErrorElement = document.getElementById(id); return actualErrorElement !== null; }, "error message was not generated", 70); runs(function() { 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/test/less/errors/") .replace("{404status}", " (404)"); expect(errorTxt).toEqual(actualErrorMsg); if (errorTxt == actualErrorMsg) { actualErrorElement.style.display = "none"; } }); }); }; var testErrorSheetConsole = 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 = logMessages[logMessages.length - 1]; describe("the error", function() { expect(actualErrorElement).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/browser/less/") .replace("{404status}", " (404)") .trim(); expect(errorTxt).toEqual(actualErrorMsg); }); }); }; 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); } })();v1.6.3~dfsg/test/browser/runner-main-options.js0000644000000000000000000000052512275460205020402 0ustar rootrootvar less = {}; less.strictMath = true; 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"); } } };v1.6.3~dfsg/test/browser/runner-modify-vars-spec.js0000644000000000000000000000226412275460205021157 0ustar rootrootvar alreadyRun = false; describe("less.js modify vars", function() { beforeEach(function() { // simulating "setUp" or "beforeAll" method var lessOutputObj; if (alreadyRun) return; alreadyRun = true; // wait until the sheet is compiled first time waitsFor(function() { lessOutputObj = document.getElementById("less:test-less-simple"); return lessOutputObj !== null; }, "first generation of less:test-less-simple", 7000); // modify variables runs(function() { lessOutputObj.type = "not compiled yet"; less.modifyVars({ var1: "green", var2: "purple", scale: 20 }); }); // wait until variables are modified waitsFor(function() { lessOutputObj = document.getElementById("less:test-less-simple"); return lessOutputObj !== null && lessOutputObj.type === "text/css"; }, "second generation of less:test-less-simple", 7000); }); testLessEqualsInDocument(); it("Should log only 2 XHR requests", function() { var xhrLogMessages = logMessages.filter(function(item) { return (/XHR: Getting '/).test(item); }); expect(xhrLogMessages.length).toEqual(2); }); });v1.6.3~dfsg/test/browser/runner-rootpath-relative-options.js0000644000000000000000000000014712275460205023127 0ustar rootrootvar less = {}; less.rootpath = "https://www.github.com/cloudhead/less.js/"; less.relativeUrls = true; v1.6.3~dfsg/test/browser/runner-errors-spec.js0000644000000000000000000000012012275460205020220 0ustar rootrootdescribe("less.js error tests", function() { testLessErrorsInDocument(); }); v1.6.3~dfsg/test/browser/runner-legacy-options.js0000644000000000000000000000010312275460205020712 0ustar rootrootvar less = {}; less.strictMath = false; less.strictUnits = false; v1.6.3~dfsg/test/browser/runner-rootpath-spec.js0000644000000000000000000000014312275460205020551 0ustar rootrootdescribe("less.js browser test - rootpath url's", function() { testLessEqualsInDocument(); }); v1.6.3~dfsg/test/browser/runner-modify-vars-options.js0000644000000000000000000000004212275460205021710 0ustar rootroot/* exported less */ var less = {};v1.6.3~dfsg/test/browser/runner-console-errors.js0000644000000000000000000000020712275460205020736 0ustar rootrootless.errorReporting = 'console'; describe("less.js error reporting console test", function() { testLessErrorsInDocument(true); });v1.6.3~dfsg/test/browser/less/0000755000000000000000000000000012275460205015064 5ustar rootrootv1.6.3~dfsg/test/browser/less/modify-vars/0000755000000000000000000000000012275460205017324 5ustar rootrootv1.6.3~dfsg/test/browser/less/modify-vars/simple.less0000644000000000000000000000015712275460205021510 0ustar rootroot@import "imports/simple2"; @var1: red; @scale: 10; .test { color1: @var1; color2: @var2; scalar: @scale }v1.6.3~dfsg/test/browser/less/modify-vars/imports/0000755000000000000000000000000012275460205021021 5ustar rootrootv1.6.3~dfsg/test/browser/less/modify-vars/imports/simple2.less0000644000000000000000000000006412275460205023264 0ustar rootroot@var2: blue; .testisimported { color: gainsboro; }v1.6.3~dfsg/test/browser/less/console-errors/0000755000000000000000000000000012275460205020040 5ustar rootrootv1.6.3~dfsg/test/browser/less/console-errors/test-error.less0000644000000000000000000000003212275460205023031 0ustar rootroot.a { prop: (3 / #fff); }v1.6.3~dfsg/test/browser/less/console-errors/test-error.txt0000644000000000000000000000024012275460205022703 0ustar rootrootless: OperationError: Can't substract or divide a color from a number in {pathhref}console-errors/test-error.less on line null, column 0: 1 prop: (3 / #fff); v1.6.3~dfsg/test/browser/less/global-vars/0000755000000000000000000000000012275460205017275 5ustar rootrootv1.6.3~dfsg/test/browser/less/global-vars/simple.less0000644000000000000000000000004012275460205021450 0ustar rootroot.test { color: @global-var; } v1.6.3~dfsg/test/browser/less/imports/0000755000000000000000000000000012275460205016561 5ustar rootrootv1.6.3~dfsg/test/browser/less/imports/urls2.less0000644000000000000000000000007712275460205020524 0ustar rootroot@import "modify-again.css"; .modify { my-url: url("b.png"); }v1.6.3~dfsg/test/browser/less/imports/urls.less0000644000000000000000000000007612275460205020441 0ustar rootroot@import "modify-this.css"; .modify { my-url: url("a.png"); }v1.6.3~dfsg/test/browser/less/relative-urls/0000755000000000000000000000000012275460205017662 5ustar rootrootv1.6.3~dfsg/test/browser/less/relative-urls/urls.less0000644000000000000000000000204212275460205021535 0ustar rootroot@import ".././imports/urls.less"; @import "http://localhost:8081/test/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, '); } .comma-delimited { background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg); } .values { @a: 'Trebuchet'; url: url(@a); } v1.6.3~dfsg/test/browser/less/rootpath-relative/0000755000000000000000000000000012275460205020535 5ustar rootrootv1.6.3~dfsg/test/browser/less/rootpath-relative/urls.less0000644000000000000000000000204012275460205022406 0ustar rootroot@import "../imports/urls.less"; @import "http://localhost:8081/test/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, '); } .comma-delimited { background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg); } .values { @a: 'Trebuchet'; url: url(@a); } v1.6.3~dfsg/test/browser/less/rootpath/0000755000000000000000000000000012275460205016724 5ustar rootrootv1.6.3~dfsg/test/browser/less/rootpath/urls.less0000644000000000000000000000204012275460205020575 0ustar rootroot@import "../imports/urls.less"; @import "http://localhost:8081/test/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, '); } .comma-delimited { background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg); } .values { @a: 'Trebuchet'; url: url(@a); } v1.6.3~dfsg/test/browser/less/urls.less0000644000000000000000000000331212275460205016740 0ustar rootroot@import "imports/urls.less"; @import "http://localhost:8081/test/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, '); } .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'); } #svg-functions { background-image: svg-gradient(to bottom, black, white); background-image: svg-gradient(to bottom, black, orange 3%, white); @green_5: green 5%; @orange_percentage: 3%; @orange_color: orange; background-image: svg-gradient(to bottom, (mix(black, white) + #444) 1%, @orange_color @orange_percentage, ((@green_5)), white 95%); } v1.6.3~dfsg/test/browser/jasmine-html.js0000644000000000000000000005043512275460205017053 0ustar rootrootjasmine.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; }; v1.6.3~dfsg/test/browser/runner-errors-options.js0000644000000000000000000000007512275460205020772 0ustar rootrootvar less = { strictUnits: true, strictMath: true }; v1.6.3~dfsg/test/browser/jasmine.js0000644000000000000000000021235412275460205016111 0ustar rootrootvar isCommonJS = typeof window == "undefined" && typeof exports == "object"; /** * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework. * * @namespace */ var jasmine = {}; if (isCommonJS) exports.jasmine = jasmine; /** * @private */ jasmine.unimplementedMethod_ = function() { throw new Error("unimplemented method"); }; /** * Use jasmine.undefined instead of undefined, since undefined is just * a plain old variable and may be redefined by somebody else. * * @private */ jasmine.undefined = jasmine.___undefined___; /** * Show diagnostic messages in the console if set to true * */ jasmine.VERBOSE = false; /** * Default interval in milliseconds for event loop yields (e.g. to allow network activity or to refresh the screen with the HTML-based runner). Small values here may result in slow test running. Zero means no updates until all tests have completed. * */ jasmine.DEFAULT_UPDATE_INTERVAL = 250; /** * Maximum levels of nesting that will be included when an object is pretty-printed */ jasmine.MAX_PRETTY_PRINT_DEPTH = 40; /** * Default timeout interval in milliseconds for waitsFor() blocks. */ jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000; /** * By default exceptions thrown in the context of a test are caught by jasmine so that it can run the remaining tests in the suite. * Set to false to let the exception bubble up in the browser. * */ jasmine.CATCH_EXCEPTIONS = true; jasmine.getGlobal = function() { function getGlobal() { return this; } return getGlobal(); }; /** * Allows for bound functions to be compared. Internal use only. * * @ignore * @private * @param base {Object} bound 'this' for the function * @param name {Function} function to find */ jasmine.bindOriginal_ = function(base, name) { var original = base[name]; if (original.apply) { return function() { return original.apply(base, arguments); }; } else { // IE support return jasmine.getGlobal()[name]; } }; jasmine.setTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'setTimeout'); jasmine.clearTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearTimeout'); jasmine.setInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'setInterval'); jasmine.clearInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearInterval'); jasmine.MessageResult = function(values) { this.type = 'log'; this.values = values; this.trace = new Error(); // todo: test better }; jasmine.MessageResult.prototype.toString = function() { var text = ""; for (var i = 0; i < this.values.length; i++) { if (i > 0) text += " "; if (jasmine.isString_(this.values[i])) { text += this.values[i]; } else { text += jasmine.pp(this.values[i]); } } return text; }; jasmine.ExpectationResult = function(params) { this.type = 'expect'; this.matcherName = params.matcherName; this.passed_ = params.passed; this.expected = params.expected; this.actual = params.actual; this.message = this.passed_ ? 'Passed.' : params.message; var trace = (params.trace || new Error(this.message)); this.trace = this.passed_ ? '' : trace; }; jasmine.ExpectationResult.prototype.toString = function () { return this.message; }; jasmine.ExpectationResult.prototype.passed = function () { return this.passed_; }; /** * Getter for the Jasmine environment. Ensures one gets created */ jasmine.getEnv = function() { var env = jasmine.currentEnv_ = jasmine.currentEnv_ || new jasmine.Env(); return env; }; /** * @ignore * @private * @param value * @returns {Boolean} */ jasmine.isArray_ = function(value) { return jasmine.isA_("Array", value); }; /** * @ignore * @private * @param value * @returns {Boolean} */ jasmine.isString_ = function(value) { return jasmine.isA_("String", value); }; /** * @ignore * @private * @param value * @returns {Boolean} */ jasmine.isNumber_ = function(value) { return jasmine.isA_("Number", value); }; /** * @ignore * @private * @param {String} typeName * @param value * @returns {Boolean} */ jasmine.isA_ = function(typeName, value) { return Object.prototype.toString.apply(value) === '[object ' + typeName + ']'; }; /** * Pretty printer for expecations. Takes any object and turns it into a human-readable string. * * @param value {Object} an object to be outputted * @returns {String} */ jasmine.pp = function(value) { var stringPrettyPrinter = new jasmine.StringPrettyPrinter(); stringPrettyPrinter.format(value); return stringPrettyPrinter.string; }; /** * Returns true if the object is a DOM Node. * * @param {Object} obj object to check * @returns {Boolean} */ jasmine.isDomNode = function(obj) { return obj.nodeType > 0; }; /** * Returns a matchable 'generic' object of the class type. For use in expecations of type when values don't matter. * * @example * // don't care about which function is passed in, as long as it's a function * expect(mySpy).toHaveBeenCalledWith(jasmine.any(Function)); * * @param {Class} clazz * @returns matchable object of the type clazz */ jasmine.any = function(clazz) { return new jasmine.Matchers.Any(clazz); }; /** * Returns a matchable subset of a JSON object. For use in expectations when you don't care about all of the * attributes on the object. * * @example * // don't care about any other attributes than foo. * expect(mySpy).toHaveBeenCalledWith(jasmine.objectContaining({foo: "bar"}); * * @param sample {Object} sample * @returns matchable object for the sample */ jasmine.objectContaining = function (sample) { return new jasmine.Matchers.ObjectContaining(sample); }; /** * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks. * * Spies should be created in test setup, before expectations. They can then be checked, using the standard Jasmine * expectation syntax. Spies can be checked if they were called or not and what the calling params were. * * A Spy has the following fields: wasCalled, callCount, mostRecentCall, and argsForCall (see docs). * * Spies are torn down at the end of every spec. * * Note: Do not call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj. * * @example * // a stub * var myStub = jasmine.createSpy('myStub'); // can be used anywhere * * // spy example * var foo = { * not: function(bool) { return !bool; } * } * * // actual foo.not will not be called, execution stops * spyOn(foo, 'not'); // foo.not spied upon, execution will continue to implementation * spyOn(foo, 'not').andCallThrough(); * * // fake example * var foo = { * not: function(bool) { return !bool; } * } * * // foo.not(val) will return val * spyOn(foo, 'not').andCallFake(function(value) {return value;}); * * // mock example * foo.not(7 == 7); * expect(foo.not).toHaveBeenCalled(); * expect(foo.not).toHaveBeenCalledWith(true); * * @constructor * @see spyOn, jasmine.createSpy, jasmine.createSpyObj * @param {String} name */ jasmine.Spy = function(name) { /** * The name of the spy, if provided. */ this.identity = name || 'unknown'; /** * Is this Object a spy? */ this.isSpy = true; /** * The actual function this spy stubs. */ this.plan = function() { }; /** * Tracking of the most recent call to the spy. * @example * var mySpy = jasmine.createSpy('foo'); * mySpy(1, 2); * mySpy.mostRecentCall.args = [1, 2]; */ this.mostRecentCall = {}; /** * Holds arguments for each call to the spy, indexed by call count * @example * var mySpy = jasmine.createSpy('foo'); * mySpy(1, 2); * mySpy(7, 8); * mySpy.mostRecentCall.args = [7, 8]; * mySpy.argsForCall[0] = [1, 2]; * mySpy.argsForCall[1] = [7, 8]; */ this.argsForCall = []; this.calls = []; }; /** * Tells a spy to call through to the actual implemenatation. * * @example * var foo = { * bar: function() { // do some stuff } * } * * // defining a spy on an existing property: foo.bar * spyOn(foo, 'bar').andCallThrough(); */ jasmine.Spy.prototype.andCallThrough = function() { this.plan = this.originalValue; return this; }; /** * For setting the return value of a spy. * * @example * // defining a spy from scratch: foo() returns 'baz' * var foo = jasmine.createSpy('spy on foo').andReturn('baz'); * * // defining a spy on an existing property: foo.bar() returns 'baz' * spyOn(foo, 'bar').andReturn('baz'); * * @param {Object} value */ jasmine.Spy.prototype.andReturn = function(value) { this.plan = function() { return value; }; return this; }; /** * For throwing an exception when a spy is called. * * @example * // defining a spy from scratch: foo() throws an exception w/ message 'ouch' * var foo = jasmine.createSpy('spy on foo').andThrow('baz'); * * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch' * spyOn(foo, 'bar').andThrow('baz'); * * @param {String} exceptionMsg */ jasmine.Spy.prototype.andThrow = function(exceptionMsg) { this.plan = function() { throw exceptionMsg; }; return this; }; /** * Calls an alternate implementation when a spy is called. * * @example * var baz = function() { * // do some stuff, return something * } * // defining a spy from scratch: foo() calls the function baz * var foo = jasmine.createSpy('spy on foo').andCall(baz); * * // defining a spy on an existing property: foo.bar() calls an anonymnous function * spyOn(foo, 'bar').andCall(function() { return 'baz';} ); * * @param {Function} fakeFunc */ jasmine.Spy.prototype.andCallFake = function(fakeFunc) { this.plan = fakeFunc; return this; }; /** * Resets all of a spy's the tracking variables so that it can be used again. * * @example * spyOn(foo, 'bar'); * * foo.bar(); * * expect(foo.bar.callCount).toEqual(1); * * foo.bar.reset(); * * expect(foo.bar.callCount).toEqual(0); */ jasmine.Spy.prototype.reset = function() { this.wasCalled = false; this.callCount = 0; this.argsForCall = []; this.calls = []; this.mostRecentCall = {}; }; jasmine.createSpy = function(name) { var spyObj = function() { spyObj.wasCalled = true; spyObj.callCount++; var args = jasmine.util.argsToArray(arguments); spyObj.mostRecentCall.object = this; spyObj.mostRecentCall.args = args; spyObj.argsForCall.push(args); spyObj.calls.push({object: this, args: args}); return spyObj.plan.apply(this, arguments); }; var spy = new jasmine.Spy(name); for (var prop in spy) { spyObj[prop] = spy[prop]; } spyObj.reset(); return spyObj; }; /** * Determines whether an object is a spy. * * @param {jasmine.Spy|Object} putativeSpy * @returns {Boolean} */ jasmine.isSpy = function(putativeSpy) { return putativeSpy && putativeSpy.isSpy; }; /** * Creates a more complicated spy: an Object that has every property a function that is a spy. Used for stubbing something * large in one call. * * @param {String} baseName name of spy class * @param {Array} methodNames array of names of methods to make spies */ jasmine.createSpyObj = function(baseName, methodNames) { if (!jasmine.isArray_(methodNames) || methodNames.length === 0) { throw new Error('createSpyObj requires a non-empty array of method names to create spies for'); } var obj = {}; for (var i = 0; i < methodNames.length; i++) { obj[methodNames[i]] = jasmine.createSpy(baseName + '.' + methodNames[i]); } return obj; }; /** * All parameters are pretty-printed and concatenated together, then written to the current spec's output. * * Be careful not to leave calls to jasmine.log in production code. */ jasmine.log = function() { var spec = jasmine.getEnv().currentSpec; spec.log.apply(spec, arguments); }; /** * Function that installs a spy on an existing object's method name. Used within a Spec to create a spy. * * @example * // spy example * var foo = { * not: function(bool) { return !bool; } * } * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops * * @see jasmine.createSpy * @param obj * @param methodName * @return {jasmine.Spy} a Jasmine spy that can be chained with all spy methods */ var spyOn = function(obj, methodName) { return jasmine.getEnv().currentSpec.spyOn(obj, methodName); }; if (isCommonJS) exports.spyOn = spyOn; /** * Creates a Jasmine spec that will be added to the current suite. * * // TODO: pending tests * * @example * it('should be true', function() { * expect(true).toEqual(true); * }); * * @param {String} desc description of this specification * @param {Function} func defines the preconditions and expectations of the spec */ var it = function(desc, func) { return jasmine.getEnv().it(desc, func); }; if (isCommonJS) exports.it = it; /** * Creates a disabled Jasmine spec. * * A convenience method that allows existing specs to be disabled temporarily during development. * * @param {String} desc description of this specification * @param {Function} func defines the preconditions and expectations of the spec */ var xit = function(desc, func) { return jasmine.getEnv().xit(desc, func); }; if (isCommonJS) exports.xit = xit; /** * Starts a chain for a Jasmine expectation. * * It is passed an Object that is the actual value and should chain to one of the many * jasmine.Matchers functions. * * @param {Object} actual Actual value to test against and expected value * @return {jasmine.Matchers} */ var expect = function(actual) { return jasmine.getEnv().currentSpec.expect(actual); }; if (isCommonJS) exports.expect = expect; /** * Defines part of a jasmine spec. Used in cominbination with waits or waitsFor in asynchrnous specs. * * @param {Function} func Function that defines part of a jasmine spec. */ var runs = function(func) { jasmine.getEnv().currentSpec.runs(func); }; if (isCommonJS) exports.runs = runs; /** * Waits a fixed time period before moving to the next block. * * @deprecated Use waitsFor() instead * @param {Number} timeout milliseconds to wait */ var waits = function(timeout) { jasmine.getEnv().currentSpec.waits(timeout); }; if (isCommonJS) exports.waits = waits; /** * Waits for the latchFunction to return true before proceeding to the next block. * * @param {Function} latchFunction * @param {String} optional_timeoutMessage * @param {Number} optional_timeout */ var waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) { jasmine.getEnv().currentSpec.waitsFor.apply(jasmine.getEnv().currentSpec, arguments); }; if (isCommonJS) exports.waitsFor = waitsFor; /** * A function that is called before each spec in a suite. * * Used for spec setup, including validating assumptions. * * @param {Function} beforeEachFunction */ var beforeEach = function(beforeEachFunction) { jasmine.getEnv().beforeEach(beforeEachFunction); }; if (isCommonJS) exports.beforeEach = beforeEach; /** * A function that is called after each spec in a suite. * * Used for restoring any state that is hijacked during spec execution. * * @param {Function} afterEachFunction */ var afterEach = function(afterEachFunction) { jasmine.getEnv().afterEach(afterEachFunction); }; if (isCommonJS) exports.afterEach = afterEach; /** * Defines a suite of specifications. * * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization * of setup in some tests. * * @example * // TODO: a simple suite * * // TODO: a simple suite with a nested describe block * * @param {String} description A string, usually the class under test. * @param {Function} specDefinitions function that defines several specs. */ var describe = function(description, specDefinitions) { return jasmine.getEnv().describe(description, specDefinitions); }; if (isCommonJS) exports.describe = describe; /** * Disables a suite of specifications. Used to disable some suites in a file, or files, temporarily during development. * * @param {String} description A string, usually the class under test. * @param {Function} specDefinitions function that defines several specs. */ var xdescribe = function(description, specDefinitions) { return jasmine.getEnv().xdescribe(description, specDefinitions); }; if (isCommonJS) exports.xdescribe = xdescribe; // Provide the XMLHttpRequest class for IE 5.x-6.x: jasmine.XmlHttpRequest = (typeof XMLHttpRequest == "undefined") ? function() { function tryIt(f) { try { return f(); } catch(e) { } return null; } var xhr = tryIt(function() { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); }) || tryIt(function() { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); }) || tryIt(function() { return new ActiveXObject("Msxml2.XMLHTTP"); }) || tryIt(function() { return new ActiveXObject("Microsoft.XMLHTTP"); }); if (!xhr) throw new Error("This browser does not support XMLHttpRequest."); return xhr; } : XMLHttpRequest; /** * @namespace */ jasmine.util = {}; /** * Declare that a child class inherit it's prototype from the parent class. * * @private * @param {Function} childClass * @param {Function} parentClass */ jasmine.util.inherit = function(childClass, parentClass) { /** * @private */ var subclass = function() { }; subclass.prototype = parentClass.prototype; childClass.prototype = new subclass(); }; jasmine.util.formatException = function(e) { var lineNumber; if (e.line) { lineNumber = e.line; } else if (e.lineNumber) { lineNumber = e.lineNumber; } var file; if (e.sourceURL) { file = e.sourceURL; } else if (e.fileName) { file = e.fileName; } var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString(); if (file && lineNumber) { message += ' in ' + file + ' (line ' + lineNumber + ')'; } return message; }; jasmine.util.htmlEscape = function(str) { if (!str) return str; return str.replace(/&/g, '&') .replace(//g, '>'); }; jasmine.util.argsToArray = function(args) { var arrayOfArgs = []; for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]); return arrayOfArgs; }; jasmine.util.extend = function(destination, source) { for (var property in source) destination[property] = source[property]; return destination; }; /** * Environment for Jasmine * * @constructor */ jasmine.Env = function() { this.currentSpec = null; this.currentSuite = null; this.currentRunner_ = new jasmine.Runner(this); this.reporter = new jasmine.MultiReporter(); this.updateInterval = jasmine.DEFAULT_UPDATE_INTERVAL; this.defaultTimeoutInterval = jasmine.DEFAULT_TIMEOUT_INTERVAL; this.lastUpdate = 0; this.specFilter = function() { return true; }; this.nextSpecId_ = 0; this.nextSuiteId_ = 0; this.equalityTesters_ = []; // wrap matchers this.matchersClass = function() { jasmine.Matchers.apply(this, arguments); }; jasmine.util.inherit(this.matchersClass, jasmine.Matchers); jasmine.Matchers.wrapInto_(jasmine.Matchers.prototype, this.matchersClass); }; jasmine.Env.prototype.setTimeout = jasmine.setTimeout; jasmine.Env.prototype.clearTimeout = jasmine.clearTimeout; jasmine.Env.prototype.setInterval = jasmine.setInterval; jasmine.Env.prototype.clearInterval = jasmine.clearInterval; /** * @returns an object containing jasmine version build info, if set. */ jasmine.Env.prototype.version = function () { if (jasmine.version_) { return jasmine.version_; } else { throw new Error('Version not set'); } }; /** * @returns string containing jasmine version build info, if set. */ jasmine.Env.prototype.versionString = function() { if (!jasmine.version_) { return "version unknown"; } var version = this.version(); var versionString = version.major + "." + version.minor + "." + version.build; if (version.release_candidate) { versionString += ".rc" + version.release_candidate; } versionString += " revision " + version.revision; return versionString; }; /** * @returns a sequential integer starting at 0 */ jasmine.Env.prototype.nextSpecId = function () { return this.nextSpecId_++; }; /** * @returns a sequential integer starting at 0 */ jasmine.Env.prototype.nextSuiteId = function () { return this.nextSuiteId_++; }; /** * Register a reporter to receive status updates from Jasmine. * @param {jasmine.Reporter} reporter An object which will receive status updates. */ jasmine.Env.prototype.addReporter = function(reporter) { this.reporter.addReporter(reporter); }; jasmine.Env.prototype.execute = function() { this.currentRunner_.execute(); }; jasmine.Env.prototype.describe = function(description, specDefinitions) { var suite = new jasmine.Suite(this, description, specDefinitions, this.currentSuite); var parentSuite = this.currentSuite; if (parentSuite) { parentSuite.add(suite); } else { this.currentRunner_.add(suite); } this.currentSuite = suite; var declarationError = null; try { specDefinitions.call(suite); } catch(e) { declarationError = e; } if (declarationError) { this.it("encountered a declaration exception", function() { throw declarationError; }); } this.currentSuite = parentSuite; return suite; }; jasmine.Env.prototype.beforeEach = function(beforeEachFunction) { if (this.currentSuite) { this.currentSuite.beforeEach(beforeEachFunction); } else { this.currentRunner_.beforeEach(beforeEachFunction); } }; jasmine.Env.prototype.currentRunner = function () { return this.currentRunner_; }; jasmine.Env.prototype.afterEach = function(afterEachFunction) { if (this.currentSuite) { this.currentSuite.afterEach(afterEachFunction); } else { this.currentRunner_.afterEach(afterEachFunction); } }; jasmine.Env.prototype.xdescribe = function(desc, specDefinitions) { return { execute: function() { } }; }; jasmine.Env.prototype.it = function(description, func) { var spec = new jasmine.Spec(this, this.currentSuite, description); this.currentSuite.add(spec); this.currentSpec = spec; if (func) { spec.runs(func); } return spec; }; jasmine.Env.prototype.xit = function(desc, func) { return { id: this.nextSpecId(), runs: function() { } }; }; jasmine.Env.prototype.compareRegExps_ = function(a, b, mismatchKeys, mismatchValues) { if (a.source != b.source) mismatchValues.push("expected pattern /" + b.source + "/ is not equal to the pattern /" + a.source + "/"); if (a.ignoreCase != b.ignoreCase) mismatchValues.push("expected modifier i was" + (b.ignoreCase ? " " : " not ") + "set and does not equal the origin modifier"); if (a.global != b.global) mismatchValues.push("expected modifier g was" + (b.global ? " " : " not ") + "set and does not equal the origin modifier"); if (a.multiline != b.multiline) mismatchValues.push("expected modifier m was" + (b.multiline ? " " : " not ") + "set and does not equal the origin modifier"); if (a.sticky != b.sticky) mismatchValues.push("expected modifier y was" + (b.sticky ? " " : " not ") + "set and does not equal the origin modifier"); return (mismatchValues.length === 0); }; jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) { if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) { return true; } a.__Jasmine_been_here_before__ = b; b.__Jasmine_been_here_before__ = a; var hasKey = function(obj, keyName) { return obj !== null && obj[keyName] !== jasmine.undefined; }; for (var property in b) { if (!hasKey(a, property) && hasKey(b, property)) { mismatchKeys.push("expected has key '" + property + "', but missing from actual."); } } for (property in a) { if (!hasKey(b, property) && hasKey(a, property)) { mismatchKeys.push("expected missing key '" + property + "', but present in actual."); } } for (property in b) { if (property == '__Jasmine_been_here_before__') continue; if (!this.equals_(a[property], b[property], mismatchKeys, mismatchValues)) { mismatchValues.push("'" + property + "' was '" + (b[property] ? jasmine.util.htmlEscape(b[property].toString()) : b[property]) + "' in expected, but was '" + (a[property] ? jasmine.util.htmlEscape(a[property].toString()) : a[property]) + "' in actual."); } } if (jasmine.isArray_(a) && jasmine.isArray_(b) && a.length != b.length) { mismatchValues.push("arrays were not the same length"); } delete a.__Jasmine_been_here_before__; delete b.__Jasmine_been_here_before__; return (mismatchKeys.length === 0 && mismatchValues.length === 0); }; jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) { mismatchKeys = mismatchKeys || []; mismatchValues = mismatchValues || []; for (var i = 0; i < this.equalityTesters_.length; i++) { var equalityTester = this.equalityTesters_[i]; var result = equalityTester(a, b, this, mismatchKeys, mismatchValues); if (result !== jasmine.undefined) return result; } if (a === b) return true; if (a === jasmine.undefined || a === null || b === jasmine.undefined || b === null) { return (a == jasmine.undefined && b == jasmine.undefined); } if (jasmine.isDomNode(a) && jasmine.isDomNode(b)) { return a === b; } if (a instanceof Date && b instanceof Date) { return a.getTime() == b.getTime(); } if (a.jasmineMatches) { return a.jasmineMatches(b); } if (b.jasmineMatches) { return b.jasmineMatches(a); } if (a instanceof jasmine.Matchers.ObjectContaining) { return a.matches(b); } if (b instanceof jasmine.Matchers.ObjectContaining) { return b.matches(a); } if (jasmine.isString_(a) && jasmine.isString_(b)) { return (a == b); } if (jasmine.isNumber_(a) && jasmine.isNumber_(b)) { return (a == b); } if (a instanceof RegExp && b instanceof RegExp) { return this.compareRegExps_(a, b, mismatchKeys, mismatchValues); } if (typeof a === "object" && typeof b === "object") { return this.compareObjects_(a, b, mismatchKeys, mismatchValues); } //Straight check return (a === b); }; jasmine.Env.prototype.contains_ = function(haystack, needle) { if (jasmine.isArray_(haystack)) { for (var i = 0; i < haystack.length; i++) { if (this.equals_(haystack[i], needle)) return true; } return false; } return haystack.indexOf(needle) >= 0; }; jasmine.Env.prototype.addEqualityTester = function(equalityTester) { this.equalityTesters_.push(equalityTester); }; /** No-op base class for Jasmine reporters. * * @constructor */ jasmine.Reporter = function() { }; //noinspection JSUnusedLocalSymbols jasmine.Reporter.prototype.reportRunnerStarting = function(runner) { }; //noinspection JSUnusedLocalSymbols jasmine.Reporter.prototype.reportRunnerResults = function(runner) { }; //noinspection JSUnusedLocalSymbols jasmine.Reporter.prototype.reportSuiteResults = function(suite) { }; //noinspection JSUnusedLocalSymbols jasmine.Reporter.prototype.reportSpecStarting = function(spec) { }; //noinspection JSUnusedLocalSymbols jasmine.Reporter.prototype.reportSpecResults = function(spec) { }; //noinspection JSUnusedLocalSymbols jasmine.Reporter.prototype.log = function(str) { }; /** * Blocks are functions with executable code that make up a spec. * * @constructor * @param {jasmine.Env} env * @param {Function} func * @param {jasmine.Spec} spec */ jasmine.Block = function(env, func, spec) { this.env = env; this.func = func; this.spec = spec; }; jasmine.Block.prototype.execute = function(onComplete) { if (!jasmine.CATCH_EXCEPTIONS) { this.func.apply(this.spec); } else { try { this.func.apply(this.spec); } catch (e) { this.spec.fail(e); } } onComplete(); }; /** JavaScript API reporter. * * @constructor */ jasmine.JsApiReporter = function() { this.started = false; this.finished = false; this.suites_ = []; this.results_ = {}; }; jasmine.JsApiReporter.prototype.reportRunnerStarting = function(runner) { this.started = true; var suites = runner.topLevelSuites(); for (var i = 0; i < suites.length; i++) { var suite = suites[i]; this.suites_.push(this.summarize_(suite)); } }; jasmine.JsApiReporter.prototype.suites = function() { return this.suites_; }; jasmine.JsApiReporter.prototype.summarize_ = function(suiteOrSpec) { var isSuite = suiteOrSpec instanceof jasmine.Suite; var summary = { id: suiteOrSpec.id, name: suiteOrSpec.description, type: isSuite ? 'suite' : 'spec', children: [] }; if (isSuite) { var children = suiteOrSpec.children(); for (var i = 0; i < children.length; i++) { summary.children.push(this.summarize_(children[i])); } } return summary; }; jasmine.JsApiReporter.prototype.results = function() { return this.results_; }; jasmine.JsApiReporter.prototype.resultsForSpec = function(specId) { return this.results_[specId]; }; //noinspection JSUnusedLocalSymbols jasmine.JsApiReporter.prototype.reportRunnerResults = function(runner) { this.finished = true; }; //noinspection JSUnusedLocalSymbols jasmine.JsApiReporter.prototype.reportSuiteResults = function(suite) { }; //noinspection JSUnusedLocalSymbols jasmine.JsApiReporter.prototype.reportSpecResults = function(spec) { this.results_[spec.id] = { messages: spec.results().getItems(), result: spec.results().failedCount > 0 ? "failed" : "passed" }; }; //noinspection JSUnusedLocalSymbols jasmine.JsApiReporter.prototype.log = function(str) { }; jasmine.JsApiReporter.prototype.resultsForSpecs = function(specIds){ var results = {}; for (var i = 0; i < specIds.length; i++) { var specId = specIds[i]; results[specId] = this.summarizeResult_(this.results_[specId]); } return results; }; jasmine.JsApiReporter.prototype.summarizeResult_ = function(result){ var summaryMessages = []; var messagesLength = result.messages.length; for (var messageIndex = 0; messageIndex < messagesLength; messageIndex++) { var resultMessage = result.messages[messageIndex]; summaryMessages.push({ text: resultMessage.type == 'log' ? resultMessage.toString() : jasmine.undefined, passed: resultMessage.passed ? resultMessage.passed() : true, type: resultMessage.type, message: resultMessage.message, trace: { stack: resultMessage.passed && !resultMessage.passed() ? resultMessage.trace.stack : jasmine.undefined } }); } return { result : result.result, messages : summaryMessages }; }; /** * @constructor * @param {jasmine.Env} env * @param actual * @param {jasmine.Spec} spec */ jasmine.Matchers = function(env, actual, spec, opt_isNot) { this.env = env; this.actual = actual; this.spec = spec; this.isNot = opt_isNot || false; this.reportWasCalled_ = false; }; // todo: @deprecated as of Jasmine 0.11, remove soon [xw] jasmine.Matchers.pp = function(str) { throw new Error("jasmine.Matchers.pp() is no longer supported, please use jasmine.pp() instead!"); }; // todo: @deprecated Deprecated as of Jasmine 0.10. Rewrite your custom matchers to return true or false. [xw] jasmine.Matchers.prototype.report = function(result, failing_message, details) { throw new Error("As of jasmine 0.11, custom matchers must be implemented differently -- please see jasmine docs"); }; jasmine.Matchers.wrapInto_ = function(prototype, matchersClass) { for (var methodName in prototype) { if (methodName == 'report') continue; var orig = prototype[methodName]; matchersClass.prototype[methodName] = jasmine.Matchers.matcherFn_(methodName, orig); } }; jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) { return function() { var matcherArgs = jasmine.util.argsToArray(arguments); var result = matcherFunction.apply(this, arguments); if (this.isNot) { result = !result; } if (this.reportWasCalled_) return result; var message; if (!result) { if (this.message) { message = this.message.apply(this, arguments); if (jasmine.isArray_(message)) { message = message[this.isNot ? 1 : 0]; } } else { var englishyPredicate = matcherName.replace(/[A-Z]/g, function(s) { return ' ' + s.toLowerCase(); }); message = "Expected " + jasmine.pp(this.actual) + (this.isNot ? " not " : " ") + englishyPredicate; if (matcherArgs.length > 0) { for (var i = 0; i < matcherArgs.length; i++) { if (i > 0) message += ","; message += " " + jasmine.pp(matcherArgs[i]); } } message += "."; } } var expectationResult = new jasmine.ExpectationResult({ matcherName: matcherName, passed: result, expected: matcherArgs.length > 1 ? matcherArgs : matcherArgs[0], actual: this.actual, message: message }); this.spec.addMatcherResult(expectationResult); return jasmine.undefined; }; }; /** * toBe: compares the actual to the expected using === * @param expected */ jasmine.Matchers.prototype.toBe = function(expected) { return this.actual === expected; }; /** * toNotBe: compares the actual to the expected using !== * @param expected * @deprecated as of 1.0. Use not.toBe() instead. */ jasmine.Matchers.prototype.toNotBe = function(expected) { return this.actual !== expected; }; /** * toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc. * * @param expected */ jasmine.Matchers.prototype.toEqual = function(expected) { return this.env.equals_(this.actual, expected); }; /** * toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual * @param expected * @deprecated as of 1.0. Use not.toEqual() instead. */ jasmine.Matchers.prototype.toNotEqual = function(expected) { return !this.env.equals_(this.actual, expected); }; /** * Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes * a pattern or a String. * * @param expected */ jasmine.Matchers.prototype.toMatch = function(expected) { return new RegExp(expected).test(this.actual); }; /** * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch * @param expected * @deprecated as of 1.0. Use not.toMatch() instead. */ jasmine.Matchers.prototype.toNotMatch = function(expected) { return !(new RegExp(expected).test(this.actual)); }; /** * Matcher that compares the actual to jasmine.undefined. */ jasmine.Matchers.prototype.toBeDefined = function() { return (this.actual !== jasmine.undefined); }; /** * Matcher that compares the actual to jasmine.undefined. */ jasmine.Matchers.prototype.toBeUndefined = function() { return (this.actual === jasmine.undefined); }; /** * Matcher that compares the actual to null. */ jasmine.Matchers.prototype.toBeNull = function() { return (this.actual === null); }; /** * Matcher that compares the actual to NaN. */ jasmine.Matchers.prototype.toBeNaN = function() { this.message = function() { return [ "Expected " + jasmine.pp(this.actual) + " to be NaN." ]; }; return (this.actual !== this.actual); }; /** * Matcher that boolean not-nots the actual. */ jasmine.Matchers.prototype.toBeTruthy = function() { return !!this.actual; }; /** * Matcher that boolean nots the actual. */ jasmine.Matchers.prototype.toBeFalsy = function() { return !this.actual; }; /** * Matcher that checks to see if the actual, a Jasmine spy, was called. */ jasmine.Matchers.prototype.toHaveBeenCalled = function() { if (arguments.length > 0) { throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith'); } if (!jasmine.isSpy(this.actual)) { throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); } this.message = function() { return [ "Expected spy " + this.actual.identity + " to have been called.", "Expected spy " + this.actual.identity + " not to have been called." ]; }; return this.actual.wasCalled; }; /** @deprecated Use expect(xxx).toHaveBeenCalled() instead */ jasmine.Matchers.prototype.wasCalled = jasmine.Matchers.prototype.toHaveBeenCalled; /** * Matcher that checks to see if the actual, a Jasmine spy, was not called. * * @deprecated Use expect(xxx).not.toHaveBeenCalled() instead */ jasmine.Matchers.prototype.wasNotCalled = function() { if (arguments.length > 0) { throw new Error('wasNotCalled does not take arguments'); } if (!jasmine.isSpy(this.actual)) { throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); } this.message = function() { return [ "Expected spy " + this.actual.identity + " to not have been called.", "Expected spy " + this.actual.identity + " to have been called." ]; }; return !this.actual.wasCalled; }; /** * Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters. * * @example * */ jasmine.Matchers.prototype.toHaveBeenCalledWith = function() { var expectedArgs = jasmine.util.argsToArray(arguments); if (!jasmine.isSpy(this.actual)) { throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); } this.message = function() { var invertedMessage = "Expected spy " + this.actual.identity + " not to have been called with " + jasmine.pp(expectedArgs) + " but it was."; var positiveMessage = ""; if (this.actual.callCount === 0) { positiveMessage = "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but it was never called."; } else { positiveMessage = "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but actual calls were " + jasmine.pp(this.actual.argsForCall).replace(/^\[ | \]$/g, '') } return [positiveMessage, invertedMessage]; }; return this.env.contains_(this.actual.argsForCall, expectedArgs); }; /** @deprecated Use expect(xxx).toHaveBeenCalledWith() instead */ jasmine.Matchers.prototype.wasCalledWith = jasmine.Matchers.prototype.toHaveBeenCalledWith; /** @deprecated Use expect(xxx).not.toHaveBeenCalledWith() instead */ jasmine.Matchers.prototype.wasNotCalledWith = function() { var expectedArgs = jasmine.util.argsToArray(arguments); if (!jasmine.isSpy(this.actual)) { throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); } this.message = function() { return [ "Expected spy not to have been called with " + jasmine.pp(expectedArgs) + " but it was", "Expected spy to have been called with " + jasmine.pp(expectedArgs) + " but it was" ]; }; return !this.env.contains_(this.actual.argsForCall, expectedArgs); }; /** * Matcher that checks that the expected item is an element in the actual Array. * * @param {Object} expected */ jasmine.Matchers.prototype.toContain = function(expected) { return this.env.contains_(this.actual, expected); }; /** * Matcher that checks that the expected item is NOT an element in the actual Array. * * @param {Object} expected * @deprecated as of 1.0. Use not.toContain() instead. */ jasmine.Matchers.prototype.toNotContain = function(expected) { return !this.env.contains_(this.actual, expected); }; jasmine.Matchers.prototype.toBeLessThan = function(expected) { return this.actual < expected; }; jasmine.Matchers.prototype.toBeGreaterThan = function(expected) { return this.actual > expected; }; /** * Matcher that checks that the expected item is equal to the actual item * up to a given level of decimal precision (default 2). * * @param {Number} expected * @param {Number} precision, as number of decimal places */ jasmine.Matchers.prototype.toBeCloseTo = function(expected, precision) { if (!(precision === 0)) { precision = precision || 2; } return Math.abs(expected - this.actual) < (Math.pow(10, -precision) / 2); }; /** * Matcher that checks that the expected exception was thrown by the actual. * * @param {String} [expected] */ jasmine.Matchers.prototype.toThrow = function(expected) { var result = false; var exception; if (typeof this.actual != 'function') { throw new Error('Actual is not a function'); } try { this.actual(); } catch (e) { exception = e; } if (exception) { result = (expected === jasmine.undefined || this.env.equals_(exception.message || exception, expected.message || expected)); } var not = this.isNot ? "not " : ""; this.message = function() { if (exception && (expected === jasmine.undefined || !this.env.equals_(exception.message || exception, expected.message || expected))) { return ["Expected function " + not + "to throw", expected ? expected.message || expected : "an exception", ", but it threw", exception.message || exception].join(' '); } else { return "Expected function to throw an exception."; } }; return result; }; jasmine.Matchers.Any = function(expectedClass) { this.expectedClass = expectedClass; }; jasmine.Matchers.Any.prototype.jasmineMatches = function(other) { if (this.expectedClass == String) { return typeof other == 'string' || other instanceof String; } if (this.expectedClass == Number) { return typeof other == 'number' || other instanceof Number; } if (this.expectedClass == Function) { return typeof other == 'function' || other instanceof Function; } if (this.expectedClass == Object) { return typeof other == 'object'; } return other instanceof this.expectedClass; }; jasmine.Matchers.Any.prototype.jasmineToString = function() { return ''; }; jasmine.Matchers.ObjectContaining = function (sample) { this.sample = sample; }; jasmine.Matchers.ObjectContaining.prototype.jasmineMatches = function(other, mismatchKeys, mismatchValues) { mismatchKeys = mismatchKeys || []; mismatchValues = mismatchValues || []; var env = jasmine.getEnv(); var hasKey = function(obj, keyName) { return obj != null && obj[keyName] !== jasmine.undefined; }; for (var property in this.sample) { if (!hasKey(other, property) && hasKey(this.sample, property)) { mismatchKeys.push("expected has key '" + property + "', but missing from actual."); } else if (!env.equals_(this.sample[property], other[property], mismatchKeys, mismatchValues)) { mismatchValues.push("'" + property + "' was '" + (other[property] ? jasmine.util.htmlEscape(other[property].toString()) : other[property]) + "' in expected, but was '" + (this.sample[property] ? jasmine.util.htmlEscape(this.sample[property].toString()) : this.sample[property]) + "' in actual."); } } return (mismatchKeys.length === 0 && mismatchValues.length === 0); }; jasmine.Matchers.ObjectContaining.prototype.jasmineToString = function () { return ""; }; // Mock setTimeout, clearTimeout // Contributed by Pivotal Computer Systems, www.pivotalsf.com jasmine.FakeTimer = function() { this.reset(); var self = this; self.setTimeout = function(funcToCall, millis) { self.timeoutsMade++; self.scheduleFunction(self.timeoutsMade, funcToCall, millis, false); return self.timeoutsMade; }; self.setInterval = function(funcToCall, millis) { self.timeoutsMade++; self.scheduleFunction(self.timeoutsMade, funcToCall, millis, true); return self.timeoutsMade; }; self.clearTimeout = function(timeoutKey) { self.scheduledFunctions[timeoutKey] = jasmine.undefined; }; self.clearInterval = function(timeoutKey) { self.scheduledFunctions[timeoutKey] = jasmine.undefined; }; }; jasmine.FakeTimer.prototype.reset = function() { this.timeoutsMade = 0; this.scheduledFunctions = {}; this.nowMillis = 0; }; jasmine.FakeTimer.prototype.tick = function(millis) { var oldMillis = this.nowMillis; var newMillis = oldMillis + millis; this.runFunctionsWithinRange(oldMillis, newMillis); this.nowMillis = newMillis; }; jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) { var scheduledFunc; var funcsToRun = []; for (var timeoutKey in this.scheduledFunctions) { scheduledFunc = this.scheduledFunctions[timeoutKey]; if (scheduledFunc != jasmine.undefined && scheduledFunc.runAtMillis >= oldMillis && scheduledFunc.runAtMillis <= nowMillis) { funcsToRun.push(scheduledFunc); this.scheduledFunctions[timeoutKey] = jasmine.undefined; } } if (funcsToRun.length > 0) { funcsToRun.sort(function(a, b) { return a.runAtMillis - b.runAtMillis; }); for (var i = 0; i < funcsToRun.length; ++i) { try { var funcToRun = funcsToRun[i]; this.nowMillis = funcToRun.runAtMillis; funcToRun.funcToCall(); if (funcToRun.recurring) { this.scheduleFunction(funcToRun.timeoutKey, funcToRun.funcToCall, funcToRun.millis, true); } } catch(e) { } } this.runFunctionsWithinRange(oldMillis, nowMillis); } }; jasmine.FakeTimer.prototype.scheduleFunction = function(timeoutKey, funcToCall, millis, recurring) { this.scheduledFunctions[timeoutKey] = { runAtMillis: this.nowMillis + millis, funcToCall: funcToCall, recurring: recurring, timeoutKey: timeoutKey, millis: millis }; }; /** * @namespace */ jasmine.Clock = { defaultFakeTimer: new jasmine.FakeTimer(), reset: function() { jasmine.Clock.assertInstalled(); jasmine.Clock.defaultFakeTimer.reset(); }, tick: function(millis) { jasmine.Clock.assertInstalled(); jasmine.Clock.defaultFakeTimer.tick(millis); }, runFunctionsWithinRange: function(oldMillis, nowMillis) { jasmine.Clock.defaultFakeTimer.runFunctionsWithinRange(oldMillis, nowMillis); }, scheduleFunction: function(timeoutKey, funcToCall, millis, recurring) { jasmine.Clock.defaultFakeTimer.scheduleFunction(timeoutKey, funcToCall, millis, recurring); }, useMock: function() { if (!jasmine.Clock.isInstalled()) { var spec = jasmine.getEnv().currentSpec; spec.after(jasmine.Clock.uninstallMock); jasmine.Clock.installMock(); } }, installMock: function() { jasmine.Clock.installed = jasmine.Clock.defaultFakeTimer; }, uninstallMock: function() { jasmine.Clock.assertInstalled(); jasmine.Clock.installed = jasmine.Clock.real; }, real: { setTimeout: jasmine.getGlobal().setTimeout, clearTimeout: jasmine.getGlobal().clearTimeout, setInterval: jasmine.getGlobal().setInterval, clearInterval: jasmine.getGlobal().clearInterval }, assertInstalled: function() { if (!jasmine.Clock.isInstalled()) { throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()"); } }, isInstalled: function() { return jasmine.Clock.installed == jasmine.Clock.defaultFakeTimer; }, installed: null }; jasmine.Clock.installed = jasmine.Clock.real; //else for IE support jasmine.getGlobal().setTimeout = function(funcToCall, millis) { if (jasmine.Clock.installed.setTimeout.apply) { return jasmine.Clock.installed.setTimeout.apply(this, arguments); } else { return jasmine.Clock.installed.setTimeout(funcToCall, millis); } }; jasmine.getGlobal().setInterval = function(funcToCall, millis) { if (jasmine.Clock.installed.setInterval.apply) { return jasmine.Clock.installed.setInterval.apply(this, arguments); } else { return jasmine.Clock.installed.setInterval(funcToCall, millis); } }; jasmine.getGlobal().clearTimeout = function(timeoutKey) { if (jasmine.Clock.installed.clearTimeout.apply) { return jasmine.Clock.installed.clearTimeout.apply(this, arguments); } else { return jasmine.Clock.installed.clearTimeout(timeoutKey); } }; jasmine.getGlobal().clearInterval = function(timeoutKey) { if (jasmine.Clock.installed.clearTimeout.apply) { return jasmine.Clock.installed.clearInterval.apply(this, arguments); } else { return jasmine.Clock.installed.clearInterval(timeoutKey); } }; /** * @constructor */ jasmine.MultiReporter = function() { this.subReporters_ = []; }; jasmine.util.inherit(jasmine.MultiReporter, jasmine.Reporter); jasmine.MultiReporter.prototype.addReporter = function(reporter) { this.subReporters_.push(reporter); }; (function() { var functionNames = [ "reportRunnerStarting", "reportRunnerResults", "reportSuiteResults", "reportSpecStarting", "reportSpecResults", "log" ]; for (var i = 0; i < functionNames.length; i++) { var functionName = functionNames[i]; jasmine.MultiReporter.prototype[functionName] = (function(functionName) { return function() { for (var j = 0; j < this.subReporters_.length; j++) { var subReporter = this.subReporters_[j]; if (subReporter[functionName]) { subReporter[functionName].apply(subReporter, arguments); } } }; })(functionName); } })(); /** * Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults * * @constructor */ jasmine.NestedResults = function() { /** * The total count of results */ this.totalCount = 0; /** * Number of passed results */ this.passedCount = 0; /** * Number of failed results */ this.failedCount = 0; /** * Was this suite/spec skipped? */ this.skipped = false; /** * @ignore */ this.items_ = []; }; /** * Roll up the result counts. * * @param result */ jasmine.NestedResults.prototype.rollupCounts = function(result) { this.totalCount += result.totalCount; this.passedCount += result.passedCount; this.failedCount += result.failedCount; }; /** * Adds a log message. * @param values Array of message parts which will be concatenated later. */ jasmine.NestedResults.prototype.log = function(values) { this.items_.push(new jasmine.MessageResult(values)); }; /** * Getter for the results: message & results. */ jasmine.NestedResults.prototype.getItems = function() { return this.items_; }; /** * Adds a result, tracking counts (total, passed, & failed) * @param {jasmine.ExpectationResult|jasmine.NestedResults} result */ jasmine.NestedResults.prototype.addResult = function(result) { if (result.type != 'log') { if (result.items_) { this.rollupCounts(result); } else { this.totalCount++; if (result.passed()) { this.passedCount++; } else { this.failedCount++; } } } this.items_.push(result); }; /** * @returns {Boolean} True if everything below passed */ jasmine.NestedResults.prototype.passed = function() { return this.passedCount === this.totalCount; }; /** * Base class for pretty printing for expectation results. */ jasmine.PrettyPrinter = function() { this.ppNestLevel_ = 0; }; /** * Formats a value in a nice, human-readable string. * * @param value */ jasmine.PrettyPrinter.prototype.format = function(value) { this.ppNestLevel_++; try { if (value === jasmine.undefined) { this.emitScalar('undefined'); } else if (value === null) { this.emitScalar('null'); } else if (value === jasmine.getGlobal()) { this.emitScalar(''); } else if (value.jasmineToString) { this.emitScalar(value.jasmineToString()); } else if (typeof value === 'string') { this.emitString(value); } else if (jasmine.isSpy(value)) { this.emitScalar("spy on " + value.identity); } else if (value instanceof RegExp) { this.emitScalar(value.toString()); } else if (typeof value === 'function') { this.emitScalar('Function'); } else if (typeof value.nodeType === 'number') { this.emitScalar('HTMLNode'); } else if (value instanceof Date) { this.emitScalar('Date(' + value + ')'); } else if (value.__Jasmine_been_here_before__) { this.emitScalar(''); } else if (jasmine.isArray_(value) || typeof value == 'object') { value.__Jasmine_been_here_before__ = true; if (jasmine.isArray_(value)) { this.emitArray(value); } else { this.emitObject(value); } delete value.__Jasmine_been_here_before__; } else { this.emitScalar(value.toString()); } } finally { this.ppNestLevel_--; } }; jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) { for (var property in obj) { if (!obj.hasOwnProperty(property)) continue; if (property == '__Jasmine_been_here_before__') continue; fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) !== jasmine.undefined && obj.__lookupGetter__(property) !== null) : false); } }; jasmine.PrettyPrinter.prototype.emitArray = jasmine.unimplementedMethod_; jasmine.PrettyPrinter.prototype.emitObject = jasmine.unimplementedMethod_; jasmine.PrettyPrinter.prototype.emitScalar = jasmine.unimplementedMethod_; jasmine.PrettyPrinter.prototype.emitString = jasmine.unimplementedMethod_; jasmine.StringPrettyPrinter = function() { jasmine.PrettyPrinter.call(this); this.string = ''; }; jasmine.util.inherit(jasmine.StringPrettyPrinter, jasmine.PrettyPrinter); jasmine.StringPrettyPrinter.prototype.emitScalar = function(value) { this.append(value); }; jasmine.StringPrettyPrinter.prototype.emitString = function(value) { this.append("'" + value + "'"); }; jasmine.StringPrettyPrinter.prototype.emitArray = function(array) { if (this.ppNestLevel_ > jasmine.MAX_PRETTY_PRINT_DEPTH) { this.append("Array"); return; } this.append('[ '); for (var i = 0; i < array.length; i++) { if (i > 0) { this.append(', '); } this.format(array[i]); } this.append(' ]'); }; jasmine.StringPrettyPrinter.prototype.emitObject = function(obj) { if (this.ppNestLevel_ > jasmine.MAX_PRETTY_PRINT_DEPTH) { this.append("Object"); return; } var self = this; this.append('{ '); var first = true; this.iterateObject(obj, function(property, isGetter) { if (first) { first = false; } else { self.append(', '); } self.append(property); self.append(' : '); if (isGetter) { self.append(''); } else { self.format(obj[property]); } }); this.append(' }'); }; jasmine.StringPrettyPrinter.prototype.append = function(value) { this.string += value; }; jasmine.Queue = function(env) { this.env = env; // parallel to blocks. each true value in this array means the block will // get executed even if we abort this.ensured = []; this.blocks = []; this.running = false; this.index = 0; this.offset = 0; this.abort = false; }; jasmine.Queue.prototype.addBefore = function(block, ensure) { if (ensure === jasmine.undefined) { ensure = false; } this.blocks.unshift(block); this.ensured.unshift(ensure); }; jasmine.Queue.prototype.add = function(block, ensure) { if (ensure === jasmine.undefined) { ensure = false; } this.blocks.push(block); this.ensured.push(ensure); }; jasmine.Queue.prototype.insertNext = function(block, ensure) { if (ensure === jasmine.undefined) { ensure = false; } this.ensured.splice((this.index + this.offset + 1), 0, ensure); this.blocks.splice((this.index + this.offset + 1), 0, block); this.offset++; }; jasmine.Queue.prototype.start = function(onComplete) { this.running = true; this.onComplete = onComplete; this.next_(); }; jasmine.Queue.prototype.isRunning = function() { return this.running; }; jasmine.Queue.LOOP_DONT_RECURSE = true; jasmine.Queue.prototype.next_ = function() { var self = this; var goAgain = true; while (goAgain) { goAgain = false; if (self.index < self.blocks.length && !(this.abort && !this.ensured[self.index])) { var calledSynchronously = true; var completedSynchronously = false; var onComplete = function () { if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) { completedSynchronously = true; return; } if (self.blocks[self.index].abort) { self.abort = true; } self.offset = 0; self.index++; var now = new Date().getTime(); if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) { self.env.lastUpdate = now; self.env.setTimeout(function() { self.next_(); }, 0); } else { if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) { goAgain = true; } else { self.next_(); } } }; self.blocks[self.index].execute(onComplete); calledSynchronously = false; if (completedSynchronously) { onComplete(); } } else { self.running = false; if (self.onComplete) { self.onComplete(); } } } }; jasmine.Queue.prototype.results = function() { var results = new jasmine.NestedResults(); for (var i = 0; i < this.blocks.length; i++) { if (this.blocks[i].results) { results.addResult(this.blocks[i].results()); } } return results; }; /** * Runner * * @constructor * @param {jasmine.Env} env */ jasmine.Runner = function(env) { var self = this; self.env = env; self.queue = new jasmine.Queue(env); self.before_ = []; self.after_ = []; self.suites_ = []; }; jasmine.Runner.prototype.execute = function() { var self = this; if (self.env.reporter.reportRunnerStarting) { self.env.reporter.reportRunnerStarting(this); } self.queue.start(function () { self.finishCallback(); }); }; jasmine.Runner.prototype.beforeEach = function(beforeEachFunction) { beforeEachFunction.typeName = 'beforeEach'; this.before_.splice(0,0,beforeEachFunction); }; jasmine.Runner.prototype.afterEach = function(afterEachFunction) { afterEachFunction.typeName = 'afterEach'; this.after_.splice(0,0,afterEachFunction); }; jasmine.Runner.prototype.finishCallback = function() { this.env.reporter.reportRunnerResults(this); }; jasmine.Runner.prototype.addSuite = function(suite) { this.suites_.push(suite); }; jasmine.Runner.prototype.add = function(block) { if (block instanceof jasmine.Suite) { this.addSuite(block); } this.queue.add(block); }; jasmine.Runner.prototype.specs = function () { var suites = this.suites(); var specs = []; for (var i = 0; i < suites.length; i++) { specs = specs.concat(suites[i].specs()); } return specs; }; jasmine.Runner.prototype.suites = function() { return this.suites_; }; jasmine.Runner.prototype.topLevelSuites = function() { var topLevelSuites = []; for (var i = 0; i < this.suites_.length; i++) { if (!this.suites_[i].parentSuite) { topLevelSuites.push(this.suites_[i]); } } return topLevelSuites; }; jasmine.Runner.prototype.results = function() { return this.queue.results(); }; /** * Internal representation of a Jasmine specification, or test. * * @constructor * @param {jasmine.Env} env * @param {jasmine.Suite} suite * @param {String} description */ jasmine.Spec = function(env, suite, description) { if (!env) { throw new Error('jasmine.Env() required'); } if (!suite) { throw new Error('jasmine.Suite() required'); } var spec = this; spec.id = env.nextSpecId ? env.nextSpecId() : null; spec.env = env; spec.suite = suite; spec.description = description; spec.queue = new jasmine.Queue(env); spec.afterCallbacks = []; spec.spies_ = []; spec.results_ = new jasmine.NestedResults(); spec.results_.description = description; spec.matchersClass = null; }; jasmine.Spec.prototype.getFullName = function() { return this.suite.getFullName() + ' ' + this.description + '.'; }; jasmine.Spec.prototype.results = function() { return this.results_; }; /** * All parameters are pretty-printed and concatenated together, then written to the spec's output. * * Be careful not to leave calls to jasmine.log in production code. */ jasmine.Spec.prototype.log = function() { return this.results_.log(arguments); }; jasmine.Spec.prototype.runs = function (func) { var block = new jasmine.Block(this.env, func, this); this.addToQueue(block); return this; }; jasmine.Spec.prototype.addToQueue = function (block) { if (this.queue.isRunning()) { this.queue.insertNext(block); } else { this.queue.add(block); } }; /** * @param {jasmine.ExpectationResult} result */ jasmine.Spec.prototype.addMatcherResult = function(result) { this.results_.addResult(result); }; jasmine.Spec.prototype.expect = function(actual) { var positive = new (this.getMatchersClass_())(this.env, actual, this); positive.not = new (this.getMatchersClass_())(this.env, actual, this, true); return positive; }; /** * Waits a fixed time period before moving to the next block. * * @deprecated Use waitsFor() instead * @param {Number} timeout milliseconds to wait */ jasmine.Spec.prototype.waits = function(timeout) { var waitsFunc = new jasmine.WaitsBlock(this.env, timeout, this); this.addToQueue(waitsFunc); return this; }; /** * Waits for the latchFunction to return true before proceeding to the next block. * * @param {Function} latchFunction * @param {String} optional_timeoutMessage * @param {Number} optional_timeout */ jasmine.Spec.prototype.waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) { var latchFunction_ = null; var optional_timeoutMessage_ = null; var optional_timeout_ = null; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; switch (typeof arg) { case 'function': latchFunction_ = arg; break; case 'string': optional_timeoutMessage_ = arg; break; case 'number': optional_timeout_ = arg; break; } } var waitsForFunc = new jasmine.WaitsForBlock(this.env, optional_timeout_, latchFunction_, optional_timeoutMessage_, this); this.addToQueue(waitsForFunc); return this; }; jasmine.Spec.prototype.fail = function (e) { var expectationResult = new jasmine.ExpectationResult({ passed: false, message: e ? jasmine.util.formatException(e) : 'Exception', trace: { stack: e.stack } }); this.results_.addResult(expectationResult); }; jasmine.Spec.prototype.getMatchersClass_ = function() { return this.matchersClass || this.env.matchersClass; }; jasmine.Spec.prototype.addMatchers = function(matchersPrototype) { var parent = this.getMatchersClass_(); var newMatchersClass = function() { parent.apply(this, arguments); }; jasmine.util.inherit(newMatchersClass, parent); jasmine.Matchers.wrapInto_(matchersPrototype, newMatchersClass); this.matchersClass = newMatchersClass; }; jasmine.Spec.prototype.finishCallback = function() { this.env.reporter.reportSpecResults(this); }; jasmine.Spec.prototype.finish = function(onComplete) { this.removeAllSpies(); this.finishCallback(); if (onComplete) { onComplete(); } }; jasmine.Spec.prototype.after = function(doAfter) { if (this.queue.isRunning()) { this.queue.add(new jasmine.Block(this.env, doAfter, this), true); } else { this.afterCallbacks.unshift(doAfter); } }; jasmine.Spec.prototype.execute = function(onComplete) { var spec = this; if (!spec.env.specFilter(spec)) { spec.results_.skipped = true; spec.finish(onComplete); return; } this.env.reporter.reportSpecStarting(this); spec.env.currentSpec = spec; spec.addBeforesAndAftersToQueue(); spec.queue.start(function () { spec.finish(onComplete); }); }; jasmine.Spec.prototype.addBeforesAndAftersToQueue = function() { var runner = this.env.currentRunner(); var i; for (var suite = this.suite; suite; suite = suite.parentSuite) { for (i = 0; i < suite.before_.length; i++) { this.queue.addBefore(new jasmine.Block(this.env, suite.before_[i], this)); } } for (i = 0; i < runner.before_.length; i++) { this.queue.addBefore(new jasmine.Block(this.env, runner.before_[i], this)); } for (i = 0; i < this.afterCallbacks.length; i++) { this.queue.add(new jasmine.Block(this.env, this.afterCallbacks[i], this), true); } for (suite = this.suite; suite; suite = suite.parentSuite) { for (i = 0; i < suite.after_.length; i++) { this.queue.add(new jasmine.Block(this.env, suite.after_[i], this), true); } } for (i = 0; i < runner.after_.length; i++) { this.queue.add(new jasmine.Block(this.env, runner.after_[i], this), true); } }; jasmine.Spec.prototype.explodes = function() { throw 'explodes function should not have been called'; }; jasmine.Spec.prototype.spyOn = function(obj, methodName, ignoreMethodDoesntExist) { if (obj == jasmine.undefined) { throw "spyOn could not find an object to spy upon for " + methodName + "()"; } if (!ignoreMethodDoesntExist && obj[methodName] === jasmine.undefined) { throw methodName + '() method does not exist'; } if (!ignoreMethodDoesntExist && obj[methodName] && obj[methodName].isSpy) { throw new Error(methodName + ' has already been spied upon'); } var spyObj = jasmine.createSpy(methodName); this.spies_.push(spyObj); spyObj.baseObj = obj; spyObj.methodName = methodName; spyObj.originalValue = obj[methodName]; obj[methodName] = spyObj; return spyObj; }; jasmine.Spec.prototype.removeAllSpies = function() { for (var i = 0; i < this.spies_.length; i++) { var spy = this.spies_[i]; spy.baseObj[spy.methodName] = spy.originalValue; } this.spies_ = []; }; /** * Internal representation of a Jasmine suite. * * @constructor * @param {jasmine.Env} env * @param {String} description * @param {Function} specDefinitions * @param {jasmine.Suite} parentSuite */ jasmine.Suite = function(env, description, specDefinitions, parentSuite) { var self = this; self.id = env.nextSuiteId ? env.nextSuiteId() : null; self.description = description; self.queue = new jasmine.Queue(env); self.parentSuite = parentSuite; self.env = env; self.before_ = []; self.after_ = []; self.children_ = []; self.suites_ = []; self.specs_ = []; }; jasmine.Suite.prototype.getFullName = function() { var fullName = this.description; for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) { fullName = parentSuite.description + ' ' + fullName; } return fullName; }; jasmine.Suite.prototype.finish = function(onComplete) { this.env.reporter.reportSuiteResults(this); this.finished = true; if (typeof(onComplete) == 'function') { onComplete(); } }; jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) { beforeEachFunction.typeName = 'beforeEach'; this.before_.unshift(beforeEachFunction); }; jasmine.Suite.prototype.afterEach = function(afterEachFunction) { afterEachFunction.typeName = 'afterEach'; this.after_.unshift(afterEachFunction); }; jasmine.Suite.prototype.results = function() { return this.queue.results(); }; jasmine.Suite.prototype.add = function(suiteOrSpec) { this.children_.push(suiteOrSpec); if (suiteOrSpec instanceof jasmine.Suite) { this.suites_.push(suiteOrSpec); this.env.currentRunner().addSuite(suiteOrSpec); } else { this.specs_.push(suiteOrSpec); } this.queue.add(suiteOrSpec); }; jasmine.Suite.prototype.specs = function() { return this.specs_; }; jasmine.Suite.prototype.suites = function() { return this.suites_; }; jasmine.Suite.prototype.children = function() { return this.children_; }; jasmine.Suite.prototype.execute = function(onComplete) { var self = this; this.queue.start(function () { self.finish(onComplete); }); }; jasmine.WaitsBlock = function(env, timeout, spec) { this.timeout = timeout; jasmine.Block.call(this, env, null, spec); }; jasmine.util.inherit(jasmine.WaitsBlock, jasmine.Block); jasmine.WaitsBlock.prototype.execute = function (onComplete) { if (jasmine.VERBOSE) { this.env.reporter.log('>> Jasmine waiting for ' + this.timeout + ' ms...'); } this.env.setTimeout(function () { onComplete(); }, this.timeout); }; /** * A block which waits for some condition to become true, with timeout. * * @constructor * @extends jasmine.Block * @param {jasmine.Env} env The Jasmine environment. * @param {Number} timeout The maximum time in milliseconds to wait for the condition to become true. * @param {Function} latchFunction A function which returns true when the desired condition has been met. * @param {String} message The message to display if the desired condition hasn't been met within the given time period. * @param {jasmine.Spec} spec The Jasmine spec. */ jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) { this.timeout = timeout || env.defaultTimeoutInterval; this.latchFunction = latchFunction; this.message = message; this.totalTimeSpentWaitingForLatch = 0; jasmine.Block.call(this, env, null, spec); }; jasmine.util.inherit(jasmine.WaitsForBlock, jasmine.Block); jasmine.WaitsForBlock.TIMEOUT_INCREMENT = 10; jasmine.WaitsForBlock.prototype.execute = function(onComplete) { if (jasmine.VERBOSE) { this.env.reporter.log('>> Jasmine waiting for ' + (this.message || 'something to happen')); } var latchFunctionResult; try { latchFunctionResult = this.latchFunction.apply(this.spec); } catch (e) { this.spec.fail(e); onComplete(); return; } if (latchFunctionResult) { onComplete(); } else if (this.totalTimeSpentWaitingForLatch >= this.timeout) { var message = 'timed out after ' + this.timeout + ' msec waiting for ' + (this.message || 'something to happen'); this.spec.fail({ name: 'timeout', message: message }); this.abort = true; onComplete(); } else { this.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT; var self = this; this.env.setTimeout(function() { self.execute(onComplete); }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT); } }; jasmine.version_= { "major": 1, "minor": 3, "build": 1, "revision": 1354556913 }; v1.6.3~dfsg/test/browser/runner-browser-spec.js0000644000000000000000000000047112275460205020400 0ustar rootrootdescribe("less.js browser behaviour", function() { testLessEqualsInDocument(); it("has some log messages", function() { expect(logMessages.length).toBeGreaterThan(0); }); for (var i = 0; i < testFiles.length; i++) { var sheet = testSheets[i]; testSheet(sheet); } }); v1.6.3~dfsg/test/browser/jasmine.css0000644000000000000000000001461112275460205016261 0ustar rootrootbody { 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; } v1.6.3~dfsg/test/browser/runner-production-options.js0000644000000000000000000000005112275460205021636 0ustar rootrootvar less = {}; less.env = "production"; v1.6.3~dfsg/test/browser/runner-browser-options.js0000644000000000000000000000265512275460205021147 0ustar rootrootvar less = {}; // There originally run inside describe method. However, since they have not // been inside it, they run at jasmine compile time (not runtime). It all // worked cause less.js was in async mode and custom phantom runner had // different setup then grunt-contrib-jasmine. They have been created before // less.js run, even as they have been defined in spec. // test inline less in style tags by grabbing an assortment of less files and doing `@import`s var testFiles = ['charsets', 'colors', 'comments', 'css-3', 'strings', 'media', 'mixins'], testSheets = []; // setup style tags with less and link tags pointing to expected css output for (var i = 0; i < testFiles.length; i++) { var file = testFiles[i], lessPath = '/test/less/' + file + '.less', cssPath = '/test/css/' + file + '.css', lessStyle = document.createElement('style'), cssLink = document.createElement('link'), lessText = '@import "' + lessPath + '";'; lessStyle.type = 'text/less'; lessStyle.id = file; lessStyle.href = file; if (lessStyle.styleSheet) { lessStyle.styleSheet.cssText = lessText; } else { lessStyle.innerHTML = lessText; } cssLink.rel = 'stylesheet'; cssLink.type = 'text/css'; cssLink.href = cssPath; cssLink.id = 'expected-' + file; var head = document.getElementsByTagName('head')[0]; head.appendChild(lessStyle); head.appendChild(cssLink); testSheets[i] = lessStyle; }v1.6.3~dfsg/test/browser/runner-legacy-spec.js0000644000000000000000000000012212275460205020152 0ustar rootrootdescribe("less.js legacy tests", function() { testLessEqualsInDocument(); }); v1.6.3~dfsg/test/browser/runner-relative-urls-options.js0000644000000000000000000000005212275460205022247 0ustar rootrootvar less = {}; less.relativeUrls = true; v1.6.3~dfsg/test/browser/runner-no-js-errors-options.js0000644000000000000000000000011112275460205022005 0ustar rootrootvar less = {}; less.strictUnits = true; less.javascriptEnabled = false; v1.6.3~dfsg/test/browser/css/0000755000000000000000000000000012275460205014706 5ustar rootrootv1.6.3~dfsg/test/browser/css/modify-vars/0000755000000000000000000000000012275460205017146 5ustar rootrootv1.6.3~dfsg/test/browser/css/modify-vars/simple.css0000644000000000000000000000014612275460205021152 0ustar rootroot.testisimported { color: gainsboro; } .test { color1: #008000; color2: #800080; scalar: 20; } v1.6.3~dfsg/test/browser/css/global-vars/0000755000000000000000000000000012275460205017117 5ustar rootrootv1.6.3~dfsg/test/browser/css/global-vars/simple.css0000644000000000000000000000003412275460205021117 0ustar rootroot.test { color: #ff0000; } v1.6.3~dfsg/test/browser/css/relative-urls/0000755000000000000000000000000012275460205017504 5ustar rootrootv1.6.3~dfsg/test/browser/css/relative-urls/urls.css0000644000000000000000000000304612275460205021206 0ustar rootroot@import "http://localhost:8081/test/browser/less/imports/modify-this.css"; @import "http://localhost:8081/test/browser/less/imports/modify-again.css"; .modify { my-url: url("http://localhost:8081/test/browser/less/imports/a.png"); } .modify { my-url: url("http://localhost:8081/test/browser/less/imports/b.png"); } @font-face { src: url("/fonts/garamond-pro.ttf"); src: local(Futura-Medium), url(http://localhost:8081/test/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/test/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, '); } .comma-delimited { background: url(http://localhost:8081/test/browser/less/relative-urls/bg.jpg) no-repeat, url(http://localhost:8081/test/browser/less/relative-urls/bg.png) repeat-x top left, url(http://localhost:8081/test/browser/less/relative-urls/bg); } .values { url: url('http://localhost:8081/test/browser/less/relative-urls/Trebuchet'); } v1.6.3~dfsg/test/browser/css/rootpath-relative/0000755000000000000000000000000012275460205020357 5ustar rootrootv1.6.3~dfsg/test/browser/css/rootpath-relative/urls.css0000644000000000000000000000267412275460205022067 0ustar rootroot@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, '); } .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'); } v1.6.3~dfsg/test/browser/css/urls.css0000644000000000000000000000642112275460205016410 0ustar rootroot@import "http://localhost:8081/test/browser/less/modify-this.css"; @import "http://localhost:8081/test/browser/less/modify-again.css"; .modify { my-url: url("http://localhost:8081/test/browser/less/a.png"); } .modify { my-url: url("http://localhost:8081/test/browser/less/b.png"); } @font-face { src: url("/fonts/garamond-pro.ttf"); src: local(Futura-Medium), url(http://localhost:8081/test/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/test/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, '); } .comma-delimited { background: url(http://localhost:8081/test/browser/less/bg.jpg) no-repeat, url(http://localhost:8081/test/browser/less/bg.png) repeat-x top left, url(http://localhost:8081/test/browser/less/bg); } .values { url: url('http://localhost:8081/test/browser/less/Trebuchet'); } #data-uri { uri: url('http://localhost:8081/test/data/image.jpg'); } #data-uri-guess { uri: url('http://localhost:8081/test/data/image.jpg'); } #data-uri-ascii { uri-1: url('http://localhost:8081/test/data/page.html'); uri-2: url('http://localhost:8081/test/data/page.html'); } #data-uri-toobig { uri: url('http://localhost:8081/test/data/data-uri-fail.png'); } #svg-functions { background-image: url('data:image/svg+xml,'); background-image: url('data:image/svg+xml,'); background-image: url('data:image/svg+xml,'); } v1.6.3~dfsg/test/browser/css/rootpath/0000755000000000000000000000000012275460205016546 5ustar rootrootv1.6.3~dfsg/test/browser/css/rootpath/urls.css0000644000000000000000000000241012275460205020242 0ustar rootroot@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, '); } .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'); } v1.6.3~dfsg/test/browser/runner-global-vars-options.js0000644000000000000000000000007512275460205021667 0ustar rootrootvar less = {}; less.globalVars = { "@global-var": "red" }; v1.6.3~dfsg/test/browser/es5.js0000644000000000000000000000172212275460205015152 0ustar rootroot/* PhantomJS does not implement bind. this is from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind */ if (!Function.prototype.bind) { Function.prototype.bind = function (oThis) { if (typeof this !== "function") { // closest thing possible to the ECMAScript 5 internal IsCallable function throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); } var aArgs = Array.prototype.slice.call(arguments, 1), fToBind = this, fNOP = function () {}, fBound = function () { return fToBind.apply(this instanceof fNOP && oThis ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments))); }; fNOP.prototype = this.prototype; fBound.prototype = new fNOP(); return fBound; }; }v1.6.3~dfsg/test/browser/runner-rootpath-options.js0000644000000000000000000000007312275460205021314 0ustar rootrootvar less = {}; less.rootpath = "https://www.github.com/"; v1.6.3~dfsg/test/browser/phantom-runner.js0000644000000000000000000001170712275460205017437 0ustar rootrootvar webpage = require('webpage'); var server = require('webserver').create(); var system = require('system'); var fs = require('fs'); var host; var 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("

    File Not Found

    File:" + filename + "

    "); 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); }); }v1.6.3~dfsg/test/browser/test-runner-template.tmpl0000644000000000000000000000320712275460205021115 0ustar rootroot Jasmine Spec Runner <% var generateScriptTags = function(allScripts) { allScripts.forEach(function(script){ %> <% }); }; %> <% scripts.src.forEach(function(fullLessName) { var pathParts = fullLessName.split('/'); var fullCssName = fullLessName.replace(/less/g, 'css'); var lessName = pathParts[pathParts.length - 1]; var name = lessName.split('.')[0]; %> <% }); %> <% css.forEach(function(style){ %> <% }) %> <% generateScriptTags([].concat(scripts.polyfills, scripts.jasmine)); %> <% generateScriptTags(scripts.helpers); %> <% generateScriptTags(scripts.vendor); %> <% generateScriptTags(scripts.specs); %> <% generateScriptTags([].concat(scripts.reporters, scripts.start)); %> v1.6.3~dfsg/test/browser/runner-main-spec.js0000644000000000000000000000012012275460205017630 0ustar rootrootdescribe("less.js main tests", function() { testLessEqualsInDocument(); }); v1.6.3~dfsg/test/browser/runner-rootpath-relative-spec.js0000644000000000000000000000016012275460205022361 0ustar rootrootdescribe("less.js browser test - rootpath and relative url's", function() { testLessEqualsInDocument(); }); v1.6.3~dfsg/test/css/0000755000000000000000000000000012275460205013223 5ustar rootrootv1.6.3~dfsg/test/css/compression/0000755000000000000000000000000012275460205015564 5ustar rootrootv1.6.3~dfsg/test/css/compression/compression.css0000644000000000000000000000062212275460205020637 0ustar rootroot#colours{color1:#fea;color2:#fea;color3:rgba(255,238,170,0.1);string:"#ffeeaa";/*! but not this type Note preserved whitespace */}dimensions{val:.1px;val:0;val:4cm;val:.2;val:5;angles-must-have-unit:0deg;durations-must-have-unit:0s;length-doesnt-have-unit:0;width:auto\9}@page{marks:none;@top-left-corner{vertical-align:top}@top-left{vertical-align:top}}.shadow^.dom,body^^.shadow{display:done}v1.6.3~dfsg/test/css/modifyVars/0000755000000000000000000000000012275460205015346 5ustar rootrootv1.6.3~dfsg/test/css/modifyVars/extended.css0000644000000000000000000000017612275460205017664 0ustar rootroot#header { color: #333333; border-left: 1px; border-right: 2px; } #footer { color: #114411; border-color: #842210; } v1.6.3~dfsg/test/css/import.css0000644000000000000000000000120012275460205015240 0ustar rootroot@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; } } v1.6.3~dfsg/test/css/extend-nest.css0000644000000000000000000000535412275460205016202 0ustar rootroot.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; } v1.6.3~dfsg/test/css/mixins-interpolated.css0000644000000000000000000000052312275460205017734 0ustar rootroot.foo { a: 1; } .foo { a: 2; } #foo { a: 3; } #foo { a: 4; } mi-test-a { a: 1; a: 2; a: 3; a: 4; } .b .bb.foo-xxx .yyy-foo#foo .foo.bbb { b: 1; } mi-test-b { b: 1; } #foo-foo > .bar .baz { c: c; } mi-test-c-1 > .bar .baz { c: c; } mi-test-c-2 .baz { c: c; } mi-test-c-3 { c: c; } mi-test-d { gender: "Male"; } v1.6.3~dfsg/test/css/debug/0000755000000000000000000000000012275460205014311 5ustar rootrootv1.6.3~dfsg/test/css/debug/linenumbers-all.css0000644000000000000000000000315612275460205020121 0ustar rootroot@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; } /* line 27, {path}linenumbers.less */ @media -sass-debug-info{filename{font-family:file\:\/\/{pathesc}linenumbers\.less}line{font-family:\0000327}} .test { color: red; width: 2; } v1.6.3~dfsg/test/css/debug/linenumbers-comments.css0000644000000000000000000000122512275460205021171 0ustar rootroot@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; } /* line 27, {path}linenumbers.less */ .test { color: red; width: 2; } v1.6.3~dfsg/test/css/debug/linenumbers-mediaquery.css0000644000000000000000000000243512275460205021515 0ustar rootroot@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; } @media -sass-debug-info{filename{font-family:file\:\/\/{pathesc}linenumbers\.less}line{font-family:\0000327}} .test { color: red; width: 2; } v1.6.3~dfsg/test/css/mixins.css0000644000000000000000000000352012275460205015244 0ustar rootroot.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; } .amp.support .higher { top: 0px; } .amp.support.deeper { height: auto; } .extended { width: 100%; border: 1px; background: none; color: orange; top: 0px; height: auto; } .extended .higher { top: 0px; } .extended.deeper { height: auto; } .do .re .mi .fa .sol .la .si { color: cyan; } .mutli-selector-parents { color: cyan; } .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; } v1.6.3~dfsg/test/css/css-3.css0000644000000000000000000000404612275460205014671 0ustar rootroot.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(0deg); } @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; } .upper-test { UpperCaseProperties: allowed; } @host { div { display: block; } } ::distributed(input::placeholder) { color: #b3b3b3; } .shadow ^ .dom, body ^^ .shadow { display: done; } v1.6.3~dfsg/test/css/rulesets.css0000644000000000000000000000177312275460205015613 0ustar rootroot#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; } v1.6.3~dfsg/test/css/mixins-important.css0000644000000000000000000000124612275460205017262 0ustar rootroot.class { border: 1; boxer: 1; border-width: 1; border: 2 !important; boxer: 2 !important; border-width: 2 !important; border: 3; boxer: 3; border-width: 3; border: 4 !important; boxer: 4 !important; border-width: 4 !important; border: 5; boxer: 5; border-width: 5; border: 0 !important; boxer: 0 !important; border-width: 0 !important; border: 9 !important; border: 9; boxer: 9; border-width: 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; } v1.6.3~dfsg/test/css/extend-clearfix.css0000644000000000000000000000027612275460205017024 0ustar rootroot.clearfix, .foo, .bar { *zoom: 1; } .clearfix:after, .foo:after, .bar:after { content: ''; display: block; clear: both; height: 0; } .foo { color: red; } .bar { color: blue; } v1.6.3~dfsg/test/css/import-once.css0000644000000000000000000000020612275460205016167 0ustar rootroot#import { color: #ff0000; } body { width: 100%; } .test-f { height: 10px; } body { width: 100%; } .test-f { height: 10px; } v1.6.3~dfsg/test/css/mixins-closure.css0000644000000000000000000000013112275460205016711 0ustar rootroot.class { width: 99px; } .overwrite { width: 99px; } .nested .class { width: 5px; } v1.6.3~dfsg/test/css/mixins-guards-default-func.css0000644000000000000000000000363112275460205021105 0ustar rootrootguard-default-basic-1-1 { case: 1; } guard-default-basic-1-2 { default: 2; } guard-default-basic-2-0 { default: 0; } guard-default-basic-2-2 { case: 2; } guard-default-basic-3-0 { default: 0; } guard-default-basic-3-2 { case: 2; } guard-default-basic-3-3 { case: 3; } guard-default-definition-order-0 { default: 0; } guard-default-definition-order-2 { case: 2; } guard-default-definition-order-2 { case: 3; } guard-default-out-of-guard-0 { case-0: default(); case-1: 1; default: 2; case-2: default(); } guard-default-out-of-guard-1 { default: default(); } guard-default-out-of-guard-2 { default: default(); } guard-default-expr-not-1 { case: 1; default: 1; } guard-default-expr-eq-true { case: true; } guard-default-expr-eq-false { case: false; default: false; } guard-default-expr-or-1 { case: 1; } guard-default-expr-or-2 { case: 2; default: 2; } guard-default-expr-or-3 { default: 3; } guard-default-expr-and-1 { case: 1; } guard-default-expr-and-2 { case: 2; } guard-default-expr-and-3 { default: 3; } guard-default-expr-always-1 { case: 1; default: 1; } guard-default-expr-always-2 { default: 2; } guard-default-expr-never-1 { case: 1; } guard-default-multi-1-0 { case: 0; } guard-default-multi-1-1 { default-1: 1; } guard-default-multi-2-1 { default-1: no; } guard-default-multi-2-2 { default-2: no; } guard-default-multi-2-3 { default-3: 3; } guard-default-multi-3-blue { case-2: #00008b; } guard-default-multi-3-green { default-color: #008000; } guard-default-multi-3-foo { case-1: I am 'foo'; } guard-default-multi-3-baz { default-string: I am 'baz'; } guard-default-multi-4 { always: 1; always: 2; case: 2; } guard-default-not-ambiguos-2 { case: 1; not-default: 2; } guard-default-not-ambiguos-3 { case: 1; not-default-1: 2; not-default-2: 2; } guard-default-scopes-3 { 3: when default; } guard-default-scopes-1 { 1: no condition; } v1.6.3~dfsg/test/css/css.css0000644000000000000000000000247212275460205014532 0ustar rootroot@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; } v1.6.3~dfsg/test/css/no-output.css0000644000000000000000000000000012275460205015675 0ustar rootrootv1.6.3~dfsg/test/css/scope.css0000644000000000000000000000077012275460205015052 0ustar rootroot.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'; } v1.6.3~dfsg/test/css/css-guards.css0000644000000000000000000000067212275460205016015 0ustar rootroot.light { color: green; } .see-the { color: green; } .hide-the { color: green; } .multiple-conditions-1 { color: red; } .inheritance .test { color: black; } .inheritance:hover { color: pink; } .clsWithGuard { dispaly: none; } .dont-split-me-up { width: 1px; color: red; height: 1px; } + .dont-split-me-up { sibling: true; } .scope-check { sub-prop: 2px; prop: 1px; } .scope-check-2 { sub-prop: 2px; prop: 1px; } v1.6.3~dfsg/test/css/javascript.css0000644000000000000000000000041512275460205016103 0ustar rootroot.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"; } v1.6.3~dfsg/test/css/parens.css0000644000000000000000000000133412275460205015226 0ustar rootroot.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; } .test-false-negatives { a: (; } v1.6.3~dfsg/test/css/static-urls/0000755000000000000000000000000012275460205015475 5ustar rootrootv1.6.3~dfsg/test/css/static-urls/urls.css0000644000000000000000000000256312275460205017202 0ustar rootroot@import "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, '); } .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('assets/logo.png'); } @font-face { font-family: xecret; src: url('assets/xecret.ttf'); } #secret { font-family: xecret, sans-serif; } #imported-relative-path { background-image: url(../data/image.jpg); border-image: url('../data/image.jpg'); } v1.6.3~dfsg/test/css/comments.css0000644000000000000000000000177212275460205015571 0ustar rootroot/******************\ * * * 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, .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; } #last { color: #0000ff; } /* */ /* { */ /* */ /* */ /* */ #div { color: #A33; } /* } */ v1.6.3~dfsg/test/css/functions.css0000644000000000000000000000551212275460205015750 0ustar rootroot#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%); saturate-filter: saturate(5%); 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.14159265; mod: 2m; abs: 4%; tan: 0.90040404; sin: 0.17364818; cos: 0.84385396; atan: 0.1rad; atan: 34deg; atan: 45deg; pow: 64px; pow: 64; pow: 27; min: 0; min: min("junk", 5); min: 3pt; max: 3; max: max(8%, 1cm); percentage: 20%; color: #ff0011; tint: #898989; tint-full: #ffffff; tint-percent: #898989; tint-negative: #656565; shade: #686868; shade-full: #000000; shade-percent: #686868; shade-negative: #868686; fade-out: rgba(255, 0, 0, 0.95); fade-in: rgba(255, 0, 0, 0.95); hsv: #4d2926; hsva: rgba(77, 40, 38, 0.2); mix: #ff3300; mix-0: #ffff00; mix-100: #ff0000; mix-weightless: #ff8000; mixt: rgba(255, 0, 0, 0.5); } #built-in .is-a { color: true; color1: true; color2: true; color3: true; keyword: true; number: true; string: true; pixel: true; percent: true; em: true; cat: true; } #alpha { alpha: rgba(153, 94, 51, 0.6); alpha2: 0.5; alpha3: 0; } #blendmodes { multiply: #ed0000; screen: #f600f6; overlay: #ed0000; softlight: #fa0000; hardlight: #0000ed; difference: #f600f6; exclusion: #f600f6; average: #7b007b; negation: #d73131; } #extract-and-length { extract: 3 2 1 C B A; length: 6; } v1.6.3~dfsg/test/css/operations.css0000644000000000000000000000127012275460205016120 0ustar rootroot#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; } v1.6.3~dfsg/test/css/selectors.css0000644000000000000000000000435312275460205015745 0ustar rootrooth1 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=10%], [prop="value3"], [prop*="val3"], [|prop~="val3"], [*|prop$="val3"], [ns|prop^="val3"], [3^="val3"], [3=3], [3] { attributes: yes; } /* Large comment means chunk will be emitted after } which means chunk will begin with whitespace... blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank */ .blood { color: red; } v1.6.3~dfsg/test/css/import-reference.css0000644000000000000000000000127712275460205017212 0ustar rootroot/* The media statement above is invalid (no selector) We should ban invalid media queries with properties and no selector? */ .visible { color: red; } .visible .c { color: green; } .visible { color: green; } .visible:hover { color: green; } .only-with-visible + .visible, .visible + .only-with-visible, .visible + .visible { color: green; } .only-with-visible + .visible .sub, .visible + .only-with-visible .sub, .visible + .visible .sub { color: green; } .b { color: red; color: green; } .b .c { color: green; } .b:hover { color: green; } .b + .b { color: green; } .b + .b .sub { color: green; } .y { pulled-in: yes; } /* comment pulled in */ .visible { extend: test; } v1.6.3~dfsg/test/css/extend.css0000644000000000000000000000154412275460205015230 0ustar rootroot.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; } v1.6.3~dfsg/test/css/empty.css0000644000000000000000000000000012275460205015061 0ustar rootrootv1.6.3~dfsg/test/css/whitespace.css0000644000000000000000000000104012275460205016064 0ustar rootroot.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; } v1.6.3~dfsg/test/css/strings.css0000644000000000000000000000156412275460205015434 0ustar rootroot#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; } .watermark { family: Univers, Arial, Verdana, San-Serif; } v1.6.3~dfsg/test/css/mixins-named-args.css0000644000000000000000000000054412275460205017263 0ustar rootroot.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; } v1.6.3~dfsg/test/css/property-name-interp.css0000644000000000000000000000077312275460205020045 0ustar rootrootpi-test { border: 0; ufo-width: 50%; *-z-border: 1px dashed blue; -www-border-top: 2px; radius-is-not-a-border: true; border-top-left-radius: 2em; border-top-red-radius-: 3pt; global-local-mixer-property: strong; } pi-test-merge { pre-property-ish: high, middle, low, base; pre-property-ish+: nice try dude; } pi-indirect-vars { auto: auto; } pi-complex-values { 3px rgba(255, 255, 0, 0.5), 3.141592653589793 /* foo */3px rgba(255, 255, 0, 0.5), 3.141592653589793 /* foo */: none; } v1.6.3~dfsg/test/css/mixins-pattern.css0000644000000000000000000000074712275460205016727 0ustar rootroot.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; } v1.6.3~dfsg/test/css/merge.css0000644000000000000000000000077412275460205015044 0ustar rootroot.test1 { transform: rotate(90deg), skew(30deg), scale(2, 4); } .test2 { transform: rotate(90deg), skew(30deg); transform: scaleX(45deg); } .test3 { transform: scaleX(45deg); background: url(data://img1.png); } .test4 { transform: rotate(90deg), skew(30deg); transform: scale(2, 4) !important; } .test5 { transform: rotate(90deg), skew(30deg); transform: scale(2, 4) !important; } .test6 { transform: scale(2, 4); } .test-interleaved { transform: t1, t2, t3; background: b1, b2, b3; } v1.6.3~dfsg/test/css/extend-chaining.css0000644000000000000000000000107112275460205017001 0ustar rootroot.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; } .va, .vb, .vc { color: black; } .vb, .vc { color: white; } @media tv { .ma, .mb, .mc { color: black; } .md, .ma, .mb, .mc { color: white; } } @media tv and plasma { .me, .mf { background: red; } } v1.6.3~dfsg/test/css/extend-exact.css0000644000000000000000000000072412275460205016331 0ustar rootroot.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; } v1.6.3~dfsg/test/css/extract-and-length.css0000644000000000000000000000450112275460205017426 0ustar rootroot.multiunit { length: 6; extract: abc "abc" 1 1px 1% #112233; } .incorrect-index { v1: extract(a b c, 5); v2: extract(a, b, c, -2); } .scalar { var-value: variable; var-length: 1; ill-index: extract(variable, 2); name-value: name; string-value: "string"; number-value: 12345678; color-value: #0000ff; rgba-value: rgba(80, 160, 240, 0.67); empty-value: ; name-length: 1; string-length: 1; number-length: 1; color-length: 1; rgba-length: 1; empty-length: 1; } .mixin-arguments-1 { length: 4; extract: c | b | a; } .mixin-arguments-2 { length: 4; extract: c | b | a; } .mixin-arguments-3 { length: 4; extract: c | b | a; } .mixin-arguments-4 { length: 0; extract: extract(, 2) | extract(, 1); } .mixin-arguments-2 { length: 4; extract: c | b | a; } .mixin-arguments-3 { length: 4; extract: c | b | a; } .mixin-arguments-4 { length: 3; extract: c | b; } .mixin-arguments-2 { length: 4; extract: 3 | 2 | 1; } .mixin-arguments-3 { length: 4; extract: 3 | 2 | 1; } .mixin-arguments-4 { length: 3; extract: 3 | 2; } .md-space-comma { length-1: 3; extract-1: 1 2 3; length-2: 3; extract-2: 2; } .md-space-comma-as-args-2 { length: 3; extract: "x" "y" "z" | 1 2 3 | a b c; } .md-space-comma-as-args-3 { length: 3; extract: "x" "y" "z" | 1 2 3 | a b c; } .md-space-comma-as-args-4 { length: 2; extract: "x" "y" "z" | 1 2 3; } .md-cat-space-comma { length-1: 3; extract-1: 1 2 3; length-2: 3; extract-2: 2; } .md-cat-space-comma-as-args-2 { length: 3; extract: "x" "y" "z" | 1 2 3 | a b c; } .md-cat-space-comma-as-args-3 { length: 3; extract: "x" "y" "z" | 1 2 3 | a b c; } .md-cat-space-comma-as-args-4 { length: 2; extract: "x" "y" "z" | 1 2 3; } .md-cat-comma-space { length-1: 3; extract-1: 1, 2, 3; length-2: 3; extract-2: 2; } .md-cat-comma-space-as-args-1 { length: 3; extract: "x", "y", "z" | 1, 2, 3 | a, b, c; } .md-cat-comma-space-as-args-2 { length: 3; extract: "x", "y", "z" | 1, 2, 3 | a, b, c; } .md-cat-comma-space-as-args-3 { length: 3; extract: "x", "y", "z" | 1, 2, 3 | a, b, c; } .md-cat-comma-space-as-args-4 { length: 0; extract: extract(, 2) | extract(, 1); } .md-3D { length-1: 2; extract-1: a b c d, 1 2 3 4; length-2: 2; extract-2: 5 6 7 8; length-3: 4; extract-3: 7; length-4: 1; extract-4: 8; } v1.6.3~dfsg/test/css/legacy/0000755000000000000000000000000012275460205014467 5ustar rootrootv1.6.3~dfsg/test/css/legacy/legacy.css0000644000000000000000000000021712275460205016445 0ustar rootroot@media (-o-min-device-pixel-ratio: 2/1) { .test-math-and-units { font: ignores 0/0 rules; test-division: 7em; simple: 2px; } } v1.6.3~dfsg/test/css/extend-selector.css0000644000000000000000000000230012275460205017035 0ustar rootroot.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; } .header .header-nav, .footer .footer-nav { background: red; } .header .header-nav:before, .footer .footer-nav:before { background: blue; } v1.6.3~dfsg/test/css/import-interpolation.css0000644000000000000000000000005412275460205020133 0ustar rootrootbody { width: 100%; } .a { var: test; } v1.6.3~dfsg/test/css/css-escapes.css0000644000000000000000000000064312275460205016151 0ustar rootroot.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; } v1.6.3~dfsg/test/css/mixins-guards.css0000644000000000000000000000231412275460205016527 0ustar rootroot.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; height: lt-or-eq-alias; } .ops2 { height: gt-or-eq; height: not-eq; } .ops3 { height: lt-or-eq; height: lt-or-eq-alias; 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; } .call-lock-mixin .call-inner-lock-mixin { a: 1; x: 1; } v1.6.3~dfsg/test/css/variables.css0000644000000000000000000000144112275460205015705 0ustar rootroot.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; } v1.6.3~dfsg/test/css/urls.css0000644000000000000000000001004012275460205014715 0ustar rootroot@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); background-image: url("http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700"); } #svg-data-uri { background: transparent url('data:image/svg+xml, '); } .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/assets/logo.png'); } @font-face { font-family: xecret; src: url('import/assets/xecret.ttf'); } #secret { font-family: xecret, sans-serif; } #imported-relative-path { background-image: url(../data/image.jpg); border-image: url('../data/image.jpg'); } #relative-url-import { background-image: url(../data/image.jpg); border-image: url('../data/image.jpg'); } #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'); } #svg-functions { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxsaW5lYXJHcmFkaWVudCBpZD0iZ3JhZGllbnQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjwvbGluZWFyR3JhZGllbnQ+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkaWVudCkiIC8+PC9zdmc+'); background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxsaW5lYXJHcmFkaWVudCBpZD0iZ3JhZGllbnQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIvPjxzdG9wIG9mZnNldD0iMyUiIHN0b3AtY29sb3I9IiNmZmE1MDAiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmZmZmZmYiLz48L2xpbmVhckdyYWRpZW50PjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjZ3JhZGllbnQpIiAvPjwvc3ZnPg=='); background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxsaW5lYXJHcmFkaWVudCBpZD0iZ3JhZGllbnQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIxJSIgc3RvcC1jb2xvcj0iI2M0YzRjNCIvPjxzdG9wIG9mZnNldD0iMyUiIHN0b3AtY29sb3I9IiNmZmE1MDAiLz48c3RvcCBvZmZzZXQ9IjUlIiBzdG9wLWNvbG9yPSIjMDA4MDAwIi8+PHN0b3Agb2Zmc2V0PSI5NSUiIHN0b3AtY29sb3I9IiNmZmZmZmYiLz48L2xpbmVhckdyYWRpZW50PjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjZ3JhZGllbnQpIiAvPjwvc3ZnPg=='); } v1.6.3~dfsg/test/css/import-inline.css0000644000000000000000000000012412275460205016520 0ustar rootrootthis isn't very valid CSS. @media (min-width: 600px) { #css { color: yellow; } } v1.6.3~dfsg/test/css/lazy-eval.css0000644000000000000000000000003612275460205015640 0ustar rootroot.lazy-eval { width: 100%; } v1.6.3~dfsg/test/css/url-args/0000755000000000000000000000000012275460205014757 5ustar rootrootv1.6.3~dfsg/test/css/url-args/urls.css0000644000000000000000000000753312275460205016466 0ustar rootroot@font-face { src: url("/fonts/garamond-pro.ttf?424242"); src: local(Futura-Medium), url(fonts.svg?424242#MyGeometricModern) format("svg"); } #shorthands { background: url("http://www.lesscss.org/spec.html?424242") no-repeat 0 4px; background: url("img.jpg?424242") center / 100px; background: #ffffff url(image.png?424242) center / 1px 100px repeat-x scroll content-box padding-box; } #misc { background-image: url(images/image.jpg?424242); } #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&424242); background-image: url("http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700&424242"); } #svg-data-uri { background: transparent url('data:image/svg+xml, '); } .comma-delimited { background: url(bg.jpg?424242) no-repeat, url(bg.png?424242) repeat-x top left, url(bg?424242); } .values { url: url('Trebuchet?424242'); } @font-face { font-family: xecret; src: url('../assets/xecret.ttf?424242'); } #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"); } #svg-functions { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxsaW5lYXJHcmFkaWVudCBpZD0iZ3JhZGllbnQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjwvbGluZWFyR3JhZGllbnQ+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkaWVudCkiIC8+PC9zdmc+'); background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxsaW5lYXJHcmFkaWVudCBpZD0iZ3JhZGllbnQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIvPjxzdG9wIG9mZnNldD0iMyUiIHN0b3AtY29sb3I9IiNmZmE1MDAiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmZmZmZmYiLz48L2xpbmVhckdyYWRpZW50PjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjZ3JhZGllbnQpIiAvPjwvc3ZnPg=='); background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxsaW5lYXJHcmFkaWVudCBpZD0iZ3JhZGllbnQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIxJSIgc3RvcC1jb2xvcj0iI2M0YzRjNCIvPjxzdG9wIG9mZnNldD0iMyUiIHN0b3AtY29sb3I9IiNmZmE1MDAiLz48c3RvcCBvZmZzZXQ9IjUlIiBzdG9wLWNvbG9yPSIjMDA4MDAwIi8+PHN0b3Agb2Zmc2V0PSI5NSUiIHN0b3AtY29sb3I9IiNmZmZmZmYiLz48L2xpbmVhckdyYWRpZW50PjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjZ3JhZGllbnQpIiAvPjwvc3ZnPg=='); } #data-uri-with-spaces { background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==); background-image: url(' data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9=='); } v1.6.3~dfsg/test/css/mixins-args.css0000644000000000000000000000255712275460205016207 0ustar rootroot#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; } v1.6.3~dfsg/test/css/extend-media.css0000644000000000000000000000046612275460205016307 0ustar rootroot.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; } } v1.6.3~dfsg/test/css/globalVars/0000755000000000000000000000000012275460205015317 5ustar rootrootv1.6.3~dfsg/test/css/globalVars/simple.css0000644000000000000000000000005712275460205017324 0ustar rootroot/** * Test */ .class { color: #ff0000; } v1.6.3~dfsg/test/css/globalVars/extended.css0000644000000000000000000000022012275460205017623 0ustar rootroot/** * Test */ #header { color: #333333; border-left: 1px; border-right: 2px; } #footer { color: #114411; border-color: #f20d0d; } v1.6.3~dfsg/test/css/colors.css0000644000000000000000000000212012275460205015231 0ustar rootroot#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; } #overflow .e { color: rgba(0, 31, 255, 0.42); } #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; } #percentage { color: 255; border-color: rgba(255, 0, 0, 0.5); } v1.6.3~dfsg/test/css/mixins-nested.css0000644000000000000000000000027312275460205016526 0ustar rootroot.class .inner { height: 300; } .class .inner .innest { width: 30; border-width: 60; } .class2 .inner { height: 600; } .class2 .inner .innest { width: 60; border-width: 120; } v1.6.3~dfsg/test/css/media.css0000644000000000000000000000627512275460205015026 0ustar rootroot@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 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) { body { 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; } } @media (min-width: 480px) { .nav-justified > li { display: table-cell; } } @media (min-width: 768px) and (min-width: 480px) { .menu > li { display: table-cell; } } @media all and tv { .all-and-tv-variables { var: all-and-tv; } } v1.6.3~dfsg/test/css/charsets.css0000644000000000000000000000002212275460205015543 0ustar rootroot@charset "UTF-8"; v1.6.3~dfsg/test/css/ie-filters.css0000644000000000000000000000061012275460205015775 0ustar rootroot.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); } v1.6.3~dfsg/test/index.js0000644000000000000000000000456312275460205014110 0ustar rootrootvar lessTest = require("./less-test"), lessTester = lessTest(), path = require("path"), stylize = require('../lib/less/lessc_helper').stylize; function getErrorPathReplacementFunction(dir) { return function(input) { return input.replace( "{path}", path.join(process.cwd(), "/test/less/" + dir + "/")) .replace("{pathrel}", path.join("test", "less", dir + "/")) .replace("{pathhref}", "") .replace("{404status}", "") .replace(/\r\n/g, '\n'); }; } console.log("\n" + stylize("LESS", 'underline') + "\n"); lessTester.runTestSet({strictMath: true, relativeUrls: true, silent: true}); lessTester.runTestSet({strictMath: true, strictUnits: true}, "errors/", lessTester.testErrors, null, getErrorPathReplacementFunction("errors")); lessTester.runTestSet({strictMath: true, strictUnits: true, javascriptEnabled: false}, "no-js-errors/", lessTester.testErrors, null, getErrorPathReplacementFunction("no-js-errors")); lessTester.runTestSet({strictMath: true, dumpLineNumbers: 'comments'}, "debug/", null, function(name) { return name + '-comments'; }); lessTester.runTestSet({strictMath: true, dumpLineNumbers: 'mediaquery'}, "debug/", null, function(name) { return name + '-mediaquery'; }); lessTester.runTestSet({strictMath: true, dumpLineNumbers: 'all'}, "debug/", null, function(name) { return name + '-all'; }); lessTester.runTestSet({strictMath: true, relativeUrls: false, rootpath: "folder (1)/"}, "static-urls/"); lessTester.runTestSet({strictMath: true, compress: true}, "compression/"); lessTester.runTestSet({}, "legacy/"); lessTester.runTestSet({strictMath: true, strictUnits: true, sourceMap: true, globalVars: true }, "sourcemaps/", lessTester.testSourcemap, null, null, function(filename, type) { if (type === "vars") { return path.join('test/less/', filename) + '.json'; } return path.join('test/sourcemaps', filename) + '.json'; }); lessTester.runTestSet({globalVars: true, banner: "/**\n * Test\n */\n"}, "globalVars/", null, null, null, function(name) { return path.join('test/less/', name) + '.json'; }); lessTester.runTestSet({modifyVars: true}, "modifyVars/", null, null, null, function(name) { return path.join('test/less/', name) + '.json'; }); lessTester.runTestSet({urlArgs: '424242'}, "url-args/"); lessTester.testNoOptions(); v1.6.3~dfsg/.jshintrc0000644000000000000000000000026512275460205013304 0ustar rootroot{ "evil": true, "laxbreak": true, "latedef": true, "node": true, "undef": true, "unused": "vars", "noarg": true, "eqnull": true, "forin": true }