less.js

Less. The dynamic stylesheet language.

APACHE-2.0 License

Downloads
23.8M
Stars
17K
Committers
284

Bot releases are hidden (Show)

less.js - v4.2.0 Latest Release

Published by iChenLei about 1 year ago

  • #3811 add support for container queries (@puckowski)
  • #3761 fix faulty source map generation with variables in selectors, fixes #3567 (@pgoldberg)
  • #3700 parsing variables fail when there is no trailing semicolon (@b-kelly)
  • #3719 modify this pointer so that it is not empty. (@lumburr)
  • #3649 fixes #2991 empty @media queries generated when compiling less file with (reference) to bootstrap (@MoonCoral)
less.js - v4.1.3

Published by iChenLei over 2 years ago

  • #3673 Feat: add support for case-insensitive attribute selectors (#3673) (@iChenLei)
  • #3710 Feat: add disablePluginRule flag for render() options (#3710) (@broofa @edhgoose)
  • #3656 Fix #3655 for param tag is null (#3658) (@langren1353)
  • #3658 Fix #3646 forcefully change unsupported input to strings (#3658) (@gzb1128)
  • #3668 Fix change keyword plugin and import regexp (#3668) (@iChenLei)
  • #3613 Fix #3591: refactor debugInfo from class to function (#3613) (@drdevlin)
  • #3716 Fix https failures on macOS (#3716) (@joeyparrish)
less.js - v4.1.2

Published by iChenLei about 3 years ago

  • #3602 Fix currentFileInfo and index properties on nodes (#3602) (@bjpbakker)
  • #3626 Fix #3616 IfStatement requires double parentheses when dividing (#3626) (@iChenLei)
  • #3630 Fix needle dependency warning typo. (#3630) (@cjwilsontech)
less.js -

Published by matthew-dean over 3 years ago

  • #3597 Fix expected response when there's a socket error (#3597) (@zxfrank)
  • #3589 Fixes #3586 (#3589) (@matthew-dean)
less.js -

Published by matthew-dean almost 4 years ago

Mixin parentheses requirement removed

This was maybe too big a change without some kind of deprecation or conversion.
So for this version, this works again:

.mixin;
  • #3582 Fix #3576 import redirects. Replace native-request with needle. (#3582) (@zaquest)
  • #3583 Update rollup and other build dependencies (#3583) (@pravi)
  • #3588 Roll back paren requirement on mixin calls (#3588) (@matthew-dean)
less.js -

Published by matthew-dean almost 4 years ago

This release has 2 breaking changes:

Parentheses required for mixin calls

This aligns it with syntax for calling detached rulesets.

Example

.mixin() {}
.mixin;  // error in 4.0

Parens-division now the default math setting

Parentheses are required (by default) around division-like expressions, to force math evaluation.

Example:

@ratio_large: 16;
@ratio_small: 9;

/** The following will produce `device-aspect-ratio: 1.77777778` by default in 3.x */
@media all and (device-aspect-ratio: @ratio_large / @ratio_small) {
   .body { max-width: 800px; }
}

Produces:

@media all and (device-aspect-ratio: 16 / 9) {
  .body {
    max-width: 800px;
  }
}

You can, of course, get old math behavior. See: http://lesscss.org/usage/#less-options-math

What's New

  • min() / max() functions can pass-through if it cannot be evaluated in Less
  • isdefined() can be used to test if variables are defined (e.g. isdefined(@unknown))
  • New rgb color syntax supported (e.g. rgb(0 128 255 / 50%))
less.js -

Published by seven-phases-max over 7 years ago

less.js - 2.4.0

Published by lukeapage over 9 years ago

  • Support for plugins that pre-process (to add libraries silently etc.)
  • Empty sourcemaps now work
  • Extract and Length functions now ignore comments in a list (more work to come to fix the general problem)
  • fragment urls are treated absolute since they refer to the html document
  • Extends on a selector joined with & now work better
  • Nested mixins work better with !important (regression in 2.3.0)
  • The promise dependency is now actually optional (introduced in 2.0.0)
  • Files with just \r newlines now process ok (regression in 2.0.0)
  • When strict units is off and the unit is 1/x, (e.g. 1 / 12px) the unit output is x, previously nothing (regression in 2.0.0)
less.js - 2.5.0

Published by lukeapage over 9 years ago

  • supports the scoped @plugin directive to load function plugins
  • 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 a lot quicker.
  • the image size function respects include paths like other file functions
  • colour functions take a relative argument that applies percentages relatively instead of absolutely
  • include paths now allows : as a separator on windows (recognising and not splitting drive names by the backslash)
  • @import (css) does not pull the directive above comments
  • Fix for import statements without quotes sometimes causing issues
  • replace supports dimensions and colours
  • the browser field is set in the package.json for use with browserify
  • another fix to support paths being passed as a string instead of an array
  • detached rulesets can be used as default arguments
  • Fix a lot of false warnings about extends
  • errors written to stderr more consistently
  • consistently keep units if strict units is off
  • Better support for comments in function all arguments
less.js - 2.5.1

Published by lukeapage over 9 years ago

  • 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
less.js - v2.3.1

Published by lukeapage over 9 years ago

  • Fix depends option (regression in 2.3.0)
  • Support parent selector (&) used in sub element expression (e.g. :not(.c_&))
less.js - v2.3.0

Published by lukeapage over 9 years ago

  • add isruleset function
  • add optional import option, causing less to not fail if file not found
  • Fix browsers-side cache.
  • Many fixes to import reference - support @support and keyframe
  • Selectors now interpolate pseudo selectors (e.g. :@{hover})
  • Fix comments missed off if they were at the end of the file
  • Fix !important used with parametric mixins
  • Emits warnings for extends when the target is not found
  • include-path now works on data-uri
  • variables and function calls work for path in data-uri
  • Fix absolute paths not working on imports sometimes.
  • Unicode BOM removed again
  • Misc. bug fixes
less.js - v2.2.0

Published by lukeapage almost 10 years ago

  • do not apply relative paths to svg-gradient and data-uri functions data-uri output
  • using import filename interpolation and import inline together now works
  • deprecate the compression option (still works, but outputs a warning unless silent)
  • The node version of less now has image-size, image-width, image-height which return the image dimensions of a file
  • Fixed an issue that could cause the parse to occur more than once and the callback be called multiple times
  • 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
  • data-uri function now counts characters after base64 encoding instead of bytes before encoding to determine ie8 support
  • fix bug effecting guards on pseudo class selectors
  • do not cache on the browser when used with modifyVars
  • 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.
  • remove extra new line added to sourcemap entry inline file
  • support safari extension
  • less.parse now exposes a way to get the AST. We do not recommend you use this unless you need to.
less.js - v2.1.2

Published by lukeapage almost 10 years ago

  • Fix for use with requirejs
  • Fixes for data-uri function
less.js - v2.1.1

Published by lukeapage almost 10 years ago

  • Improved keyword and anonymous usage with the replace function
  • Added getCSSAppendage to sourcemap builder to avoid duplication in plugins
  • Fix problem with plugins when used with the promises version of render
  • If the render callback throws an exception it now propogates instead of calling the callback again with an error
less.js - 2.1.0

Published by lukeapage almost 10 years ago

  • 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
  • Some fixes for variable imports which affected filemanagers when synchronous
  • Fixed lessc makefile dependencies option
  • output now reports back a imports field with an array of imported files
  • relative path test for drive names (so windows only) is now case insensitive
  • Fix for IE7 - use getChar instead of indexing array
  • variables using !important now output !important, which bubbles up to affect the rule
  • livereload cache buster is now treated specially
  • upgrade dependencies
less.js - v2.0.0

Published by lukeapage almost 10 years ago

  • Fixed multiplication in non strict units mode to take the left operand unit, in the case that the unit cannot be resolved
  • Some fixes for browser cross-compatibility
  • browser tests now pass in IE 8-11 and FF
  • added index.js and browser.js in root as shortcuts
  • fixed some local variable spellings
  • support for @counter-style directive
less.js - v2.0.0-b3

Published by lukeapage almost 10 years ago

some refactoring of browser structure to allow use of api vs normal browser bundle
browser bundle no longer leaks require
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

less.js - v2.0.0-b2

Published by lukeapage almost 10 years ago

Imports are now sequenced and so are consistent (previously some complex projects might end up with occasional different orderings)
Imports with variables are better supported - variables can be specified in sub imports
Support for rebeccapurple
Browser can now accept options as attributes on the script tag and the link tags e.g. <script data-verbose="false" src="less.js"...
adding a .less file extension is done in the abstract file manager so it the behaviour can be overridden by certain file managers
Fixed a bug where unquoted urls beginning // e.g. url(//file/file.less) would be incorrectly interpreted (bug introduced in b-1)
lessc plugins can be a function, used as a constructor as well as an object - this to allow the plugin more flexibility to be used programattically

less.js - v2.0.0-b1

Published by lukeapage almost 10 years ago

Public Beta / Release Candidate - Feedback welcome For a guide to breaking changes see the v2 upgrade guide
no longer including old versions of less in the repo or npm
not including test less and gradle files in npm
colours now output in the format they are added, so yellow will output yellow, not its hex counterpart
better parsing - better comment support and comments in brackets can now contain comments including quotes.
Removal of dependency on clean-css - install less-plugin-clean-css and use --clean-css to reference plugin
Environment Support - less is now separate from its node and browser environment implementations and adding support for another javascript environment should be straight forward.
Plugin Support - it is now straight forward to add AST manipulations (see less-plugin-inline-images), file managers (see less-plugin-npm-import) and post processors (see less-plugin-clean-css and less-plugin-autoprefix).
We now recommend using less.render and using the parser directly is not in the same way as in v2. It is possible but it would require changes and we do not guarantee it will not be broken in minor version releases.
In the browser, less.pageLoadFinished will be a promise, resolved when less has finished its initial processing. less.refresh and less.modifyVars also return promises.
In the browser, as before less is used as options, however this is now copied to less.options if you need to access after less has run
In the browser, the cache can be overwritten by setting less.cache before less loads. After load less.cache will be the default implementation.
less.js now uses browserify to generate its browser side component
default values for the sourcemap options have been re-done and improved to hopefully mean creating sourcemaps is easier
Many smaller bugfixes and API changes. Please let us know if something you relied on has disappeared or an area should be better documented.