Comparing version 2.5.0 to 2.5.1
{ | ||
"name": "less", | ||
"version": "2.5.0", | ||
"version": "2.5.1", | ||
"main": "dist/less.js", | ||
@@ -5,0 +5,0 @@ "ignore": [ |
@@ -0,1 +1,9 @@ | ||
# 2.5.1 | ||
2015-05-21 | ||
- Fix problems with less being async in some browsers | ||
- Minor fix only likely to affect programmatic usage of ruleset find | ||
- Fix error when a namespaced mixin is invoked in global scope | ||
# 2.5.0 | ||
@@ -7,3 +15,3 @@ | ||
- All directives are bubbled (e.g. supports), not just media | ||
- Performance improvements to the parser - should help non-chrome browsers with very large less files to be alot quicker. | ||
- Performance improvements to the parser - should help non-chrome browsers with very large less files to be a lot quicker. | ||
- the image size function respects include paths like other file functions | ||
@@ -18,3 +26,3 @@ - colour functions take a relative argument that applies percentages relatively instead of absolutely | ||
- detached rulesets can be used as default arguments | ||
- Fix alot of false warnings about extends | ||
- Fix a lot of false warnings about extends | ||
- errors written to stderr more consistently | ||
@@ -31,3 +39,3 @@ - consistently keep units if strict units is off | ||
- Extract and Length functions now ignore comments in a list (more work to come to fix the general problem) | ||
- fragment url's are treated absolute since they refer to the html document | ||
- fragment urls are treated absolute since they refer to the html document | ||
- Extends on a selector joined with `&` now work better | ||
@@ -50,3 +58,3 @@ - Nested mixins work better with !important (regression in 2.3.0) | ||
- add isruleset function | ||
- add `isruleset` function | ||
- add optional import option, causing less to not fail if file not found | ||
@@ -75,3 +83,3 @@ - Fix browsers-side cache. | ||
- if you are outputting to the console, lessc defaults to silent so warnings do not end up in output | ||
- isunit function supports '' to test if a dimension has no unit | ||
- `isunit` function supports `''` to test if a dimension has no unit | ||
- data-uri function now counts characters after base64 encoding instead of bytes before encoding to determine ie8 support | ||
@@ -81,3 +89,3 @@ - fix bug effecting guards on pseudo class selectors | ||
- detection if less does not parse last character in file | ||
- detection of whether a file is css now requires /css, .css, ?css, &css instead of just css. You can still tell less the type of file using import options. | ||
- detection of whether a file is css now requires `/css`, `.css`, `?css`, `&css` instead of just `css`. You can still tell less the type of file using import options. | ||
- remove extra new line added to sourcemap entry inline file | ||
@@ -99,3 +107,3 @@ - support safari extension | ||
- Improved keyword and anonymous usage with the replace function | ||
- Added getCSSAppendage to sourcemap builder to avoid duplication in plugins | ||
- Added `getCSSAppendage` to sourcemap builder to avoid duplication in plugins | ||
- Fix problem with plugins when used with the promises version of render | ||
@@ -108,3 +116,3 @@ - If the render callback throws an exception it now propogates instead of calling the callback again with an error | ||
- Fixed isSync option, it was using sync file operations but promises are guaranteed to call back async. We now support promises as a feature rather than the 1st class way of doing things. | ||
- Fixed `isSync` option, it was using sync file operations but promises are guaranteed to call back async. We now support promises as a feature rather than the 1st class way of doing things. | ||
- Browser code is now synchronous again, like in v1, meaning it blocks the site until less is compiled | ||
@@ -129,3 +137,3 @@ - Some fixes for variable imports which affected filemanagers when synchronous | ||
- fixed some local variable spellings | ||
- support for @counter-style directive | ||
- support for `@counter-style` directive | ||
@@ -139,3 +147,3 @@ # 2.0.0-b3 | ||
- browser can now be scoped with just window | ||
- browser useFileCache defaults to true, but file cache is now cleared when refreshing or in watch mode | ||
- browser `useFileCache` defaults to `true`, but file cache is now cleared when refreshing or in watch mode | ||
@@ -142,0 +150,0 @@ # 2.0.0-b2 |
@@ -16,2 +16,4 @@ /** | ||
window.less = less; | ||
if (options.onReady) { | ||
@@ -22,7 +24,4 @@ if (/!watch/.test(window.location.hash)) { | ||
less.pageLoadFinished = less.registerStylesheets().then( | ||
function () { | ||
return less.refresh(less.env === 'development'); | ||
} | ||
); | ||
} | ||
less.registerStylesheetsImmediately(); | ||
less.pageLoadFinished = less.refresh(less.env === 'development'); | ||
} |
@@ -190,16 +190,24 @@ // | ||
// | ||
// Get all <link> tags with the 'rel' attribute set to "stylesheet/less" | ||
// Synchronously get all <link> tags with the 'rel' attribute set to | ||
// "stylesheet/less". | ||
// | ||
less.registerStylesheets = function() { | ||
return new Promise(function(resolve, reject) { | ||
var links = document.getElementsByTagName('link'); | ||
less.sheets = []; | ||
less.registerStylesheetsImmediately = function() { | ||
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]); | ||
} | ||
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]); | ||
} | ||
} | ||
}; | ||
// | ||
// Asynchronously get all <link> tags with the 'rel' attribute set to | ||
// "stylesheet/less", returning a Promise. | ||
// | ||
less.registerStylesheets = function() { | ||
return new Promise(function(resolve, reject) { | ||
less.registerStylesheetsImmediately(); | ||
resolve(); | ||
@@ -206,0 +214,0 @@ }); |
@@ -5,3 +5,3 @@ module.exports = function(environment, fileManagers) { | ||
var less = { | ||
version: [2, 5, 0], | ||
version: [2, 5, 1], | ||
data: require('./data'), | ||
@@ -8,0 +8,0 @@ tree: require('./tree'), |
@@ -155,3 +155,3 @@ var Selector = require("./selector"), | ||
new contexts.Eval(context, this.frames ? this.frames.concat(context.frames) : context.frames), args, [])] | ||
.concat(this.frames) // the parent namespace/mixin frames | ||
.concat(this.frames || []) // the parent namespace/mixin frames | ||
.concat(context.frames)))) { // the current environment frames | ||
@@ -158,0 +158,0 @@ return false; |
@@ -258,3 +258,3 @@ var Node = require("./node"), | ||
Ruleset.prototype.rulesets = function () { | ||
if (!this.rules) { return null; } | ||
if (!this.rules) { return []; } | ||
@@ -261,0 +261,0 @@ var filtRules = [], rules = this.rules, cnt = rules.length, |
{ | ||
"name": "less", | ||
"version": "2.5.0", | ||
"version": "2.5.1", | ||
"description": "Leaner CSS", | ||
@@ -20,8 +20,3 @@ "homepage": "http://lesscss.org", | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "Apache v2", | ||
"url": "https://github.com/less/less.js/blob/master/LICENSE" | ||
} | ||
], | ||
"license": "Apache-2.0", | ||
"bin": { | ||
@@ -28,0 +23,0 @@ "lessc": "./bin/lessc" |
@@ -7,2 +7,4 @@ [![npm version](https://badge.fury.io/js/less.svg)](http://badge.fury.io/js/less) [![Build Status](https://travis-ci.org/less/less.js.svg?branch=master)](https://travis-ci.org/less/less.js) | ||
[![Join the chat at https://gitter.im/less/less.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/less/less.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
> The **dynamic** stylesheet language. [http://lesscss.org](http://lesscss.org). | ||
@@ -9,0 +11,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26895
57
1585361
745