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

10 years agoTurns comma splitter into a more generic splitter.
Jakub Pawlowicz [Mon, 21 Jul 2014 22:25:53 +0000 (23:25 +0100)]
Turns comma splitter into a more generic splitter.

* No longer accepts splitted value as constructor argument but in split method instead.
* Accepts separator value to split over in constructor.

10 years agoMerge pull request #320 from XhmikosR/commander
Goal Smashers Dev Team [Tue, 22 Jul 2014 20:33:51 +0000 (21:33 +0100)]
Merge pull request #320 from XhmikosR/commander

Updates commander to 2.3.x.

10 years agoMerge pull request #319 from aymericbeaumet/master
Goal Smashers Dev Team [Tue, 22 Jul 2014 20:32:04 +0000 (21:32 +0100)]
Merge pull request #319 from aymericbeaumet/master

Updates readme with metalsmith's plugin info.

10 years agoUpdate commander to 2.3.x.
XhmikosR [Tue, 22 Jul 2014 05:07:03 +0000 (08:07 +0300)]
Update commander to 2.3.x.

10 years agoUpdate readme
Aymeric Beaumet [Mon, 21 Jul 2014 01:54:44 +0000 (03:54 +0200)]
Update readme

10 years agoVersion 2.2.8.
Jakub Pawlowicz [Mon, 14 Jul 2014 21:44:28 +0000 (22:44 +0100)]
Version 2.2.8.

10 years agoFixes #313 - processing comment marks in urls.
Jakub Pawlowicz [Mon, 14 Jul 2014 21:41:46 +0000 (22:41 +0100)]
Fixes #313 - processing comment marks in urls.

10 years agoFixes #315 - rgba/hsla -> transparent in gradients.
Jakub Pawlowicz [Sun, 13 Jul 2014 10:56:10 +0000 (11:56 +0100)]
Fixes #315 - rgba/hsla -> transparent in gradients.

Apparently Safari/Firefox does not implement transparent correctly thus
it gives wrong output when replaced.

10 years agoVersion 2.2.7.
Jakub Pawlowicz [Thu, 10 Jul 2014 22:04:45 +0000 (23:04 +0100)]
Version 2.2.7.

10 years agoFixes #312 - merging backgrounds when one property is not repeated.
Jakub Pawlowicz [Wed, 9 Jul 2014 22:33:35 +0000 (23:33 +0100)]
Fixes #312 - merging backgrounds when one property is not repeated.

10 years agoFixes #304 - merging multiple backgrounds.
Jakub Pawlowicz [Tue, 8 Jul 2014 23:28:03 +0000 (00:28 +0100)]
Fixes #304 - merging multiple backgrounds.

10 years agoVersion 2.2.6.
Jakub Pawlowicz [Sat, 5 Jul 2014 13:28:16 +0000 (14:28 +0100)]
Version 2.2.6.

10 years agoAdds faster quote matching in QuoteScanner.
Jakub Pawlowicz [Sat, 5 Jul 2014 13:25:37 +0000 (14:25 +0100)]
Adds faster quote matching in QuoteScanner.

10 years agoFixes #308 - parsing comments in quoted urls.
Jakub Pawlowicz [Sat, 5 Jul 2014 11:08:07 +0000 (12:08 +0100)]
Fixes #308 - parsing comments in quoted urls.

10 years agoImproves QuoteScanner to handle comments correctly.
Jakub Pawlowicz [Sat, 5 Jul 2014 12:58:17 +0000 (13:58 +0100)]
Improves QuoteScanner to handle comments correctly.

10 years agoFixes #311 - exception with leading/trailing decimal point.
Jonathan-L [Thu, 3 Jul 2014 11:52:45 +0000 (12:52 +0100)]
Fixes #311 - exception with leading/trailing decimal point.

10 years agoVersion 2.2.5.
Jakub Pawlowicz [Sun, 29 Jun 2014 22:19:18 +0000 (23:19 +0100)]
Version 2.2.5.

10 years agoReplaces same horizontal & vertical value in border-radius.
Jakub Pawlowicz [Sun, 29 Jun 2014 22:16:46 +0000 (23:16 +0100)]
Replaces same horizontal & vertical value in border-radius.

* border-radius:1em/1em can be turned into border-radius:1em.

10 years agoRemoves extra spaces around / in border-radius.
Jakub Pawlowicz [Sun, 29 Jun 2014 21:28:03 +0000 (22:28 +0100)]
Removes extra spaces around / in border-radius.

* Apparently horizontal & vertical values can be separated by '/' without spaces around - thanks @XhmikosR.

10 years agoShortens `border-radius` addFourValueShorthand calls.
Jakub Pawlowicz [Sun, 29 Jun 2014 20:57:12 +0000 (21:57 +0100)]
Shortens `border-radius` addFourValueShorthand calls.

10 years agoRefactors addFourValueShorthand to accept hash of options.
Jakub Pawlowicz [Sun, 29 Jun 2014 20:41:47 +0000 (21:41 +0100)]
Refactors addFourValueShorthand to accept hash of options.

10 years agoFixes #305 - allows width keywords in border-width.
Eric Anderson [Fri, 27 Jun 2014 22:19:20 +0000 (18:19 -0400)]
Fixes #305 - allows width keywords in border-width.

When not all sides are specified for things like border/padding/margin
it appears clean-css attempts to normalize the data
(i.e "2px 5px" -> "2px 5px 2px 5px"). This normalization appears to
only look for things matched to cssUnitAnyRegexStr. cssUnitAnyRegexStr
doesn't include width keywords.

The width keywords were already specified for validating outline width.
This commit renames that list to be more generic (just widthKeywords). It
then adds this list to the cssUnitAnyRegexStr regexp.

This commit fixes #305. In addition I added "initial" to the list of
width keywords to fix gruntjs/grunt-contrib-cssmin#103 which is the
issue that lead me to writing this patch. So this commit should solve
that as well.

10 years agoVersion 2.2.4.
Jakub Pawlowicz [Fri, 27 Jun 2014 22:09:08 +0000 (23:09 +0100)]
Version 2.2.4.

10 years agoFixes #301 - proper border-radius processing.
Jakub Pawlowicz [Fri, 27 Jun 2014 22:04:33 +0000 (23:04 +0100)]
Fixes #301 - proper border-radius processing.

* Makes sure horizontal / vertical values of border-radius are respected.

10 years agoMerge pull request #303 from itrelease/master
Goal Smashers Dev Team [Thu, 26 Jun 2014 21:11:46 +0000 (22:11 +0100)]
Merge pull request #303 from itrelease/master

Preserve viewport units

10 years agoPreserve viewport units
Anton Byrna [Thu, 26 Jun 2014 10:34:12 +0000 (14:34 +0400)]
Preserve viewport units

10 years agoVersion 2.2.3.
Jakub Pawlowicz [Tue, 24 Jun 2014 21:28:12 +0000 (22:28 +0100)]
Version 2.2.3.

10 years agoFixes #302 - handling of outline-style: auto.
Jakub Pawlowicz [Tue, 24 Jun 2014 21:27:12 +0000 (22:27 +0100)]
Fixes #302 - handling of outline-style: auto.

10 years agoFixes History.md links to version diffs.
Jakub Pawlowicz [Wed, 18 Jun 2014 21:52:00 +0000 (22:52 +0100)]
Fixes History.md links to version diffs.

10 years agoVersion 2.2.2.
Jakub Pawlowicz [Wed, 18 Jun 2014 21:50:16 +0000 (22:50 +0100)]
Version 2.2.2.