556 Commits

Author SHA1 Message Date
Matthew Dean
d061bdb2f1 Added tests for valid and invalid nodes returned by functions 2016-03-05 14:31:13 -07:00
Matthew Dean
6e97db84b3 Tests passing for creating directives 2016-03-04 14:10:53 -07:00
Matthew Dean
7a80224415 Merge branch 'master' into root-functions 2016-03-04 09:47:48 -07:00
Matthew Dean
b67403d341 Add allowRoot property to nodes that can be returned by a function into root or ruleset 2016-02-01 19:49:20 -08:00
Luke Page
29f8ae22cc upgrade jshint and fix new errors 2016-01-30 08:29:47 +00:00
Luke Page
2c0f833a1b Fix jscs error 2016-01-30 07:12:39 +00:00
Max Mikhailov
a58bb76e4c polish "root func" error handling 2016-01-29 02:20:40 +03:00
Matthew Dean
7f535a891d Allow root functions defined via @plugin 2016-01-26 16:54:51 -08:00
meri
c2477751e6 Fixed typo. 2015-12-13 15:54:00 +01:00
meri
dd09691b38 Fixed extend leaking through nested parent selector. #2586 2015-12-13 15:49:20 +01:00
meri
ead3e29f7b Fixing import by reference
- refactored how import reference works
- refactored to-css-visitor (this is side product, it was getting
  complicated)
- fixes issues #1851, #1896, #1878, #2716, #1968, #2162 (same as #1896)
2015-11-20 15:10:53 +01:00
Luke Page
c7a6e8d886 Fix import inline. Fixes #2703 2015-09-25 12:39:24 +01:00
Luke Page
8dc3bfb024 Merge pull request #2646 from SomMeri/mixin-matching-with-default-parameters-2645
Parametric mixins: parameters don't match error
2015-09-17 07:48:58 +01:00
Luke Page
21858a50d5 Merge pull request #2642 from SomMeri/import-by-reference-inline-2620
Fixes import by reference inlines source's inline imports - 2620
2015-09-09 13:04:14 +01:00
Luke Page
8a135bd89b Merge pull request #2643 from SomMeri/shorthand-color-interpolated-into-selector-1481
Keep shorthand color form the same way as named colors are kept.
2015-09-09 13:03:03 +01:00
Jacques Favreau
74ef1ebacd Reference inline comments.
As described in https://github.com/less/less.js/issues/2675 in-value comments are not preserved in referenced rules.

This patch adds reference marking to nodes below rules and expressions if markReferenced is available.
2015-08-31 11:42:40 -07:00
jurcovicovam
19dc9e78b9 Added getIsReferenced into anonymous node. The visibility of anonymous
node type now works the same way as visibility of ruleset or directive.
2015-07-25 16:03:06 +02:00
jurcovicovam
e7ce82bec6 Fixed mixins definition matching problem when mixin definition contains
parameters with default values. #2645
2015-07-22 17:02:36 +02:00
jurcovicovam
30fe1cb9e2 Keep shorthand color form the same way as named colors are kept. #2481 2015-07-19 14:54:41 +02:00
jurcovicovam
34e3ea61ce Import inline located inside file imported by reference should not be
present in output. Close #2620
2015-07-19 14:07:21 +02:00
seven-phases-max
3178103b7f merge updated expand-operator with master
plus reworked tests
2015-06-25 23:53:32 +04:00
seven-phases-max
8204eca8a0 Merge branch 'philschatz_patch-1' into expand-operator 2015-06-25 17:53:55 +04:00
seven-phases-max
28006cf721 fix Ruleset.prototype.find failing in certain (programmatic usage) cases 2015-04-26 19:50:47 +04:00
seven-phases-max
7203286706 fix #2558 2015-04-19 19:49:27 +04:00
seven-phases-max
1950248a87 fix formatting to meet jscs settings 2015-04-01 21:26:14 +04:00
Luke Page
86fa4f6f9d Merge pull request #2522 from rjgotten/fix-plugin-scoping
Fix `@plugin` scoping rules
2015-04-01 06:46:40 +01:00
Luke Page
e411f548c1 Merge pull request #2520 from less/bugfix/2440
Fix 2440
2015-03-26 16:25:56 +00:00
rjgotten
56687b9d02 Make functionRegistry in mxin definition inherit from mixinEnv
functionRegistry was mistakingly inheriting from the top frame of the
caller context, which was incorrect. It should inherit from definition
scope.
2015-03-23 11:01:51 +01:00
rjgotten
0a6e2f814d merge changes from upstream 2015-03-23 10:40:01 +01:00
Luke Page
e0dff5308c Bubble import only above other non comment, non charset rules. Fixes #2440 2015-03-21 22:06:01 +00:00
seven-phases-max
414d21c7af Fix naked url import 2015-03-21 15:19:14 +04:00
rjgotten
56f5db8362 Mend failing unit tests 2015-03-20 17:15:31 +01:00
rjgotten
4d17c8b35d Fix plugin scope for mixins, directives and detached rulesets
Fixed scope for plugins to apply correctly for mixins, directives and
detached rulesets.
Updated plugin unit tests to be more comprehensive
2015-03-20 16:41:05 +01:00
rjgotten
b948dad7ab Fix selectors folding into directives
When directives bubble up to global scope, selectors are no longer
folded into directives that do not logically allow them.
Fixes #2511
2015-03-19 20:22:40 +01:00
Luke Page
d7846e2ae5 Merge pull request #2479 from rjgotten/import-plugin
Import plugin
2015-03-15 17:44:47 +00:00
rjgotten
a9e0848b6e Cleaning up some left-overs
There were still some changes around that were based on an older
implementation of `@import (plugin)`. This removes them and tidies up
the files.
2015-03-06 10:24:58 +01:00
rjgotten
94d3f469d4 merge from upstream 2015-03-05 16:12:56 +01:00
rjgotten
d119e01807 Scoped @import (plugin) functions loading
- Limited @import (plugin) support to add/addMultiple of functions
- Altered @import (plugin) loading to support browser
- Support proper closure scoping of @import (plugin) loaded functions
2015-03-05 15:55:37 +01:00
Bass Jobsen
6c66aeb71c change use case and add test 2015-02-28 22:32:40 +01:00
Bass Jobsen
57def23b52 Merge branch 'patch-12' of https://github.com/bassjobsen/less.js into patch-12 2015-02-28 15:48:12 +01:00
Luke Page
a37a742b7d Fix #2472 - don't loose the unit when not in strictUnits mode 2015-02-26 18:41:26 +00:00
rjgotten
83db6e8d90 Allow adding plugins via @import (plugin) 2015-02-25 17:36:00 +01:00
jurcovicovam
028f3c79be Bubbling of directives. 2015-02-24 17:27:27 +01:00
jurcovicovam
eff8230c3c directive.rules now holds array instead of single selector.
It is because:
1.) Consistency: media.js is done the same way.
2.) Ruleset may or may not change to array in to-css-visitor. All
    following code had to hande two cases afterwards.
2015-02-24 14:08:11 +01:00
Bass Jobsen
5bc1208987 do not output when referencing
should fix https://github.com/less/less.js/issues/2464
2015-02-23 18:39:39 +01:00
jurcovicovam
2e579cf42a cleaning up forgotten debug help 2015-02-01 15:39:33 +01:00
jurcovicovam
996947d2f6 Fixing makeImportant on mixins and rulesets: #2421
1.) Rulesets `makeImportant` must create a new ruleset.
2.) Mixin-definition `makeImportant` must create a new mixin definition.
It must NOT convert mixin into ruleset.
2015-02-01 15:32:58 +01:00
Luke Page
4972d476a4 Merge pull request #2423 from SomMeri/extend-on-parent-selector-v1-2206
Bug: extend doesn't work when appended on nested selector with &
2015-01-31 08:50:33 +01:00
Luke Page
604c911441 style cop 2 - indentation 2015-01-30 20:41:25 +00:00
Luke Page
1494e25ef0 More style cop.. 2015-01-30 18:28:02 +00:00