Use a config file for phpunit and specify the version and script via composer instead of harcoding for Travis CI. Also remove the obsolete self-update for composer that was needed for a bug in an older version of Travis CI workers. Fix indentation in composer.json (consistently use 4 spaces). Remove redundant arguments from composer install command.
Fix: color: contrast(#000); generate error because light and dark was not optional, the contrast function not act like lesscss.org documentation. also the thresold is fixed and not implemented like less.js this change: - make optional light color, dark color and threshold - threshold act like less.js implementation - add lib_luma (for threshold calculation)
- Remove a couple of unnecessary seek() checks. - Fix typo in variable name (initialized as 'seenComments', but used as 'commentsSeen') - Remove redundant array_values() call - Remove unused 'lastCount' variable - Consistently capitalize 'LESS' and 'CSS'. - Remove trailing whitespace from several files.
When preserveComments is set, - The top comment in a block should not "jump" outside the block. - Comments should retain their position relative to the rules that follow them. - Comments should not be deduplicated. - When a repeated rule is deduplicated, the comments that precede each occurrence should be consolidated above the deduplicated rule. Because comments and whitespace are handled in tandem, the change impacts slightly the handling of whitespace. Specifically, 'e(this is simple);' was previously interpreted as though it were written 'e("this");'. It now causes an error instead, which is the appropriate behavior (it's how less.js handles it).
The set of helper functions that the built-in lib_* functions use to validate their arguments and generate output should be part of lessphp's public API, because they are very useful to anyone implementing custom functions. Accordingly, this patch makes the following protected functions public: * assertArgs * assertColor * assertNumber * colorArgs * throwError * toBool The patch also makes public the properties $TRUE and $FALSE, since they are useful for writing custom predicate functions.
This patch makes lessphp throw errors when it is called to compile LESS code that references undefined variables or mixins. A mixin invocation will cause an exception to be thrown if it fails to match, whether it is because no mixin of that name exists, or because the invocation fails to match against the signatures or guards of defined mixins. This is consistent with the behavior of the reference LESS implementation. The patch removes cases from tests/inputs/* that fail to compile. A new test suite, ErrorHandlingTest.php, verifies the new error-throwing behavior.