clean-css.git
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)

10 years agoVersion 2.2.15.
Jakub Pawlowicz [Sun, 31 Aug 2014 22:56:05 +0000 (23:56 +0100)]
Version 2.2.15.

10 years agoFixes #350 - edge cases in `@import` processing.
Jakub Pawlowicz [Sat, 30 Aug 2014 22:53:56 +0000 (23:53 +0100)]
Fixes #350 - edge cases in `@import` processing.

10 years agoFixes #346 - overriding !important by !important which is less understandable.
Jakub Pawlowicz [Sat, 30 Aug 2014 21:35:53 +0000 (22:35 +0100)]
Fixes #346 - overriding !important by !important which is less understandable.

10 years agoFixes #345 - disable rebasing for document-relative URL.
Daniel Darabos [Tue, 26 Aug 2014 12:10:48 +0000 (14:10 +0200)]
Fixes #345 - disable rebasing for document-relative URL.

10 years agoClarify that rounding-precision only applies to px values
Már Örlygsson [Tue, 26 Aug 2014 15:15:39 +0000 (15:15 +0000)]
Clarify that rounding-precision only applies to px values

10 years agoAllows `target` option to be a path to a folder instead of a file.
Jakub Pawlowicz [Mon, 25 Aug 2014 17:55:35 +0000 (18:55 +0100)]
Allows `target` option to be a path to a folder instead of a file.

* Should fix #336.
* For examples regarding root / target / relativeTo take a look at https://github.com/jakubpawlowicz/clean-css/blob/master/test/unit-test.js#L971 - 'urls rewriting - root and target' test.

10 years agoUpdates release notes.
Jakub Pawlowicz [Mon, 25 Aug 2014 16:53:51 +0000 (17:53 +0100)]
Updates release notes.

10 years agoMerge pull request #343 from noslouch/master
Jakub Pawlowicz [Mon, 25 Aug 2014 16:51:06 +0000 (17:51 +0100)]
Merge pull request #343 from noslouch/master

Simplifies transparency check to only look for zeroes in all parameters.

10 years agoVersion 2.2.14.
Jakub Pawlowicz [Mon, 25 Aug 2014 14:09:23 +0000 (15:09 +0100)]
Version 2.2.14.

10 years agoFixes #339 - skips invalid properties.
Jakub Pawlowicz [Mon, 25 Aug 2014 12:43:29 +0000 (13:43 +0100)]
Fixes #339 - skips invalid properties.

* Skips processing of properties without values.
* Passing selector name to property optimiser is far from ideal but have to do for the time being.

10 years agoFixes #341 - ensures output is shorter than input.
Jakub Pawlowicz [Mon, 25 Aug 2014 10:36:16 +0000 (11:36 +0100)]
Fixes #341 - ensures output is shorter than input.

* Was not the case for multival expressions (e.g. multiple backgrounds).

10 years agoMakes multival operations idempotent.
Jakub Pawlowicz [Mon, 25 Aug 2014 10:33:34 +0000 (11:33 +0100)]
Makes multival operations idempotent.

10 years agoFixes #342 - using clean-css in gulp via vinyl-map wrapper.
Jakub Pawlowicz [Mon, 25 Aug 2014 10:44:01 +0000 (11:44 +0100)]
Fixes #342 - using clean-css in gulp via vinyl-map wrapper.

10 years agoFinalise repository move.
Jakub Pawlowicz [Sun, 24 Aug 2014 18:12:24 +0000 (19:12 +0100)]
Finalise repository move.

10 years agosimplifies transparency check to only look for zeroes in all parameters. fixes overea...
Brian Whitton [Fri, 22 Aug 2014 17:43:50 +0000 (13:43 -0400)]
simplifies transparency check to only look for zeroes in all parameters. fixes overeager transparent keyword optimization

10 years agoMerge pull request #340 from lukeapage/patch-2
Goal Smashers Dev Team [Thu, 14 Aug 2014 20:32:11 +0000 (21:32 +0100)]
Merge pull request #340 from lukeapage/patch-2

Add roundingPrecision to programattic description

10 years agoAdd roundingPrecision to programattic description
Luke Page [Thu, 14 Aug 2014 15:59:18 +0000 (16:59 +0100)]
Add roundingPrecision to programattic description

10 years agoVersion 2.2.13.
Jakub Pawlowicz [Tue, 12 Aug 2014 21:37:03 +0000 (22:37 +0100)]
Version 2.2.13.

10 years agoFix #337 -- component importance.
Andrew Crites [Mon, 11 Aug 2014 22:33:45 +0000 (18:33 -0400)]
Fix #337 -- component importance.

If a matching component and the corresponding token are both important, treat it as if neither is

10 years agoVersion 2.2.12.
Jakub Pawlowicz [Sat, 2 Aug 2014 10:37:30 +0000 (11:37 +0100)]
Version 2.2.12.

10 years agoFixes #332 - background shorthand with none and color at the end (per spec).
Jakub Pawlowicz [Sat, 2 Aug 2014 10:01:06 +0000 (11:01 +0100)]
Fixes #332 - background shorthand with none and color at the end (per spec).

10 years agoRefixes #325 - invalid charset declarations.
Jakub Pawlowicz [Sat, 2 Aug 2014 09:41:12 +0000 (10:41 +0100)]
Refixes #325 - invalid charset declarations.

* All incorrect, non-lowercase charsets are being now removed.
* Removes stripping @IMPORT declarations.

10 years agoFixes invalid CSS in unit tests.
Jakub Pawlowicz [Sat, 2 Aug 2014 09:37:13 +0000 (10:37 +0100)]
Fixes invalid CSS in unit tests.

10 years agoFixes #329 - font shorthands incorrectly processed.
Jakub Pawlowicz [Sat, 2 Aug 2014 09:33:47 +0000 (10:33 +0100)]
Fixes #329 - font shorthands incorrectly processed.

10 years agoFixes issue with tokenizer removing first selector after an unknown @ rule.
Jakub Pawlowicz [Tue, 29 Jul 2014 20:42:20 +0000 (21:42 +0100)]
Fixes issue with tokenizer removing first selector after an unknown @ rule.

See discussion in #325.

10 years agoVersion 2.2.11.
Jakub Pawlowicz [Mon, 28 Jul 2014 21:39:02 +0000 (22:39 +0100)]
Version 2.2.11.

10 years agoFixes #326 - regression issue in background-size minification.
Jakub Pawlowicz [Mon, 28 Jul 2014 21:38:00 +0000 (22:38 +0100)]
Fixes #326 - regression issue in background-size minification.

10 years agoVersion 2.2.10.
Jakub Pawlowicz [Sun, 27 Jul 2014 13:28:40 +0000 (14:28 +0100)]
Version 2.2.10.

10 years agoFixes #322 - adds background-size support to advanced optimizer.
Jakub Pawlowicz [Sun, 27 Jul 2014 12:42:08 +0000 (13:42 +0100)]
Fixes #322 - adds background-size support to advanced optimizer.

10 years agoFixes #307 - background-color in muliple backgrounds.
Jakub Pawlowicz [Sun, 27 Jul 2014 10:35:18 +0000 (11:35 +0100)]
Fixes #307 - background-color in muliple backgrounds.

Apparently multiple backgrounds allow background-color in last value only:
http://www.w3.org/TR/css3-background/#the-background

10 years agoImproves performance of advanced mode validators.
Jakub Pawlowicz [Sun, 27 Jul 2014 09:51:42 +0000 (10:51 +0100)]
Improves performance of advanced mode validators.

10 years agoFixes #323 - variable references being stripped out.
Jakub Pawlowicz [Sun, 27 Jul 2014 00:01:43 +0000 (01:01 +0100)]
Fixes #323 - variable references being stripped out.

* Advanced optimizations haven't supported CSS variables.

10 years agoFixes #325 - removing invalid special declarations.
Jakub Pawlowicz [Sat, 26 Jul 2014 23:08:53 +0000 (00:08 +0100)]
Fixes #325 - removing invalid special declarations.

10 years agoMerge pull request #324 from XhmikosR/browserify
Goal Smashers Dev Team [Fri, 25 Jul 2014 22:16:14 +0000 (23:16 +0100)]
Merge pull request #324 from XhmikosR/browserify

Update browserify to v5.x.

10 years agoUpdate browserify to v5.x.
XhmikosR [Fri, 25 Jul 2014 05:30:30 +0000 (08:30 +0300)]
Update browserify to v5.x.

10 years agoVersion 2.2.9.
Jakub Pawlowicz [Wed, 23 Jul 2014 22:40:27 +0000 (23:40 +0100)]
Version 2.2.9.

10 years agoRemoves `fourBySpacesOrFunctions` thanks to new Splitter helper.
Jakub Pawlowicz [Wed, 23 Jul 2014 22:38:28 +0000 (23:38 +0100)]
Removes `fourBySpacesOrFunctions` thanks to new Splitter helper.

10 years agoAdds `background` normalization according to W3C spec.
Jakub Pawlowicz [Wed, 23 Jul 2014 22:28:01 +0000 (23:28 +0100)]
Adds `background` normalization according to W3C spec.

10 years agoFixes #316 - incorrect background processing.
Jakub Pawlowicz [Mon, 21 Jul 2014 19:42:22 +0000 (20:42 +0100)]
Fixes #316 - incorrect background processing.

* Reworks advanced processing for backgrounds so all properties are correctly identified.
* Fixes removing `0 0` background-position as it's default.