clean-css.git
9 years agoVersion 3.0.3.
Jakub Pawlowicz [Wed, 7 Jan 2015 14:00:57 +0000 (14:00 +0000)]
Version 3.0.3.

9 years agoFixes #357 - remaining non-standard but valid URL syntax.
Jakub Pawlowicz [Thu, 8 Jan 2015 23:22:48 +0000 (23:22 +0000)]
Fixes #357 - remaining non-standard but valid URL syntax.

9 years agoFixes source map specs.
Jakub Pawlowicz [Thu, 8 Jan 2015 23:05:21 +0000 (23:05 +0000)]
Fixes source map specs.

9 years agoFixes #431 - documents behaviour when no callback given.
Jakub Pawlowicz [Thu, 8 Jan 2015 22:48:33 +0000 (22:48 +0000)]
Fixes #431 - documents behaviour when no callback given.

9 years agoFixes #158 - adds advanced selectors rearrangements.
Jakub Pawlowicz [Tue, 6 Jan 2015 20:29:07 +0000 (20:29 +0000)]
Fixes #158 - adds advanced selectors rearrangements.

* Moves selectors around if moved properties are not redefined in between.

9 years agoAdds better non-adjacent selector merging when body is the same.
Jakub Pawlowicz [Tue, 6 Jan 2015 19:16:57 +0000 (19:16 +0000)]
Adds better non-adjacent selector merging when body is the same.

* See #158.

9 years agoBumps master version to 3.1.0-pre.
Jakub Pawlowicz [Tue, 6 Jan 2015 18:28:34 +0000 (18:28 +0000)]
Bumps master version to 3.1.0-pre.

9 years agoFixes #182 - removing space after closing brace.
Jakub Pawlowicz [Sun, 4 Jan 2015 20:12:05 +0000 (20:12 +0000)]
Fixes #182 - removing space after closing brace.

* It's not only for transform functions but any function.
* On by default, off in IE<9 compatibility mode.
* Can be managed using `+-properties.spaceAfterClosingBrace` compatibility option.

9 years agoAdds 0deg -> 0 minification.
Jakub Pawlowicz [Sun, 4 Jan 2015 11:42:59 +0000 (11:42 +0000)]
Adds 0deg -> 0 minification.

* That's when value is the only argument, e.g. `skew` or `rotate`.

9 years agoVersion 3.0.2.
Jakub Pawlowicz [Sun, 4 Jan 2015 10:48:33 +0000 (10:48 +0000)]
Version 3.0.2.

9 years agoFixes #422 - proper calc() handling in background position.
Jakub Pawlowicz [Sun, 4 Jan 2015 10:44:18 +0000 (10:44 +0000)]
Fixes #422 - proper calc() handling in background position.

9 years agoMerge pull request #426 from XhmikosR/deps
Jakub Pawlowicz [Wed, 31 Dec 2014 14:50:41 +0000 (14:50 +0000)]
Merge pull request #426 from XhmikosR/deps

Update commander dependency.

9 years agoUpdate commander dependency.
XhmikosR [Tue, 30 Dec 2014 08:02:51 +0000 (10:02 +0200)]
Update commander dependency.

9 years agoMerge pull request #424 from XhmikosR/patch-1
Jakub Pawlowicz [Fri, 26 Dec 2014 06:44:54 +0000 (06:44 +0000)]
Merge pull request #424 from XhmikosR/patch-1

Update README.md

9 years agoUpdate README.md
XhmikosR [Thu, 25 Dec 2014 17:31:43 +0000 (19:31 +0200)]
Update README.md

Remove obsolete info about 1.x to 2.x upgrade now that 3.x is out.

9 years agoMerge pull request #423 from XhmikosR/deps
Jakub Pawlowicz [Thu, 25 Dec 2014 17:27:35 +0000 (17:27 +0000)]
Merge pull request #423 from XhmikosR/deps

Update devDependencies.

9 years agoUpdate Browserify devDependency.
XhmikosR [Thu, 25 Dec 2014 16:38:05 +0000 (18:38 +0200)]
Update Browserify devDependency.

9 years agoMerge pull request #413 from silverwind/patch-1
Jakub Pawlowicz [Sat, 20 Dec 2014 11:53:26 +0000 (11:53 +0000)]
Merge pull request #413 from silverwind/patch-1

Readme: Update badges

9 years agoReadme: Update badges
silverwind [Sat, 20 Dec 2014 00:05:41 +0000 (01:05 +0100)]
Readme: Update badges

9 years agoVersion 3.0.1.
Jakub Pawlowicz [Fri, 19 Dec 2014 21:03:22 +0000 (21:03 +0000)]
Version 3.0.1.

9 years agoFixes #410 - handling comments in advanced optimizations.
Jakub Pawlowicz [Fri, 19 Dec 2014 21:00:45 +0000 (21:00 +0000)]
Fixes #410 - handling comments in advanced optimizations.

9 years agoFixes #411 - stringifying properties with important comments.
Jakub Pawlowicz [Fri, 19 Dec 2014 20:33:51 +0000 (20:33 +0000)]
Fixes #411 - stringifying properties with important comments.

9 years agoVersion 3.0.0.
Jakub Pawlowicz [Thu, 18 Dec 2014 21:18:44 +0000 (21:18 +0000)]
Version 3.0.0.

9 years agoAdds missing history of 2.2.x.
Jakub Pawlowicz [Thu, 18 Dec 2014 20:51:14 +0000 (20:51 +0000)]
Adds missing history of 2.2.x.

* That's for backported issues only.

9 years agoFixes #405 - background-size merging is off by default.
Jakub Pawlowicz [Thu, 18 Dec 2014 00:35:38 +0000 (00:35 +0000)]
Fixes #405 - background-size merging is off by default.

* That's to remedy issues in Chrome and older versions of Safari and stock Android browsers.
* If not for Chrome's issue then it would have been left on by default.

9 years agoFixes #398 - restoring important comments.
Jakub Pawlowicz [Thu, 18 Dec 2014 00:26:22 +0000 (00:26 +0000)]
Fixes #398 - restoring important comments.

* Should be rather done on tokenization step. To be improved in 3.1.

9 years agoUpdates readme with a correct path to integration tests.
Jakub Pawlowicz [Tue, 16 Dec 2014 20:24:07 +0000 (20:24 +0000)]
Updates readme with a correct path to integration tests.

9 years agoMoves 'test/data' and 'test/data-bench' to 'test/fixtures'.
Jakub Pawlowicz [Tue, 16 Dec 2014 20:22:51 +0000 (20:22 +0000)]
Moves 'test/data' and 'test/data-bench' to 'test/fixtures'.

9 years agoBumps nock and changes its version matching.
Jakub Pawlowicz [Tue, 16 Dec 2014 00:04:09 +0000 (00:04 +0000)]
Bumps nock and changes its version matching.

* Saves us from endless bumps as new nock versions are coming way too often.

9 years agoSimplifies assert checks in tests.
Jakub Pawlowicz [Mon, 15 Dec 2014 23:58:31 +0000 (23:58 +0000)]
Simplifies assert checks in tests.

* Also ensures `assert.equal` is always in the right order.

9 years agoFixes #400 - CleanCSS#minify accepts an array of filenames.
Jakub Pawlowicz [Sun, 14 Dec 2014 18:50:39 +0000 (18:50 +0000)]
Fixes #400 - CleanCSS#minify accepts an array of filenames.

* Both relative and absolute paths are supported - see test/module-test.js.

9 years agoFixes broken specs due to code formatting :/
Jakub Pawlowicz [Sun, 14 Dec 2014 10:43:14 +0000 (10:43 +0000)]
Fixes broken specs due to code formatting :/

9 years agoAverages benchmark time over 10 runs.
Jakub Pawlowicz [Sun, 14 Dec 2014 09:46:11 +0000 (09:46 +0000)]
Averages benchmark time over 10 runs.

9 years agoSimplifies arguments handling in binary.
Jakub Pawlowicz [Sat, 13 Dec 2014 20:59:44 +0000 (20:59 +0000)]
Simplifies arguments handling in binary.

9 years agoRewrites url rebasing and rewriting in OO style.
Jakub Pawlowicz [Sat, 13 Dec 2014 20:44:24 +0000 (20:44 +0000)]
Rewrites url rebasing and rewriting in OO style.

9 years agoRemoves unnecessary variable declarations.
Jakub Pawlowicz [Sat, 13 Dec 2014 20:35:05 +0000 (20:35 +0000)]
Removes unnecessary variable declarations.

9 years agoSimplifies input source map tracker.
Jakub Pawlowicz [Sat, 13 Dec 2014 20:27:22 +0000 (20:27 +0000)]
Simplifies input source map tracker.

9 years agoRewrites ImportInliner for full OO.
Jakub Pawlowicz [Sat, 13 Dec 2014 20:21:35 +0000 (20:21 +0000)]
Rewrites ImportInliner for full OO.

* It's also a bit easier to understand now.

9 years agoFixes issue #404 - removes all state sharing in API.
Jakub Pawlowicz [Sat, 13 Dec 2014 11:53:02 +0000 (11:53 +0000)]
Fixes issue #404 - removes all state sharing in API.

9 years agoFixes #304 - background position merging.
Jakub Pawlowicz [Sat, 13 Dec 2014 10:42:56 +0000 (10:42 +0000)]
Fixes #304 - background position merging.

* Background positions with more than 2 components were treated incorrectly.

9 years agoFixes #403 - reworks tracking input files in source maps.
Jakub Pawlowicz [Fri, 12 Dec 2014 22:34:12 +0000 (22:34 +0000)]
Fixes #403 - reworks tracking input files in source maps.

* We don't keep filenames in escaped data anymore.

9 years agoRemoves extra `list-style` and `outline` merging.
Jakub Pawlowicz [Wed, 10 Dec 2014 20:16:21 +0000 (20:16 +0000)]
Removes extra `list-style` and `outline` merging.

9 years agoFixes #373 - background merging is entirely handled by shorthand compactor.
Jakub Pawlowicz [Sat, 29 Nov 2014 23:01:08 +0000 (23:01 +0000)]
Fixes #373 - background merging is entirely handled by shorthand compactor.

9 years agoBumps nock dev dependency to 0.51.
Jakub Pawlowicz [Wed, 10 Dec 2014 07:56:06 +0000 (07:56 +0000)]
Bumps nock dev dependency to 0.51.

9 years agoBumps Browserify dev dependency to 7.x.
Jakub Pawlowicz [Wed, 10 Dec 2014 07:53:02 +0000 (07:53 +0000)]
Bumps Browserify dev dependency to 7.x.

9 years agoFixes #352 - honors `rebase: false` / `--skip-rebase` in imported stylesheets.
Jakub Pawlowicz [Tue, 9 Dec 2014 22:06:27 +0000 (22:06 +0000)]
Fixes #352 - honors `rebase: false` / `--skip-rebase` in imported stylesheets.

9 years agoUpdates source maps documentation.
Jakub Pawlowicz [Tue, 9 Dec 2014 21:05:52 +0000 (21:05 +0000)]
Updates source maps documentation.

9 years agoAdds source map info to release notes.
Jakub Pawlowicz [Mon, 8 Dec 2014 21:31:13 +0000 (21:31 +0000)]
Adds source map info to release notes.

9 years agoUpdates acknowledgements section.
Jakub Pawlowicz [Mon, 8 Dec 2014 21:30:24 +0000 (21:30 +0000)]
Updates acknowledgements section.

9 years agoAdds source map documentation to readme.
Jakub Pawlowicz [Mon, 8 Dec 2014 21:07:33 +0000 (21:07 +0000)]
Adds source map documentation to readme.

9 years agoSimplifies regular expressions in CleanUp module.
Jakub Pawlowicz [Sun, 7 Dec 2014 22:12:01 +0000 (22:12 +0000)]
Simplifies regular expressions in CleanUp module.

9 years agoImproves selector cleanup.
Jakub Pawlowicz [Sun, 7 Dec 2014 21:44:58 +0000 (21:44 +0000)]
Improves selector cleanup.

* Removes unnecessary regexp.
* Does cleanup and removal of non-understandable selectors in one pass.

9 years agoFixes rebasing input source map sources.
Jakub Pawlowicz [Sun, 7 Dec 2014 11:54:08 +0000 (11:54 +0000)]
Fixes rebasing input source map sources.

* It's been broken in case if a target file exists.

9 years agoFixes handling escaped comments in tokenizer.
Jakub Pawlowicz [Sun, 7 Dec 2014 09:52:26 +0000 (09:52 +0000)]
Fixes handling escaped comments in tokenizer.

* That should be much easier with #395 which will get rid of them sooner.

9 years agoFixes tracking nested selectors from source input maps.
Jakub Pawlowicz [Sat, 6 Dec 2014 22:51:43 +0000 (22:51 +0000)]
Fixes tracking nested selectors from source input maps.

* It was broken because input source maps point to the most specific selector.
* We were tracking by least specific before.
* It is a more or less a hack since at 'stringify' stage we already lost info about original declaration.
  However it works well so it's gonna be done in 3.1 (see #396).

9 years agoFixes rouge whitespace handling.
Jakub Pawlowicz [Wed, 3 Dec 2014 18:50:45 +0000 (18:50 +0000)]
Fixes rouge whitespace handling.

9 years agoFixes generating relative paths to mapped source files.
Jakub Pawlowicz [Mon, 1 Dec 2014 21:26:20 +0000 (21:26 +0000)]
Fixes generating relative paths to mapped source files.

9 years agoFixes building source maps for styles with and without an input map.
Jakub Pawlowicz [Mon, 1 Dec 2014 20:40:59 +0000 (20:40 +0000)]
Fixes building source maps for styles with and without an input map.

* Previously stringifier was raisining an issue about a missing input source map.

9 years agoSimplifies resolving paths in source map stringifier.
Jakub Pawlowicz [Sat, 29 Nov 2014 23:54:20 +0000 (23:54 +0000)]
Simplifies resolving paths in source map stringifier.

9 years agoRefactors source map stringifier in OO style.
Jakub Pawlowicz [Sat, 29 Nov 2014 23:47:12 +0000 (23:47 +0000)]
Refactors source map stringifier in OO style.

9 years agoChanges column base in source maps from 1 to 0.
Jakub Pawlowicz [Thu, 27 Nov 2014 23:15:54 +0000 (23:15 +0000)]
Changes column base in source maps from 1 to 0.

* Apparently columns are counted from 0 in source maps. Bizarre but true.

9 years agoRemoves `name` property from output source map.
Jakub Pawlowicz [Wed, 26 Nov 2014 18:33:21 +0000 (18:33 +0000)]
Removes `name` property from output source map.

* Per discussion with Luke Page (see #125) it is used in case of shortened variables
  so probably useless when it comes to CSS.

9 years agoAdds correct rebasing for sources in input source maps.
Jakub Pawlowicz [Wed, 26 Nov 2014 18:26:24 +0000 (18:26 +0000)]
Adds correct rebasing for sources in input source maps.

* Supports absolute paths (when `root` option given).
* Supports relative paths (when `target` option given).
* Supports remote URLs.

9 years agoFixes an issue with incorrect source maps inside property blocks.
Jakub Pawlowicz [Sun, 23 Nov 2014 10:31:28 +0000 (10:31 +0000)]
Fixes an issue with incorrect source maps inside property blocks.

9 years agoEnsures CLI presents a warning when source map is set but target file is not.
Jakub Pawlowicz [Wed, 19 Nov 2014 08:02:14 +0000 (08:02 +0000)]
Ensures CLI presents a warning when source map is set but target file is not.

9 years agoAdds support for remote source maps.
Jakub Pawlowicz [Sun, 16 Nov 2014 12:33:21 +0000 (12:33 +0000)]
Adds support for remote source maps.

* http, https, and same protocol (//) are supported.
* Options from `inliner` hash are used for timeouts / extra request options.
* Errors & timeouts are handled gracefully.
* Apparently nock.restore() should be nock.cleanAll().

9 years agoEnables source map tracking only if sourceMap is not falsy.
Jakub Pawlowicz [Fri, 14 Nov 2014 21:56:20 +0000 (21:56 +0000)]
Enables source map tracking only if sourceMap is not falsy.

9 years agoSpeeds up source maps by restoring escaped content only if needed.
Jakub Pawlowicz [Fri, 14 Nov 2014 19:51:07 +0000 (19:51 +0000)]
Speeds up source maps by restoring escaped content only if needed.

9 years agoAdds tracking input source maps in imported files.
Jakub Pawlowicz [Wed, 12 Nov 2014 23:10:57 +0000 (23:10 +0000)]
Adds tracking input source maps in imported files.

* InputSourceMapTracker tracks source maps on per-file basis.

9 years agoAdds pulling input source maps from source map comment.
Jakub Pawlowicz [Tue, 11 Nov 2014 19:48:28 +0000 (19:48 +0000)]
Adds pulling input source maps from source map comment.

9 years agoAdds basic support for input source maps.
Jakub Pawlowicz [Tue, 11 Nov 2014 18:41:54 +0000 (18:41 +0000)]
Adds basic support for input source maps.

* `sourceMap` option can be given as source map string.
* Particularly useful for preprocessed stylesheets.

9 years agoAdds `--source-map` switch for building input's source map.
Jakub Pawlowicz [Sun, 9 Nov 2014 16:06:40 +0000 (16:06 +0000)]
Adds `--source-map` switch for building input's source map.

* It's enabled in CLI only if output file is given.

9 years agoAdds `--skip-shorthand-compacting`/`shorthandComacting` option for disabling shorthan...
Jakub Pawlowicz [Sat, 8 Nov 2014 12:23:08 +0000 (12:23 +0000)]
Adds `--skip-shorthand-compacting`/`shorthandComacting` option for disabling shorthand compacting.

* Also disables shorthand compacting for source maps as it is not defined well enough, yet.

9 years agoAdds source map stringifier.
Jakub Pawlowicz [Thu, 6 Nov 2014 13:45:48 +0000 (13:45 +0000)]
Adds source map stringifier.

* Stringifying with source maps "on" requires doing it in different order.
* Basically restoring escaped data has to be done on every token rather than at the end.

9 years agoFixes stray whitespace tracking in blocks (@media, etc).
Jakub Pawlowicz [Fri, 7 Nov 2014 18:51:41 +0000 (18:51 +0000)]
Fixes stray whitespace tracking in blocks (@media, etc).

9 years agoFixes line tracking in blocks (@media, @font-face, etc).
Jakub Pawlowicz [Thu, 6 Nov 2014 13:51:57 +0000 (13:51 +0000)]
Fixes line tracking in blocks (@media, @font-face, etc).

9 years agoChanges minify method output to handle multiple outputs.
Jakub Pawlowicz [Mon, 3 Nov 2014 20:59:13 +0000 (20:59 +0000)]
Changes minify method output to handle multiple outputs.

9 years agoExtracts rebuilding tokens into Stringifier class.
Jakub Pawlowicz [Sun, 2 Nov 2014 16:20:53 +0000 (16:20 +0000)]
Extracts rebuilding tokens into Stringifier class.

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.