Commit Graph

310 Commits

Author SHA1 Message Date
hokaccha
e793e81e92 Add Sass like extend 2013-01-05 15:29:32 +00:00
Marcel Jackwerth
61e7bd6fb1 loosened restriction on css units (who knows what W3C will think up next) 2013-01-05 15:29:32 +00:00
Luke Page
2f5b0a6a0a Remove deprecated string interpolation 2013-01-05 15:29:30 +00:00
Luke Page
4f475456d5 fix parser bug with mixin call being interpretted as selector. Fixes #1091 2012-12-29 22:58:02 +00:00
Luke Page
5b3851720a browser support for rootpath and relative urls, with test 2012-12-28 20:32:26 +00:00
Luke Page
eb5c9fbf5d Relative url's option for node lessc 2012-12-28 15:25:15 +00:00
Salim Bensiali
e59a93b5fd Relative URLs in LESS files should be relative to the file that defines them.
It is up to the parser and compiler to rewrite them when those files are
imported by another LESS file.

- Modified and added test cases for import and import-once rules
- Fixed difference between client side and server side handling of relative urls
- Added a -rootpath option to lessc to specify another base path for the url
  rewriting. By default, rootpath=''
2012-12-27 20:40:16 +00:00
Luke Page
b0d4135eee Fix comment chunking. Fixes #1082 2012-12-22 18:36:09 +00:00
Luke Page
d0512b1ce2 Make import-once fix, but for the browser 2012-12-22 18:10:49 +00:00
Luke Page
8cfe7acdae make import-once use the full path, not the possibly relative path to determine if an import has already been included 2012-12-22 10:21:28 +00:00
Luke Page
aab2be61cb unbundle css min. Add optional dependency on ycssmin. Correct some things in the package.json. Add a .npmignore. Fixes #1080 2012-12-20 23:16:54 +00:00
Damien Whitten
90882cd070 parser.imports passing errors
parser.imports stored any errors in .error, but only returned an error to the callback on that last import in the queue.

This commit makes it return the stored error (that.error).

issue #463
2012-12-16 09:15:33 +00:00
Luke Page
8325548b7f bad error message trying to assign @@var. Fixes #1077 2012-12-16 08:57:16 +00:00
Luke Page
e69acbdc51 basic comments parsing in mixin arguments. comments need more work and a general solution though. fixes #1071 2012-12-11 21:38:39 +00:00
Toby Cole
d47668f4a2 Updating parser to allow dimensions starting '+'
According to http://www.w3.org/TR/CSS2/syndata.html#numbers,
numbers may start with a '+'.
Also updates the test suite to include at least one dimension
starting with '+'
2012-12-09 16:24:18 +00:00
Luke Page
2d73502955 Fix tests and report error at index -1 so it is a valid index 2012-12-09 15:42:14 +00:00
Nick Kaijaks
f49694fc8f Report error for under-matched as well as overmatched braces 2012-12-08 16:37:54 +00:00
Luke Page
e3268e12b2 detect parse errors, even with an import. fixes #1053 2012-12-08 13:38:22 +00:00
Luke Page
8a6c5e9e4e Add support for @namespace and namespace combinators. Fixes #408 2012-11-28 06:56:50 +00:00
Luke Page
dddda0b0d3 Add support for unicode descriptors. Fixes #1107 2012-11-05 20:30:49 +00:00
tscheinecker
1f19a043a5 only include the first @charset definition - subsequent ones will be
rendered as a comment + debugInfo when debugging is enabled.
2012-10-28 14:06:56 +00:00
Luke Page
f271800353 Support multiple semi-colons like css. Fixes #606 2012-10-25 14:53:47 +01:00
Luke Page
31ce31295c Fix #186 - allow selectors to contain other selectors 2012-10-24 14:50:44 +01:00
Luke Page
461b3704fc Add semi-colons to error function 2012-10-23 17:23:51 +01:00
Luke Page
0ab748371c basic support in definition, clean up and tests 2012-10-21 15:20:24 +01:00
Luke Page
587d6c2338 Add support for ';' as a delimiter 2012-10-21 15:20:24 +01:00
Luke Page
1990d8336f Fix problem with name arguments with arguments variable and if you've specified all the arguments 2012-10-21 15:20:23 +01:00
Charles Lowell
fc8393d555 alternative to throwing an object literal.
create a real exception and extend it with the
custom properties that less needs to satisfy its
error generator. An alternative to the solution
proposed in cloudhead/less.js#963
2012-10-21 15:15:45 +01:00
Simone Deponti
ebc41e5c4b Fixed nested media bug. 2012-10-07 12:16:08 +01:00
Simone Deponti
126667d4a0 Removed the passing around of an env.filename that is wrong when doing imports. 2012-10-07 12:16:06 +01:00
Simone Deponti
fd7a829079 getLocation() seems to return lines starting at 0, therefore we have to add 1.
This fixes the off-by-one bug,
and is consistent with what is done at line 238 in 'parser.js'.
2012-10-07 12:16:06 +01:00
Simone Deponti
bbdcc02c8b Fixed some tests.
* Import filenames are okay, line numbers are off by one in some cases
 * The nested media query still makes .tst show up as undefined
2012-10-07 12:16:04 +01:00
Vsevolod Vlasov
ccfa7402a1 Added ruleset source line number dumping support for debugging purposes. 2012-10-07 12:16:01 +01:00
Luke Page
819d6b0ce6 Support for escaped characters in attributes and unit tests moved into css-escapes 2012-09-23 17:06:21 +01:00
Luke Page
55d6e5a0ba Allow multiline javascript expressions, fixes #885 2012-09-09 10:35:27 +01:00
Luke Page
559231a4db Fix unquoted url's, remove special handling of data. Fixes #733 2012-09-09 10:30:55 +01:00
Luke Page
3031517c13 Review comments from @cloudhead - alter chunker to not chunk @{X} and
simplify process and depreciated != deprecated
2012-09-09 10:27:22 +01:00
Luke Page
7f466c1bfe New selector interpolation 2012-09-02 11:47:41 +01:00
Luke Page
f020aae779 Make less more protocol agnostic. Fixes #428 and Fixes #742 and Fixes #706 2012-09-01 15:37:15 +01:00
Luke Page
c68d33f94e tighten up two if statements to stop exception in browser mode. fixes #807 2012-09-01 14:44:22 +01:00
Anders Hellerup Madsen
d81ba3bb38 add support for utf-8, fixes #396 (this time less messy commit) 2012-08-30 20:08:48 +01:00
Luke Page
96ef26a9ff Revert commit mistake 2012-08-24 06:45:28 +01:00
Luke Page
85ddc9f4e7 Add parent selector to user variable 2012-08-19 12:02:58 +01:00
Luke Page
6696368eb3 Remove UTF8 BOM - fixes #650 2012-08-19 09:36:06 +01:00
Luke Page
e94b5b616a Fix other whitespace issue brought up in #406 2012-08-19 08:30:41 +01:00
revolunet
9e8330a256 fix #31 and #406
Conflicts:

	lib/less/parser.js
2012-08-19 08:09:24 +01:00
Luke Page
8de8492d35 Fix mixin calls being recognised as mixin definitions when arguments contain spaces and interpolated strings. Fixes #901 2012-08-16 20:24:55 +01:00
Luke Page
8c6d14bcf2 Fix previous test. Fix error on invalid import. Fixes #761 2012-08-11 20:35:29 +01:00
Kristoffer Walker
26876bdbbf propagate deep errors up callback chain
On branch deep-error-reporting

	modified:   lib/less/parser.js
2012-08-11 19:44:08 +01:00
Paulo Gaspar
66bbb9a44a Fix for issue 592. Additional removal of TODOs and Rhino support by
@agatronic.
2012-08-11 16:40:59 +01:00