279 Commits

Author SHA1 Message Date
Luke Page
65602099cc rename strictMaths to strictMath, set default to false, update strict options to take = on | off 2013-05-02 18:18:51 +01:00
agatronic
572b45a94b Add isunit function. fixes #1298 2013-04-29 16:28:20 +01:00
agatronic
4997ce9ced extends recognise attributes. Fixes #1295 2013-04-29 16:28:04 +01:00
agatronic
5bc4059c6b Make non strict units less strict and change the default to not be strict units. Fixes #1254 2013-04-26 09:35:56 +01:00
Luke Page
b2d75e82b4 Allow variable interpolation in attributes everywhere that is sensible 2013-03-18 12:19:02 +00:00
Luke Page
e58662fbd3 better support for attributes. Allow interpolation inside attributes. Fixes #1229 2013-03-18 12:13:01 +00:00
Luke Page
19405ac501 ampersands in selectors using extend - more complex test 2013-03-18 11:37:25 +00:00
Luke Page
e210c4b251 Fix extends when selector to add includes & and :extend is inline. Fixes #1227 2013-03-18 11:29:39 +00:00
Luke Page
ac3a92dd30 add clamping to hsl and hsla functions 2013-03-08 08:22:57 +00:00
Luke Page
096a69796f support media queries in extend chaining. Also tidied up. Fixes #1213 2013-03-07 15:02:39 +00:00
Luke Page
2ff9ae521e Allow circular references and ignore them when they become circular 2013-03-07 14:17:20 +00:00
Luke Page
7170aaf06e First part of extend chaining 2013-03-07 12:17:24 +00:00
Luke Page
99aa363b70 fix, less with compression (-x) was unable to parse auto\9 2013-03-06 16:06:16 +00:00
Luke Page
c17d939ea7 Allow multiple extends for more declarative multiple inheritance 2013-03-06 15:09:43 +00:00
Luke Page
dca16509c2 fix regression: mixin guards compare units correctly 2013-03-06 10:07:43 +00:00
Luke Page
c583acede0 Fix default variables containing comma when semi-colon seperated mixin definition. Fixes #1211 2013-03-06 09:55:14 +00:00
Luke Page
cf9496ec32 remove shallow/deep options & tidy up part 1 2013-03-06 08:03:50 +00:00
Luke Page
c139c6e4df error when property is used in root. Fixes #442 2013-03-05 13:28:49 +00:00
Luke Page
7778da94b5 don't remove duplicate comments, fixes #1067 2013-03-05 11:58:59 +00:00
C. Scott Ananian
72c469d86e Implement syntax in gh #1185 for @import options. Implement multiple & less.
First step in implementing syntax for @import options, proposed in
https://github.com/cloudhead/less.js/issues/1185#issuecomment-13710620
(steps (1) and (2)).

I've implemented the 'multiple' and 'less' options.  One could trivially
add 'once' and 'css' options as well, if there was need.  Proposed
"silent" and "inline" options are deferred for future work.

I left the existing "@import-multiple" and "@import-once" syntax in place,
although the proposal is for this to be deprecated once the new option
syntax is in place.
2013-03-05 11:23:47 +00:00
Luke Page
7cebd9ca25 support for deep but exact extend 2013-03-05 10:20:41 +00:00
Luke Page
62cc6cfc0b Add exact syntax for extend 2013-03-05 09:51:20 +00:00
Luke Page
3164d57f9e extend - replace elements multiple times in a path 2013-03-05 08:58:20 +00:00
Luke Page
c90558b928 Support matching across nested variables 2013-03-04 16:20:06 +00:00
Luke Page
59fb6cd1f7 change extends to work after selector joining. refactor findMatch ready for change to support properties across nesting 2013-03-04 15:47:12 +00:00
Luke Page
2805827d61 match multiple classes as the extend target 2013-03-04 13:13:08 +00:00
agatronic
1970be737b slight restructure and tests to show we allow multiple extends 2013-03-04 11:54:11 +00:00
Luke Page
da7de8f518 move extend fully into visitor, bringing back functionality and fixes #1165 2013-03-04 10:43:32 +00:00
Luke Page
5d54af2039 import interpolation finished. refactored the import phase to occur only within the import visitor - so that the import eval env can be passed between imports. 2013-03-01 13:40:54 +00:00
Luke Page
14cee5d04f first test and fixes for simple implementation 2013-03-01 13:40:53 +00:00
Luke Page
290d7a055c organise the import node a bit better. eval the node before fetching 2013-03-01 13:40:49 +00:00
Daniel Stockman
feed74f3bd Fallback url() value for data-uri function should be quoted. 2013-02-26 18:55:39 +00:00
Daniel Stockman
e4fe935ea1 Prevent data-uri function from embedding files larger than 32KB.
Although IE8 does support data-uris, it only does so with a limit of 32KB. It's a silly limitation, but a source of potential bugs. When the limit is exceeded, the data-uri() function will simply return a normal url() value with a relative path to the asset.

One may pass --no-ie-compat to lessc to avoid this safeguard.
2013-02-26 18:55:35 +00:00
Daniel Stockman
7116b3b1c5 Change tan function test value.
Apparently there is some disagreement on the tangent of 40 between browser and node. 42 is the answer.
2013-02-26 18:55:34 +00:00
Luke Page
241c830e10 Support reading other arguments as default parameters. Fixes #43 2013-02-17 22:25:38 +00:00
Luke Page
21cc34b608 Fix #791 - avoid engineering syntax in dimensions 2013-02-16 20:45:34 +00:00
Luke Page
d01d2e9bfb do not pollute the parent scope after mixin call if variable is defined 2013-02-16 15:15:38 +00:00
Luke Page
d70769bfb7 variables in media queries in import statements 2013-02-16 14:44:58 +00:00
Luke Page
178696d141 Allow any casing for functions. Fixes #1168 2013-02-15 22:15:08 +00:00
Luke Page
c2880a9baa double brackets does not leave brackets behind, to align with the most common scenarios 2013-02-02 23:57:31 +00:00
Luke Page
41a8f6724a Fix browser tests - url tests need to live in urls.less 2013-02-02 18:08:03 +00:00
Luke Page
e21bf1d7a1 Legacy maths mode supports old special cases for font property and media queries 2013-02-02 15:49:43 +00:00
Luke Page
bbef83e171 Add tests for operations in media queries 2013-02-02 15:35:25 +00:00
Luke Page
2ffdefa248 Preserve whitespace in operations 2013-02-02 15:30:19 +00:00
Luke Page
3ef22f16f9 Add strictUnits option, add tests for legacy behaviour 2013-01-30 20:31:26 +00:00
Luke Page
531195c92d take maths further 2013-01-24 22:27:17 +00:00
Luke Page
3b5ecf5421 Fix merge issues and a code review comment. revert unit change that outputs px*px as it is not valid css 2013-01-23 21:43:39 +00:00
Dustin Cass
abaf4c6b68 Arithmetic within mixin calls must be in nested parentheses; Added tests for mixins 2013-01-23 20:41:11 +00:00
Dustin Cass
241b9d23a4 Remove spaces around slashes in final CSS output and update tests to reflect that; Added a couple shorthand tests 2013-01-23 20:37:49 +00:00
Dustin Cass
bf1823f109 Removed Shorthand and Ratio parsers; Fixed some issues with paren depth state; Adjusted tests to pass on new output 2013-01-23 20:37:48 +00:00