Commit Graph

1641 Commits

Author SHA1 Message Date
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
30fe1cb9e2 Keep shorthand color form the same way as named colors are kept. #2481 2015-07-19 14:54:41 +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
Luke Page
59c012c16a 2.5.1 release 2015-05-21 12:26:46 +01:00
Christian Hammond
f66757554f Fix synchronously loading/applying stylesheets on page load.
Starting in 2.0, stylesheet loading became asynchronous, through the
usage of promises for both calculating the list of stylesheets and the
initial call to less.refresh(). This resulted in visual issues while
loading on some browsers (noticed in Firefox and Safari), along with
breakages of any custom JavaScript that depended on the computed style
of elements on the page, due to race conditions.

This change preserves the promise for initial page loading, in order to
retain support for less.pageLoadFinished, but immediately executes the
stylesheet scan (through a new less.registerStylesheetsImmediately
function) and the less.refresh() call. That resulting behavior matches
versions of less prior to 2.0.

This unveiled a regression in registering functions, both in the browser
and in unit tests, that was not previously noticed due to the
asynchronous load. Registered functions would have a 'less' variable set
to the less options, and not less itself, when not going through the
asynchronous loading mode. This meant that both unit tests and
real-world function registration would break when the sync page loading
was fixed. Overriding window.less to point to the actual less module and
not less.options during bootstrap fixes this.

This fixes #2317.
2015-04-28 02:08:39 -07: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
Luke Page
9b7021a309 2.5.0 release 2015-04-03 09:53:16 +01:00
Luke Page
dbe2eaa5f7 Tidy up path splitting 2015-04-03 08:33:21 +01:00
Luke Page
7c6da7ae86 Merge https://github.com/ifunk/less.js
Conflicts:
	lib/less-rhino/index.js
2015-04-03 08:32:51 +01:00
Luke Page
7ed9574d8a Merge pull request #2530 from seven-phases-max/proper-non-primitive-value-replacement-for-format-and-replace
Proper non-primitive value replacement for `%` and `replace`
2015-04-03 08:04:03 +01:00
Bass Jobsen
ea43e7d6d0 Merge remote-tracking branch 'upstream/master' into image-size 2015-04-01 23:45:14 +02: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
seven-phases-max
13ef5b7422 proper non-primitive value replacement for % and replace functions 2015-03-31 19:35:22 +04:00
Bass Jobsen
f0f271919b fixes for issue #2482 2015-03-29 18:16:01 +02: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
Luke Page
9de877523b Merge pull request #2517 from seven-phases-max/fix-naked-url-import
Quick fix for naked `url` imports
2015-03-21 21:52:12 +00:00
Adam Royle
b4bf0546b7 Add support for : or ; path separators in --include-path regardless of platform. Understands absolute paths with Windows drive letters (ie. .:C:\Windows\) 2015-03-22 07:40:30 +10:00
Luke Page
125a7f06d8 use function context for file info, not the path node 2015-03-21 17:07:07 +00:00
Luke Page
a01c40e1b9 more replacement of regexes 2015-03-21 16:40:57 +00:00
seven-phases-max
414d21c7af Fix naked url import 2015-03-21 15:19:14 +04:00
Luke Page
16ed6bfc2e Remove regex used every node with a char lookup 2015-03-21 10:28:35 +00:00
Luke Page
5c0179d199 Merge branch 'master' of https://github.com/less/less.js 2015-03-20 17:14:41 +00:00
Luke Page
936b78c6b4 See missing media blocks. Fixes #2494 2015-03-20 17:13:10 +00: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
Luke Page
a6dca8872a Merge pull request #2504 from bassjobsen/relative
optional relative amounts for color functions, see#975
2015-03-20 08:22:44 +00:00
Luke Page
b10928720f Merge branch 'tests' of https://github.com/bassjobsen/less.js
Conflicts:
	test/index.js
2015-03-20 08:11:46 +00: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
8526dee6be Merge pull request #2505 from bassjobsen/paths
fix for issue #2500
2015-03-16 06:40:19 +00:00
Bass Jobsen
4bb098bfc9 fix for issue #2500 2015-03-15 23:09:50 +01:00
Luke Page
ebb79c08b2 fix call to removed function 2015-03-15 17:50:48 +00:00
Luke Page
d7846e2ae5 Merge pull request #2479 from rjgotten/import-plugin
Import plugin
2015-03-15 17:44:47 +00:00
Luke Page
54556bddf2 missing save/restore code searching for assignments 2015-03-15 17:39:29 +00:00
Luke Page
63a150b3be escape quickley with simple properties 2015-03-15 17:29:25 +00:00
Luke Page
d05ffcc4b0 remove the quoted regex, simplify the comment parsing 2015-03-15 13:45:06 +00:00
Luke Page
376c264f95 Fix missing forget in parser 2015-03-15 12:17:41 +00:00
Luke Page
f8de5bcb16 replace simple regex's with simple string comparisons 2015-03-15 10:24:41 +00:00
rjgotten
9518763128 Updated plugin import syntax
- Updated parser to recognize `@plugin` and removed parsing support for
the (plugin) import option.
- Updated plugin import unit tests to `@plugin` syntax
2015-03-15 11:05:37 +01:00
Bass Jobsen
622a521b11 optional relative amounts for color functions, see#975 2015-03-15 00:12:47 +01:00
Luke Page
5651517f5f Fix missing new statement, causing a undefined throw and bad error message 2015-03-13 16:06:19 +00:00
Luke Page
fe8cf75d14 verbose is not deprecated since now it does something. Fixes #2441 2015-03-13 15:54:47 +00:00
Luke Page
5387ee5f2f Merge pull request #2497 from calvinjuarez/ruleset-as-default-arg
Allow detached rulesets as mixin argument defaults
2015-03-11 06:03:30 +00:00
Calvin Juárez
d4a8804808 parser – fix #2496: allow detached rulesets as mixin argument defaults 2015-03-10 18:10:39 -06:00