Jakub Pawlowicz [Wed, 19 Feb 2014 07:45:40 +0000 (07:45 +0000)]
Version 2.1.1.
Jakub Pawlowicz [Wed, 19 Feb 2014 07:43:26 +0000 (07:43 +0000)]
Adds faster selectors processing in advanced optimizer.
Selectors clean up is not needed in case of a single selector being processed.
Jakub Pawlowicz [Wed, 19 Feb 2014 07:38:15 +0000 (07:38 +0000)]
Fixes #241 - incorrect handling of :not() selectors.
Since :not() can have multiple selectors passed in, e.g. :not(div,span),
commas need to be handled in a more clever way.
Goal Smashers Dev Team [Tue, 18 Feb 2014 08:02:14 +0000 (08:02 +0000)]
Merge pull request #242 from lukeapage/patch-1
Adds compatibility to programmability section too.
Luke Page [Tue, 18 Feb 2014 07:20:05 +0000 (07:20 +0000)]
Add compatibility to programmability section too
Jakub Pawlowicz [Thu, 13 Feb 2014 22:45:51 +0000 (22:45 +0000)]
Version 2.1.0.
Jakub Pawlowicz [Thu, 13 Feb 2014 21:54:49 +0000 (21:54 +0000)]
Adds better structured batch tests.
Use of async topic prevents individual fails from stopping subsequent tests from being run.
Jakub Pawlowicz [Mon, 10 Feb 2014 22:18:40 +0000 (22:18 +0000)]
Adds a full list of unsupported selectors on IE7 and IE8.
Makes sure we don't merge all unsupported selectors as per list at:
http://kimblim.dk/css-tests/selectors/
Jakub Pawlowicz [Mon, 10 Feb 2014 21:53:36 +0000 (21:53 +0000)]
Fixes #235 - adds IE7 compatibility mode.
:focus, :after, and :before selectors are not supported in IE7 so we can't
merge selectors using them.
Jakub Pawlowicz [Mon, 10 Feb 2014 21:29:15 +0000 (21:29 +0000)]
Fixes #236 - incorrect rebasing with nested `import`s.
Because of a typo, rebasing of nested relative imports were not processed correctly,
leading to relative paths to last @import not the original one.
Thanks to @alexeyraspopov for spotting it!
Jakub Pawlowicz [Sun, 9 Feb 2014 21:34:54 +0000 (21:34 +0000)]
Fixes #226 - skips border:none => border:0 minification.
It's not always safe. See http://dabblet.com/gist/
8716224 for details.
Jakub Pawlowicz [Sun, 9 Feb 2014 21:15:39 +0000 (21:15 +0000)]
Fixes #223 - adjacent selectors merging.
Makes sure removing duplicates and merging adjacent selectors is run twice, beforehand the latter was not the case.
This is because adjacent selectors may be merged in the first pass creating opportunity to further improve minification.
Jakub Pawlowicz [Fri, 7 Feb 2014 21:09:27 +0000 (21:09 +0000)]
Version 2.0.8.
Jakub Pawlowicz [Fri, 7 Feb 2014 21:07:24 +0000 (21:07 +0000)]
Fixes #232 - edge case in non-adjacent selectors merging.
Gets rid of an edge case when non-adjacent selectors merging can lead to incorrect overridding of properties.
Jakub Pawlowicz [Wed, 5 Feb 2014 07:14:02 +0000 (07:14 +0000)]
Fixes #230 - adds better handling of zero values.
Previously 0.0 + unit and -0 was handled incorrectly.
GoalSmashers [Mon, 3 Feb 2014 06:24:07 +0000 (06:24 +0000)]
Fixes #229 - adds improved processing of fraction numbers.
opacity:1. => opacity:1
opacity:.0 => opacity:0
GoalSmashers [Mon, 3 Feb 2014 04:37:36 +0000 (04:37 +0000)]
Fixes #215 - adds removing leading zeros from numerical values.
E.g 040px can be safely turned into 40px.
GoalSmashers [Sat, 1 Feb 2014 08:12:53 +0000 (08:12 +0000)]
Fixes #217 - removing extra whitespace from attribute selectors and urls.
Browsers strip the whitespace before evaluating so should we.
GoalSmashers [Sat, 1 Feb 2014 07:47:17 +0000 (07:47 +0000)]
Fixes #220 - universal selector between two comments.
Comments were incorrectly processed when universal selector was placed in between.
GoalSmashers [Sat, 1 Feb 2014 07:30:24 +0000 (07:30 +0000)]
Fixes #218 - gets rid of @import statements appearing after CSS content.
See www.w3.org/TR/CSS21/cascade.html#at-import for details.
GoalSmashers [Thu, 30 Jan 2014 08:05:26 +0000 (08:05 +0000)]
Fixes out of bounds values in rgb / rgba declarations. See #216.
GoalSmashers [Thu, 30 Jan 2014 08:04:15 +0000 (08:04 +0000)]
Fixes #216 - handling 0% in rgb / rgba declarations.
tomByrer [Thu, 30 Jan 2014 07:44:13 +0000 (07:44 +0000)]
Fixes #213 - faster rgb to hex transforms.
Goal Smashers Dev Team [Sun, 26 Jan 2014 13:36:26 +0000 (13:36 +0000)]
Fixes path slashes in Readme to correct ones.
Goal Smashers Dev Team [Sun, 26 Jan 2014 11:16:25 +0000 (11:16 +0000)]
Fixes #212 - adds contributing rules to readme.
Adds more information on how to contribute and where to put tests.
GoalSmashers [Thu, 16 Jan 2014 22:22:15 +0000 (22:22 +0000)]
Version 2.0.7.
GoalSmashers [Thu, 16 Jan 2014 22:20:24 +0000 (22:20 +0000)]
Fixes #208 - fixes swallowing `@viewport`, `@page`, and `@supports` when doing advanced optimizations.
GoalSmashers [Sat, 11 Jan 2014 15:56:34 +0000 (16:56 +0100)]
Fixes #207 - bug in parsing protocol `@import`s.
Spaces inside url part of import declaration were incorrectly parsed.
Goal Smashers Dev Team [Sat, 11 Jan 2014 14:21:55 +0000 (06:21 -0800)]
Merge pull request #206 from XhmikosR/master
Update nock dependency.
XhmikosR [Sat, 11 Jan 2014 08:36:48 +0000 (10:36 +0200)]
Update nock dependency.
GoalSmashers [Thu, 12 Dec 2013 16:30:54 +0000 (17:30 +0100)]
Fixes debug mode stats for stylesheets using `@import` statements.
* Size of inlined files were not taken into account resulting in wrong "Original size" and "Efficiency".
GoalSmashers [Thu, 12 Dec 2013 16:01:23 +0000 (17:01 +0100)]
Adds inlining info in debug mode.
GoalSmashers [Tue, 10 Dec 2013 12:14:54 +0000 (13:14 +0100)]
Fixes #85 - adds resolving protocol @import statements.
* Rewrote inliner to process data asynchronously.
* Supports 2xx responses, redirects, errors, and timeouts.
* Supports cyclical references.
* Supports protocol-less requests (defaults to HTTP).
* Supports overriding request options - see http://nodejs.org/api/http.html#http_http_request_options_callback
* Supports timeout in ./bin/cleancss via --timeout / -t switches.
* Supports inlining local resources only without a callback.
* Supports rebasing URLs in remote @imports.
* Always triggers a callback asynchronously.
GoalSmashers [Tue, 10 Dec 2013 09:18:08 +0000 (10:18 +0100)]
Adds an optional callback to CleanCSS#minify method.
GoalSmashers [Sat, 4 Jan 2014 16:01:26 +0000 (17:01 +0100)]
Version 2.0.6.
GoalSmashers [Fri, 27 Dec 2013 11:27:18 +0000 (12:27 +0100)]
Fixes #198 - correctly handle a mixup of comments and @import statements.
This is a follow up to #192 which apparently fixed an edge case of processing
more than one @import inside a comment but introduced this issue.
GoalSmashers [Fri, 3 Jan 2014 14:58:38 +0000 (15:58 +0100)]
Fixes #205 - freeze on broken @import declaration.
@import declarations without trailing semicolon led to an infinite loop in tokenizer.
GoalSmashers [Fri, 3 Jan 2014 11:23:08 +0000 (12:23 +0100)]
Updates copyright stamps.
GoalSmashers [Fri, 3 Jan 2014 11:22:21 +0000 (12:22 +0100)]
Merge branch 'master' of github.com:GoalSmashers/clean-css
GoalSmashers [Fri, 3 Jan 2014 11:10:47 +0000 (12:10 +0100)]
Version 2.0.5.
GoalSmashers [Fri, 3 Jan 2014 11:06:48 +0000 (12:06 +0100)]
Fixes #203 - passing Buffer instance as a first argument to minify method.
GoalSmashers [Wed, 25 Dec 2013 10:00:44 +0000 (11:00 +0100)]
Fixes #199 - keeps line breaks if requested when advanced optimizations are off.
Goal Smashers Dev Team [Fri, 27 Dec 2013 12:56:23 +0000 (04:56 -0800)]
Merge pull request #200 from XhmikosR/master
Minor improvements
XhmikosR [Fri, 27 Dec 2013 03:50:13 +0000 (05:50 +0200)]
Update JSHint dependency.
XhmikosR [Mon, 25 Nov 2013 08:47:21 +0000 (10:47 +0200)]
Update README.md.
* switch to the shields.io theme for the dependency badges
* use the link to the our comparison page
* use the proper case for Node.js and Grunt
GoalSmashers [Thu, 19 Dec 2013 14:20:40 +0000 (15:20 +0100)]
Version 2.0.4.
Goal Smashers Dev Team [Thu, 19 Dec 2013 14:15:18 +0000 (06:15 -0800)]
Merge pull request #193 from MWers/hsl-range
Adds out-of-bounds handling for HSL colors.
Matt Walker [Tue, 17 Dec 2013 05:58:16 +0000 (21:58 -0800)]
Added out-of-bounds handling for hslToRgb function with unit tests
GoalSmashers [Wed, 18 Dec 2013 22:05:31 +0000 (23:05 +0100)]
Version 2.0.3.
GoalSmashers [Wed, 18 Dec 2013 21:49:48 +0000 (22:49 +0100)]
Fixes #192 - many `@import`s inside a comment.
* Broken comments scanner when more than one import inside a comment.
GoalSmashers [Wed, 18 Dec 2013 20:08:41 +0000 (21:08 +0100)]
Fixes #191 - quotes around font name should not be removed if value starts with a digit.
GoalSmashers [Wed, 11 Dec 2013 18:24:08 +0000 (19:24 +0100)]
Fixes #186 - strips unit from `0rem` unless in ie8 compatibility mode.
GoalSmashers [Wed, 11 Dec 2013 17:48:45 +0000 (18:48 +0100)]
Deprecates '--selectors-merge-mode' in favor of a more generic '--compatibility' switch.
* 'selectorsMergeMode' option to library is also renamed to 'compatibility'.
Goal Smashers Dev Team [Thu, 5 Dec 2013 19:10:01 +0000 (11:10 -0800)]
Merge pull request #189 from stephenmathieson/refactor/convert-to-constructor
Converts CleanCSS function into a constructor.
Stephen Mathieson [Thu, 5 Dec 2013 17:07:56 +0000 (12:07 -0500)]
Fixes #188 - Convert CleanCSS to a constructor
This allows for adding custom methods on the CleanCSS prototype.
Goal Smashers Dev Team [Tue, 26 Nov 2013 14:46:23 +0000 (06:46 -0800)]
Merge pull request #187 from XhmikosR/commander
Updates commander dependency.
XhmikosR [Mon, 25 Nov 2013 08:40:25 +0000 (10:40 +0200)]
Update commander dependency.
Goal Smashers Dev Team [Wed, 20 Nov 2013 15:33:35 +0000 (07:33 -0800)]
Merge pull request #183 from XhmikosR/hrtime
Remove check for `process.hrtime()`.
XhmikosR [Tue, 19 Nov 2013 17:33:46 +0000 (19:33 +0200)]
Remove check for `process.hrtime()`.
Node.js 0.8 is required already.
GoalSmashers [Mon, 18 Nov 2013 21:30:50 +0000 (22:30 +0100)]
Version 2.0.2.
GoalSmashers [Mon, 18 Nov 2013 21:01:37 +0000 (22:01 +0100)]
Fixes #177 - processing incorrect content should not break CSS.
* Adds a warning on an incorrect content or a closing parenthesis.
Goal Smashers Dev Team [Mon, 18 Nov 2013 18:08:19 +0000 (19:08 +0100)]
Moves grunt info after CLI and module use so the order is more logical.
Goal Smashers Dev Team [Mon, 18 Nov 2013 18:05:42 +0000 (19:05 +0100)]
Fixes #180 - adds grunt info to readme.
GoalSmashers [Mon, 18 Nov 2013 09:43:18 +0000 (10:43 +0100)]
Fixes #160 - re-runs advanced optimizations until no changes are detected.
* That's because merging adjacent selectors can lead to new optimization opportunities.
GoalSmashers [Sun, 17 Nov 2013 14:33:13 +0000 (15:33 +0100)]
Skips empty removal if advanced processing is enabled.
* Since advanced processing tokenizes data we can rebuild it without empty elements.
GoalSmashers [Sun, 17 Nov 2013 12:05:00 +0000 (13:05 +0100)]
Adds minor speeed optimizations to property & selector optimizers.
GoalSmashers [Sun, 17 Nov 2013 09:31:04 +0000 (10:31 +0100)]
Fixes #161 - adds ~30x faster tokenizer.
* Splits data into 128 bytes long chunks (rounded to nearest closing parenthesis).
* Won't seek trough the whole document all the time.
GoalSmashers [Sat, 16 Nov 2013 12:01:14 +0000 (13:01 +0100)]
Fixes #163 - adds pixel rounding to 2nd decimal place.
GoalSmashers [Sat, 16 Nov 2013 09:59:18 +0000 (10:59 +0100)]
Fixes #165 - adds removing extra space after rgba/hsla declarations.
GoalSmashers [Thu, 14 Nov 2013 08:38:14 +0000 (09:38 +0100)]
Version 2.0.1.
GoalSmashers [Thu, 14 Nov 2013 08:31:30 +0000 (09:31 +0100)]
Fixes #176 - hangs when `undefined` is used as a property value.
Goal Smashers Dev Team [Sat, 9 Nov 2013 14:55:32 +0000 (06:55 -0800)]
Merge pull request #175 from XhmikosR/master
Minor style changes.
XhmikosR [Fri, 8 Nov 2013 16:39:54 +0000 (18:39 +0200)]
Minor style changes.
Goal Smashers Dev Team [Tue, 5 Nov 2013 13:39:01 +0000 (05:39 -0800)]
Merge pull request #174 from XhmikosR/master
Minor improvements.
XhmikosR [Mon, 4 Nov 2013 11:06:39 +0000 (13:06 +0200)]
Update JSHint's options.
Enable indent option and move multistr option where is needed only.
XhmikosR [Mon, 4 Nov 2013 09:51:56 +0000 (11:51 +0200)]
Add "bin/cleancss" to the JSHint command and fix the warnings.
Goal Smashers Dev Team [Mon, 4 Nov 2013 16:21:11 +0000 (17:21 +0100)]
Adds a direct link to css-minification-benchmark results.
GoalSmashers [Mon, 4 Nov 2013 13:31:25 +0000 (14:31 +0100)]
Version 2.0.0.
GoalSmashers [Mon, 4 Nov 2013 12:29:44 +0000 (13:29 +0100)]
Renames test/custom-test.js to test/module-test.js.
GoalSmashers [Mon, 4 Nov 2013 12:26:33 +0000 (13:26 +0100)]
Updates unit tests to allow flat arguments only in cssContext.
* There is no ' #<number>' appended to test name anymore.
GoalSmashers [Mon, 4 Nov 2013 12:04:52 +0000 (13:04 +0100)]
Fixes #146 - moves benchmark out of the repository.
* Updates clean-css tagline to include a link to css-minification-benchmark.
GoalSmashers [Mon, 4 Nov 2013 11:05:29 +0000 (12:05 +0100)]
Rearranges History.md a bit.
GoalSmashers [Mon, 4 Nov 2013 09:30:07 +0000 (10:30 +0100)]
Fixes #139 - adds consistent error and warning handling for CLI and library.
* Does not throw errors anymore, instead prints them out to STDERR and exits with status 1.
* Adds two new fields to CleanCSS objects - warnings and errors.
* Updates imports/inliner.js to not act as a singleton.
* Adds 'both root and output file given' warning to inliner.
Goal Smashers Dev Team [Mon, 4 Nov 2013 10:33:49 +0000 (02:33 -0800)]
Merge pull request #171 from XhmikosR/master
Forces single quotes via JSHint.
XhmikosR [Mon, 4 Nov 2013 10:10:28 +0000 (12:10 +0200)]
Update JSHint options.
XhmikosR [Mon, 4 Nov 2013 09:55:39 +0000 (11:55 +0200)]
Style consistency changes.
XhmikosR [Mon, 4 Nov 2013 09:02:20 +0000 (11:02 +0200)]
Force usage of single quotes in JSHint.
GoalSmashers [Mon, 4 Nov 2013 08:01:52 +0000 (09:01 +0100)]
Fixes #166 - output more info in CLI's `debug` mode.
* Show efficiency with up to two decimal places.
GoalSmashers [Mon, 4 Nov 2013 07:24:42 +0000 (08:24 +0100)]
Fixes #145 - adds minifications stats when calling library with `debug: true` option.
* Refactors CLI `--debug` to use these stats too.
* Moves `originalSize` field into `stats` one.
Goal Smashers Dev Team [Mon, 4 Nov 2013 07:17:36 +0000 (23:17 -0800)]
Merge pull request #169 from XhmikosR/master
Updates docs & history.
GoalSmashers [Sun, 3 Nov 2013 14:27:44 +0000 (15:27 +0100)]
Fixes #138 - makes CleanCSS interface fully object oriented.
* use `new CleanCSS(options).minify(css)` to minify CSS.
* adds 1.x -> 2.x migration guide.
XhmikosR [Sat, 2 Nov 2013 23:04:49 +0000 (01:04 +0200)]
Update docs.
GoalSmashers [Sun, 3 Nov 2013 12:08:24 +0000 (13:08 +0100)]
Fixes #167 - `background:transparent` minification.
* It is safe to make it `background:0 0`.
GoalSmashers [Sat, 2 Nov 2013 20:12:50 +0000 (21:12 +0100)]
Improves property overriding & redefining algorithm.
* Handles redefining overridden properties.
* Treats -ms-filter/filter as a background / background-image property.
GoalSmashers [Sat, 2 Nov 2013 12:07:41 +0000 (13:07 +0100)]
Adds reducing non-adjacent selectors when overridden by more complex selectors.
* E.g. "strong{color:red}.one,strong{color:#fff}" can be reduced to ".one,strong{color:#fff}".
* Fixes property optimizer when body is empty.
* Fixes property optimizer with merging on joins.
GoalSmashers [Fri, 1 Nov 2013 17:14:41 +0000 (18:14 +0100)]
Adds ignoring misplaced top level curly braces.
GoalSmashers [Fri, 1 Nov 2013 14:11:25 +0000 (15:11 +0100)]
Adds `--skip-advanced`/`noAdvanced` switch to disable advanced optimizations.
GoalSmashers [Thu, 31 Oct 2013 16:29:13 +0000 (17:29 +0100)]
Adds reducing non-adjacent selectors.
* Removes repeated properties in same selectors which are not next to each other.
* E.g. '.one{color:red;margin:0}.two{color:#fff}.one{margin:1px}' will become '.one{color:red}.two{color:#fff}.one{margin:1px}' because margin is repeated.
GoalSmashers [Thu, 31 Oct 2013 08:16:26 +0000 (09:16 +0100)]
Adds property overriding so more coarse properties override more granular ones.
* E.g. 'border-top' overrides 'border-top-width' and 'border-top-color'.
* Another example is 'margin' overriding 'margin-(bottom|left|right|top)'.
GoalSmashers [Wed, 30 Oct 2013 19:57:49 +0000 (20:57 +0100)]
Refactors property merging into a separate Optimizer singleton.