clean-css.git
9 years agoAdds source file tracking to source maps.
Jakub Pawlowicz [Sun, 2 Nov 2014 15:57:17 +0000 (15:57 +0000)]
Adds source file tracking to source maps.

9 years agoAdds line/column tracking in tokenization.
Jakub Pawlowicz [Wed, 29 Oct 2014 20:26:21 +0000 (20:26 +0000)]
Adds line/column tracking in tokenization.

9 years agoMoves cleaning up tokens out of tokenizer.
Jakub Pawlowicz [Mon, 27 Oct 2014 20:46:17 +0000 (20:46 +0000)]
Moves cleaning up tokens out of tokenizer.

* Pulls out extracting logic into an utility class.

9 years agoRefactors advanced optimizer to get rid of functions in loops.
Jakub Pawlowicz [Sun, 26 Oct 2014 11:43:47 +0000 (11:43 +0000)]
Refactors advanced optimizer to get rid of functions in loops.

9 years agoClarifies conditions in advanced processing.
Jakub Pawlowicz [Sun, 26 Oct 2014 11:32:38 +0000 (11:32 +0000)]
Clarifies conditions in advanced processing.

9 years agoRenames variables in advanced optimiser to match others.
Jakub Pawlowicz [Sun, 26 Oct 2014 11:20:49 +0000 (11:20 +0000)]
Renames variables in advanced optimiser to match others.

9 years agoReworks simple & advanced optimisations to use metadata.
Jakub Pawlowicz [Thu, 23 Oct 2014 21:46:21 +0000 (22:46 +0100)]
Reworks simple & advanced optimisations to use metadata.

* We can avoid merging, splitting, and mapping by using token metadata directly.
* Unfortunately it means metadata has to be updated as we go.

9 years agoAdds a more performant version of rebuilder.
Jakub Pawlowicz [Thu, 23 Oct 2014 07:01:22 +0000 (08:01 +0100)]
Adds a more performant version of rebuilder.

9 years agoRewrites property tokenizer to use string traversing.
Jakub Pawlowicz [Wed, 22 Oct 2014 21:24:24 +0000 (22:24 +0100)]
Rewrites property tokenizer to use string traversing.

9 years agoAdds more advanced tokenizing.
Jakub Pawlowicz [Tue, 21 Oct 2014 08:16:06 +0000 (09:16 +0100)]
Adds more advanced tokenizing.

* We'll be able to hold more information about tokens now.

9 years agoAdds an option to store escaped metadata to UrlsProcessor.
Jakub Pawlowicz [Fri, 17 Oct 2014 21:31:37 +0000 (22:31 +0100)]
Adds an option to store escaped metadata to UrlsProcessor.

9 years agoAdds an option to store escaped metadata to FreeTextProcessor.
Jakub Pawlowicz [Fri, 17 Oct 2014 21:26:07 +0000 (22:26 +0100)]
Adds an option to store escaped metadata to FreeTextProcessor.

9 years agoAdds an option to store escaped metadata to ExpressionsProcessor.
Jakub Pawlowicz [Thu, 16 Oct 2014 18:36:35 +0000 (19:36 +0100)]
Adds an option to store escaped metadata to ExpressionsProcessor.

9 years agoAdds an option to store escaped metadata to CommentsProcessor.
Jakub Pawlowicz [Thu, 16 Oct 2014 18:27:36 +0000 (19:27 +0100)]
Adds an option to store escaped metadata to CommentsProcessor.

9 years agoTweaks EscapeStore to restore based on index not metadata.
Jakub Pawlowicz [Thu, 16 Oct 2014 18:26:43 +0000 (19:26 +0100)]
Tweaks EscapeStore to restore based on index not metadata.

9 years agoFixes #395 - unescaped brackets in data URIs.
Jakub Pawlowicz [Fri, 5 Dec 2014 23:10:52 +0000 (23:10 +0000)]
Fixes #395 - unescaped brackets in data URIs.

9 years agoMerge pull request #392 from silverwind/pseudo-class-merge
Jakub Pawlowicz [Tue, 2 Dec 2014 20:58:03 +0000 (20:58 +0000)]
Merge pull request #392 from silverwind/pseudo-class-merge

Exclude all problematic pseudo-classes from rule-merging

9 years agoFixes #390 - Update regexes for :first and :dir()
silverwind [Tue, 2 Dec 2014 19:15:41 +0000 (20:15 +0100)]
Fixes #390 - Update regexes for :first and :dir()

9 years agoFixes #390 - Exclude all problematic pseudo-classes from rule merge
silverwind [Mon, 1 Dec 2014 18:14:24 +0000 (19:14 +0100)]
Fixes #390 - Exclude all problematic pseudo-classes from rule merge

9 years agoFixes #390 - Merging of :fullscreen rules
silverwind [Sun, 30 Nov 2014 23:22:56 +0000 (00:22 +0100)]
Fixes #390 - Merging of :fullscreen rules

9 years agoFixes options coercing in API.
Jakub Pawlowicz [Sat, 29 Nov 2014 00:13:14 +0000 (00:13 +0000)]
Fixes options coercing in API.

* Apparently it was introduced when renaming options in 3.0.

9 years agoAdds support for @conter-style at-rule.
Jakub Pawlowicz [Sun, 23 Nov 2014 11:11:12 +0000 (11:11 +0000)]
Adds support for @conter-style at-rule.

9 years agoFixes #385 - edge cases in processing cut off CSS content.
Jakub Pawlowicz [Thu, 20 Nov 2014 23:14:00 +0000 (23:14 +0000)]
Fixes #385 - edge cases in processing cut off CSS content.

9 years agoFixes #383 - decimal places and rounding.
Jakub Pawlowicz [Mon, 17 Nov 2014 19:58:06 +0000 (19:58 +0000)]
Fixes #383 - decimal places and rounding.

* Introduced by #380. Should fix it for good.

9 years agoMerge pull request #382 from XhmikosR/master
Jakub Pawlowicz [Sun, 16 Nov 2014 10:39:13 +0000 (10:39 +0000)]
Merge pull request #382 from XhmikosR/master

Bump nock to v0.50.x.

9 years agoBump nock to v0.50.x.
XhmikosR [Sat, 15 Nov 2014 08:17:40 +0000 (10:17 +0200)]
Bump nock to v0.50.x.

9 years agoMerge pull request #381 from XhmikosR/master
Jakub Pawlowicz [Wed, 12 Nov 2014 09:32:33 +0000 (09:32 +0000)]
Merge pull request #381 from XhmikosR/master

Update dependencies.

9 years agoUpdate dependencies.
XhmikosR [Tue, 11 Nov 2014 13:22:21 +0000 (15:22 +0200)]
Update dependencies.

9 years agoFixes #380 - rounding fractions to a whole number.
Jakub Pawlowicz [Sun, 9 Nov 2014 16:54:39 +0000 (16:54 +0000)]
Fixes #380 - rounding fractions to a whole number.

9 years agoFixes #363 - `rem` units overriding more understandable ones.
Jakub Pawlowicz [Mon, 20 Oct 2014 19:15:27 +0000 (20:15 +0100)]
Fixes #363 - `rem` units overriding more understandable ones.

9 years agoAllows disabling rounding precision.
Lukas Böcker [Wed, 15 Oct 2014 14:10:46 +0000 (16:10 +0200)]
Allows disabling rounding precision.

* Use `roundingPrecision: -1` or `--rounding-precision \\-1`.

9 years agoFixes #344 - merging background-size into shorthand.
Jakub Pawlowicz [Wed, 15 Oct 2014 21:05:19 +0000 (22:05 +0100)]
Fixes #344 - merging background-size into shorthand.

* Adds properties.backgroundSizeMerging to control the behaviour.

9 years agoAdds more granular control over compatibility settings.
Jakub Pawlowicz [Tue, 14 Oct 2014 07:09:07 +0000 (08:09 +0100)]
Adds more granular control over compatibility settings.

* Manages compatibility options as a hash of options.
* Handles fallback to previous compatibility options.

9 years agoMerge pull request #368 from XhmikosR/master
Jakub Pawlowicz [Sun, 12 Oct 2014 15:33:06 +0000 (16:33 +0100)]
Merge pull request #368 from XhmikosR/master

README.md: use master branch for the Travis CI badge.

9 years agoReplaces remaining references to line breaks with require('os').EOL.
Jakub Pawlowicz [Sun, 12 Oct 2014 15:21:22 +0000 (16:21 +0100)]
Replaces remaining references to line breaks with require('os').EOL.

* Thanks @XhmikosR!

9 years agoFixes comments processor on non-*nix systems.
Jakub Pawlowicz [Sun, 12 Oct 2014 15:14:38 +0000 (16:14 +0100)]
Fixes comments processor on non-*nix systems.

* Windows, I'm looking at you!

9 years agoRemoves support for node.js 0.8.x.
Jakub Pawlowicz [Sun, 12 Oct 2014 09:39:41 +0000 (10:39 +0100)]
Removes support for node.js 0.8.x.

* Although 0.12 is not ready yet, support for 0.8 among libraries is waning.
* Bumps browserify dev dependency to 6.x.
* Bumps nock dev dependency to 0.48.

9 years agoREADME.md: use master branch for the Travis CI badge.
XhmikosR [Sat, 11 Oct 2014 06:21:31 +0000 (09:21 +0300)]
README.md: use master branch for the Travis CI badge.

9 years agoFixes specs under latest 0.11.
Jakub Pawlowicz [Fri, 10 Oct 2014 21:08:37 +0000 (22:08 +0100)]
Fixes specs under latest 0.11.

9 years agoAdds 3.0 release warning to docs.
Jakub Pawlowicz [Fri, 10 Oct 2014 20:48:56 +0000 (21:48 +0100)]
Adds 3.0 release warning to docs.

9 years agoSimplifies `SelectorsOptimizer` instantiation.
Jakub Pawlowicz [Fri, 10 Oct 2014 06:47:20 +0000 (07:47 +0100)]
Simplifies `SelectorsOptimizer` instantiation.

9 years agoRenames `noRebase` option into `rebase`.
Jakub Pawlowicz [Fri, 10 Oct 2014 06:45:56 +0000 (07:45 +0100)]
Renames `noRebase` option into `rebase`.

9 years agoRenames `noAggressiveMerging` option into `aggressiveMerging`.
Jakub Pawlowicz [Fri, 10 Oct 2014 06:35:33 +0000 (07:35 +0100)]
Renames `noAggressiveMerging` option into `aggressiveMerging`.

9 years agoAdds missing entry to Readme about broken module compatibility.
Jakub Pawlowicz [Fri, 10 Oct 2014 06:30:00 +0000 (07:30 +0100)]
Adds missing entry to Readme about broken module compatibility.

* see 3f1e064c91474ff9bd45ea39b11bc7bd564125c6.

9 years agoRenames `noAdvanced` option into `advanced`.
Jakub Pawlowicz [Fri, 10 Oct 2014 06:29:07 +0000 (07:29 +0100)]
Renames `noAdvanced` option into `advanced`.

9 years agoImproves handling & documentation of minification options.
Jakub Pawlowicz [Fri, 10 Oct 2014 06:17:07 +0000 (07:17 +0100)]
Improves handling & documentation of minification options.

9 years agoUpdates changelog after reworked minification.
Jakub Pawlowicz [Thu, 9 Oct 2014 19:48:02 +0000 (20:48 +0100)]
Updates changelog after reworked minification.

9 years agoSpeeds up advanced processing by shortening optimize loop.
Jakub Pawlowicz [Thu, 9 Oct 2014 06:15:07 +0000 (07:15 +0100)]
Speeds up advanced processing by shortening optimize loop.

* As it seems we only need 2 extra passes from #removeDuplicates and #mergeAdjacent.

9 years agoReverses boolean passed to property optimizer.
Jakub Pawlowicz [Mon, 6 Oct 2014 20:28:50 +0000 (21:28 +0100)]
Reverses boolean passed to property optimizer.

9 years agoRemoves unnecessary libraries.
Jakub Pawlowicz [Mon, 6 Oct 2014 17:23:29 +0000 (18:23 +0100)]
Removes unnecessary libraries.

9 years agoSimplifies advanced processing & property optimizer interface.
Jakub Pawlowicz [Mon, 6 Oct 2014 14:45:53 +0000 (15:45 +0100)]
Simplifies advanced processing & property optimizer interface.

* Previously property optimizer accepted a string with selectors & returned a similar list.
* Since advanced optimizer operates on arrays now so does property optimizer.

9 years agoRemoves property optimizer from simple optimizations.
Jakub Pawlowicz [Mon, 6 Oct 2014 13:42:12 +0000 (14:42 +0100)]
Removes property optimizer from simple optimizations.

9 years agoSpeeds up minifying zero values.
Jakub Pawlowicz [Mon, 6 Oct 2014 11:17:03 +0000 (12:17 +0100)]
Speeds up minifying zero values.

* Checks if zeros are present in property value before proceeding.

9 years agoSpeeds up clean up operations.
Jakub Pawlowicz [Mon, 6 Oct 2014 11:07:16 +0000 (12:07 +0100)]
Speeds up clean up operations.

* Removes function from loop.
* Runs optimizations only if needed.

9 years agoRewrites optimizer's #rebuild as a simple loop.
Jakub Pawlowicz [Mon, 6 Oct 2014 09:35:48 +0000 (10:35 +0100)]
Rewrites optimizer's #rebuild as a simple loop.

9 years agoRemoves extra trim from clean up code.
Jakub Pawlowicz [Sun, 5 Oct 2014 18:36:08 +0000 (19:36 +0100)]
Removes extra trim from clean up code.

9 years agoSpeeds up simple reduction by using for loop not map.
Jakub Pawlowicz [Sun, 5 Oct 2014 14:43:44 +0000 (15:43 +0100)]
Speeds up simple reduction by using for loop not map.

9 years agoSpeeds up precision minification.
Jakub Pawlowicz [Sun, 5 Oct 2014 14:39:38 +0000 (15:39 +0100)]
Speeds up precision minification.

* Caches minification regexp.
* Skips minification if no decimal dots in value.

9 years agoSpeeds up unit minification by caching regexp.
Jakub Pawlowicz [Sun, 5 Oct 2014 14:16:50 +0000 (15:16 +0100)]
Speeds up unit minification by caching regexp.

9 years agoSpeeds up hex name shortener even futher.
Jakub Pawlowicz [Sun, 5 Oct 2014 14:02:43 +0000 (15:02 +0100)]
Speeds up hex name shortener even futher.

* Skips running hex -> name shortener if there are no hex colors.
* Simplifies toName regexp.

9 years agoSpeeds up HexNameShortener.
Jakub Pawlowicz [Sat, 4 Oct 2014 23:30:45 +0000 (00:30 +0100)]
Speeds up HexNameShortener.

* Moves regex creation out of loop.
* Makes #shorten a simple function.

9 years agoAdds faster tokenizer extraction.
Jakub Pawlowicz [Sat, 4 Oct 2014 22:56:48 +0000 (23:56 +0100)]
Adds faster tokenizer extraction.

9 years agoFixes remaining specs (we are green now!).
Jakub Pawlowicz [Sat, 4 Oct 2014 09:33:40 +0000 (10:33 +0100)]
Fixes remaining specs (we are green now!).

9 years agoFixes advanced optimizer.
Jakub Pawlowicz [Sat, 4 Oct 2014 09:32:09 +0000 (10:32 +0100)]
Fixes advanced optimizer.

* It was broken since we use tokenized data now.

9 years agoFixes tokenizer to split over commas correctly.
Jakub Pawlowicz [Fri, 3 Oct 2014 16:39:24 +0000 (17:39 +0100)]
Fixes tokenizer to split over commas correctly.

9 years agoFixes tokenizing escaped content within selectors.
Jakub Pawlowicz [Thu, 2 Oct 2014 14:49:06 +0000 (15:49 +0100)]
Fixes tokenizing escaped content within selectors.

9 years agoFixes rebuilding flat blocks in SelectorOptimizer.
Jakub Pawlowicz [Thu, 2 Oct 2014 13:55:17 +0000 (14:55 +0100)]
Fixes rebuilding flat blocks in SelectorOptimizer.

9 years agoAdds value & charset optimizations.
Jakub Pawlowicz [Wed, 1 Oct 2014 09:59:35 +0000 (10:59 +0100)]
Adds value & charset optimizations.

* Re-implemented most of property values' minifications.
* Extra charset(s) are stripped and first one is moved to the beginning.

9 years agoImproves selector optimizer.
Jakub Pawlowicz [Mon, 29 Sep 2014 12:01:20 +0000 (13:01 +0100)]
Improves selector optimizer.

* Turns to prototypal OO.
* Adds specs.
* Extracts Simple & Advanced optimizers into separate modules.
* Adds nasty workarounds as property optimizer is incompatible with new tokenizer output.

9 years agoImproves Tokenizer.
Jakub Pawlowicz [Sun, 28 Sep 2014 21:36:27 +0000 (22:36 +0100)]
Improves Tokenizer.

* Adds prototypal OO.
* Adds specs.
* Adds stripping some whitespace from selectors and properties.

9 years agoRestores SelectorsOptimizer in minification.
Jakub Pawlowicz [Fri, 26 Sep 2014 16:14:28 +0000 (17:14 +0100)]
Restores SelectorsOptimizer in minification.

9 years agoFurther simplifies CleanCSS#minify by extracting debug options.
Jakub Pawlowicz [Fri, 26 Sep 2014 15:47:37 +0000 (16:47 +0100)]
Further simplifies CleanCSS#minify by extracting debug options.

9 years agoSimplifies CleanCSS#minify method.
Jakub Pawlowicz [Fri, 26 Sep 2014 15:15:48 +0000 (16:15 +0100)]
Simplifies CleanCSS#minify method.

* All processing is now done through content processors with predicatable API.
* Benchmarking also got easier because of that.

9 years agoRemoves duplicate stats statement.
Jakub Pawlowicz [Fri, 26 Sep 2014 14:58:11 +0000 (15:58 +0100)]
Removes duplicate stats statement.

9 years agoStrips main clean.js transforms to bare minimum.
Jakub Pawlowicz [Thu, 18 Sep 2014 07:44:42 +0000 (09:44 +0200)]
Strips main clean.js transforms to bare minimum.

9 years agoRemoves EmptyRemoval as no longer needed.
Jakub Pawlowicz [Fri, 26 Sep 2014 14:23:40 +0000 (15:23 +0100)]
Removes EmptyRemoval as no longer needed.

9 years agoMoves QuoteScanner to lib/utils.
Jakub Pawlowicz [Fri, 26 Sep 2014 11:49:10 +0000 (12:49 +0100)]
Moves QuoteScanner to lib/utils.

9 years agoImproves UrlsProcessor.
Jakub Pawlowicz [Fri, 26 Sep 2014 11:44:36 +0000 (12:44 +0100)]
Improves UrlsProcessor.

* Adds prototypal OO.
* Adds basic tests.

9 years agoMoves Splitter to lib/utils.
Jakub Pawlowicz [Fri, 26 Sep 2014 11:30:17 +0000 (12:30 +0100)]
Moves Splitter to lib/utils.

9 years agoImproves FreeTextProcessor.
Jakub Pawlowicz [Thu, 25 Sep 2014 22:58:27 +0000 (23:58 +0100)]
Improves FreeTextProcessor.

* Removes module wrapper.
* Adds basic tests.
* Adds very ugly normalization (pending refactoring).

9 years agoImproves QuoteScanner.
Jakub Pawlowicz [Thu, 25 Sep 2014 12:21:42 +0000 (13:21 +0100)]
Improves QuoteScanner.

* Removes module wrapper.
* Adds set of tests.

9 years agoImproves Splitter.
Jakub Pawlowicz [Wed, 24 Sep 2014 20:24:18 +0000 (21:24 +0100)]
Improves Splitter.

* Adds prototypal OO.

9 years agoAdds minor tweaks to Splitter.
Jakub Pawlowicz [Wed, 24 Sep 2014 20:21:57 +0000 (21:21 +0100)]
Adds minor tweaks to Splitter.

9 years agoImproves EscapeStore.
Jakub Pawlowicz [Wed, 24 Sep 2014 20:19:06 +0000 (21:19 +0100)]
Improves EscapeStore.

* Uses prototypal OO.
* Adds specs.

9 years agoImproves ExpressionsProcessor.
Jakub Pawlowicz [Wed, 24 Sep 2014 19:56:25 +0000 (20:56 +0100)]
Improves ExpressionsProcessor.

* Adds prototypal declarations.
* Adds tests.

9 years agoImproves CommentsProcessor.
Jakub Pawlowicz [Thu, 18 Sep 2014 07:51:06 +0000 (09:51 +0200)]
Improves CommentsProcessor.

* Adds prototypal OO.
* Adds basic tests.

9 years agoImproves Chunker to split content based on a given terminator.
Jakub Pawlowicz [Mon, 22 Sep 2014 02:03:46 +0000 (04:03 +0200)]
Improves Chunker to split content based on a given terminator.

9 years agoExtracts Chunker into a module.
Jakub Pawlowicz [Mon, 22 Sep 2014 01:58:25 +0000 (03:58 +0200)]
Extracts Chunker into a module.

* Adds some simple specs too.

9 years agoAdds #nextMatch method to EscapeStore.
Jakub Pawlowicz [Fri, 19 Sep 2014 08:48:12 +0000 (10:48 +0200)]
Adds #nextMatch method to EscapeStore.

9 years agoAdds metadata support to EscapeStore.
Jakub Pawlowicz [Thu, 18 Sep 2014 09:25:08 +0000 (11:25 +0200)]
Adds metadata support to EscapeStore.

9 years agoAdds simple EscapeStore spec.
Jakub Pawlowicz [Thu, 18 Sep 2014 09:09:31 +0000 (11:09 +0200)]
Adds simple EscapeStore spec.

9 years agoMoves unit tests to integration.
Jakub Pawlowicz [Tue, 16 Sep 2014 08:32:32 +0000 (09:32 +0100)]
Moves unit tests to integration.

9 years agoBreaks 2.x compatibility for using CleanCSS as a function.
Jakub Pawlowicz [Fri, 26 Sep 2014 14:49:14 +0000 (15:49 +0100)]
Breaks 2.x compatibility for using CleanCSS as a function.

9 years agoTurns upcoming version to 3.x (yay!).
Jakub Pawlowicz [Fri, 26 Sep 2014 14:42:53 +0000 (15:42 +0100)]
Turns upcoming version to 3.x (yay!).

10 years agoVersion 2.2.16.
Jakub Pawlowicz [Tue, 16 Sep 2014 07:13:27 +0000 (08:13 +0100)]
Version 2.2.16.

10 years agoFixes #358 - property merging in compatibility mode.
Jakub Pawlowicz [Tue, 16 Sep 2014 07:07:26 +0000 (08:07 +0100)]
Fixes #358 - property merging in compatibility mode.

* More understandable properties can't be merged into less understandable shorthands.
* E.g: div{background:linear-gradient(...) #000;background-color:red;}

10 years agoFixes #354 - !important overriding in shorthands.
Jakub Pawlowicz [Sun, 14 Sep 2014 15:43:14 +0000 (16:43 +0100)]
Fixes #354 - !important overriding in shorthands.

Follow up to #346 for overriding important property by another important one in shorthand declarations.

10 years agoFixes #359 - handling escaped double backslash.
Jakub Pawlowicz [Sun, 14 Sep 2014 14:42:06 +0000 (15:42 +0100)]
Fixes #359 - handling escaped double backslash.

10 years agoFixes #356 - leaving out IE7 *+html hack if ie7 compatibility mode.
Jakub Pawlowicz [Thu, 4 Sep 2014 07:59:36 +0000 (08:59 +0100)]
Fixes #356 - leaving out IE7 *+html hack if ie7 compatibility mode.

* Also removes *+html hack from multi-selectors.

10 years agoAdd seven kinds of SVG 1.0 grey variants color keywords and rebeccapurple color ...
Ҽ˿ [Mon, 15 Sep 2014 03:30:34 +0000 (11:30 +0800)]
Add seven kinds of SVG 1.0 grey variants color keywords and rebeccapurple color (CSS Color Level 4)