130 Commits

Author SHA1 Message Date
Matthew Dean
6c2c0fd9f4 Allow [] to resolve to last declaration's value (#3256) 2018-07-03 23:03:49 -07:00
Matthew Dean
39ef69c6a8 Tests and parser fixes for namespace values in MQ and mixin args (#3254) 2018-07-02 19:44:44 -07:00
Matthew Dean
29468bffcd Bugfix - namespace values (#3251)
* Added more CSS Grid tests
* Added media query example to tests
* Fixed bug where namespace values didn't work in guards and operations
* Fix failing setOptions test
* Update phantomJS, demo more permissive DR tests
* v3.5.0-beta.5
2018-07-01 19:43:24 -07:00
Matthew Dean
6237e13b14 [Feature] Namespaced values (#3242)
* calc() fix - fixes #974
* Parses and retrieves a namespaced value
* Adds a bunch of new tests for aliasing and namespacing
* Added more CSS Grid tests
* Added tests for passing mixins into mixins, since it's just another value
* Release v3.5.0-beta.4
2018-06-30 09:32:02 -07:00
Matthew Dean
566f42862e Fixes #3205, partial 3.0 math regression #1880 (#3228)
* Fixes Mixin call args not being visited
* Add ability to use ES6 in tests
* Fixes #3205 and partial 3.0 math regression #1880
2018-06-26 23:26:01 -07:00
Matthew Dean
b8140d4baa Fixes #1421 - re-parses variable-interpolated elements to selectors (no.2) (#3227)
* Fix element to selector list conversion, passing all tests!
* Add passing test from #3098
* Added passing test example from #1817
* Allow lists to be re-evaluated as selectors (Fixes #1694)
2018-06-25 09:12:34 -07:00
Matthew Dean
7a12d2f675 Fixes #3191 (#3223) 2018-06-24 20:40:29 -07:00
Matthew Dean
42fd7dca20 Release v3.5.0 beta (#3230)
* Lint cleanup of quotes
* v3.5.0-beta
2018-06-24 20:14:33 -07:00
Matthew Dean
a75f7d9664 Fixes #3147 #2715 (#3213)
* Adds permissive parsing for at-rules and custom properties
* Added error tests for permissive parsing
* Change custom property value to quoted-like value
* Allow interpolation in unknown at-rules
* Allows variables to fallback to permissive parsing
* Allow escaping of blocks
2018-06-21 23:44:38 -07:00
Matthew Dean
85a716c1cf Revert "Fixes #1421 - re-parses variable-interpolated elements to selectors (#3217)"
This reverts commit 23569c98e2.
2018-06-17 16:20:48 -07:00
Matthew Dean
23569c98e2 Fixes #1421 - re-parses variable-interpolated elements to selectors (#3217)
* Adds passing test from #3098
* Added passing test example from #1817
* Allow lists to be re-evaluated as selectors (Fixes #1694)
2018-06-16 11:58:09 -07:00
Matthew Dean
a48c24c4dd calc() fix - fixes #974 (partially #1880) 2018-02-10 16:57:53 -08:00
Matthew Dean
4508495adb Remove legacy upgrade
- Add simple grid syntax support
2018-02-09 19:40:39 -08:00
Matthew Dean
94408424d6 Fixes #3112 for real this time 2017-10-09 22:13:35 -07:00
Matthew Dean
bad9be8a11 Fixes #3112
- also fixes browser test broken with lowercase API change
2017-10-09 22:11:19 -07:00
Max Mikhailov
006ce2651d special functions: add boolean and if, clean up alpha 2017-06-07 16:31:35 +03:00
Max Mikhailov
10db21c3b5 optional ; after VariableCall at the end of {} block
i.e. allow `div {@var()}` to become consistent with the rest of CSS/Less syntax
2017-06-01 13:06:58 +03:00
Max Mikhailov
632f96b55d rename RulesetCall to VariableCall 2017-06-01 12:30:02 +03:00
Max Mikhailov
6a683eb62d eslint spaced-comment and corresponding changes 2017-06-01 02:27:55 +03:00
Matthew Dean
49cbe520f6 Migrate JSCS and JSHint to ESLint and fix various ESLint styling errors 2016-12-31 20:03:46 -08:00
Matthew Dean
abb5375acb Fix JSLint and JSCS errors 2016-07-19 01:38:54 -07:00
Matthew Dean
39150d513a Simplified API on less object
e.g. "less.Ruleset()" instead of "new less.tree.Ruleset()"

Auto-casting of string values into nodes for AtRule, Declaration, Selector, Value
e.g. "less.Selector('&.a')" instead of "new tree.Selector(new tree.Element(new tree.Combinator('&'), '.a'))"
2016-07-19 01:30:34 -07:00
Matthew Dean
a38f8a1eb7 Added property accessors - performance issue solved by re-tooling value parsing
i.e. All values are anonymous strings until "queried"
- Unlike original PR, no change in existing test output for un-referenced properties
- unused variables would theoretically result in a tiny improvement in parsing time
2016-07-18 14:28:32 -07:00
Matthew Dean
d5803515d5 Allow minimum Less version for plugins to be a string 2016-07-13 02:33:28 -07:00
Matthew Dean
1ecb327a67 Merge branch 'feature/@plugin' into 3.x
* feature/@plugin:
  All tests passing for @plugin - Inline JavaScript disabled by default - Deprecated "preprocessor" option removed (preprocessor plugins still valid)
  Plugin loader set up for lessc, node, and browser
2016-07-12 22:35:16 -07:00
Matthew Dean
ad57737ce0 All tests passing for @plugin
- Inline JavaScript disabled by default
- Deprecated "preprocessor" option removed (preprocessor plugins still valid)
2016-07-12 22:26:39 -07:00
Matthew Dean
52e9b5e4fe Rename Directive -> AtRule & Rule -> Declaration
- Added tree shim for old node types and plugin visitor shim to upgrade node visitors to new node types
2016-07-01 20:53:01 -07:00
Matthew Dean
27492a71ef Rename extensions back to plugins 2016-07-01 14:43:34 -07:00
Matthew Dean
bd14f14709 Rename @plugin to @use extensions 2016-06-24 20:36:00 -07:00
Matthew Dean
36edeaa787 Fix input start position for @media blocks 2016-05-08 00:15:16 -07:00
Matthew Dean
d07a9b6cc6 Fix for #2841 - Fix reversion for "color-like" keywords. 2016-04-22 16:31:56 -07:00
Stefan Weil
bf279b36be Fix typos found by codespell
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-04-01 12:01:40 +02:00
Timothy
7853edcc96 Fix AST to include text for single line comments 2016-03-31 16:14:29 -04:00
Matthew Dean
7a80224415 Merge branch 'master' into root-functions 2016-03-04 09:47:48 -07:00
Max Mikhailov
4bd587818c Merge pull request #2797 from seven-phases-max/fix-variable-call-whitespace
Disallow whitespace in variable calls (i.e "DR"-calls)
2016-02-24 20:01:08 +03:00
meri
c12a7df917 This fixes #2798 - left part of inequality could not be enclosed in
parenthesis.
2016-02-17 16:20:17 +01:00
Max Mikhailov
7b4dcc10f6 remove redundant condition in parser.expect per #2804 2016-02-17 11:33:46 +03:00
Max Mikhailov
67c3875900 Merge pull request #2804 from marijaselakovic/master
use instanceof operator instead of class comparison optimization
2016-02-17 11:30:48 +03:00
Max Mikhailov
17efa868be Merge pull request #2806 from seven-phases-max/fix-named-colors-regression
Fix comments after named color regression
2016-02-06 06:01:48 +03:00
Max Mikhailov
01b11a7440 Fix comments after named color regression 2016-02-06 04:29:07 +03:00
marija
3d23cce4b1 use instanceof operator for class comparison 2016-02-05 16:56:19 +01:00
Max Mikhailov
f1ded2b2f4 disallow whitespace in variable calls 2016-02-01 23:48:06 +03:00
Luke Page
29f8ae22cc upgrade jshint and fix new errors 2016-01-30 08:29:47 +00:00
Matthew Dean
7f535a891d Allow root functions defined via @plugin 2016-01-26 16:54:51 -08:00
Max Mikhailov
e3c13121df allow unknown at-rules w/o {} block 2016-01-26 11:00:31 +03:00
meri
8cc6ea89b1 Logical operator and now has higher precence then logical operator or. 2016-01-17 19:37:51 +01:00
meri
d538509101 Merge https://github.com/less/less.js 2016-01-14 23:46:37 +01:00
meri
ce55a8e79c Fixing #2124 - Parsing Error "Unrecognised input" for color operations
with color names.
2016-01-14 23:46:05 +01:00
Mária Jurčovičová
8c1fcb5115 Merge pull request #2763 from SomMeri/master
Added "or" keyword and allowed arbitrary logical expression in guards.
2016-01-14 14:27:36 +01:00
meri
1791587fdc removed pointless comment 2015-12-20 20:25:55 +01:00