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.
GoalSmashers [Mon, 28 Oct 2013 21:03:59 +0000 (22:03 +0100)]
Adds merging adjacent selectors if body is the same.
* Skips if selector is vendor specific, i.e. matches /-(moz|ms|o|webkit)-/.
* Will not merge selectors if one selector may not be supported, e.g. :nth-child, :last-child, etc. - configurable via `--selectors-merge-mode/selectorsMergeMode` option.
* Defaults to merging all selectors so `ie8` mode needs to be forced via mentioned options.
GoalSmashers [Mon, 28 Oct 2013 11:49:04 +0000 (12:49 +0100)]
Makes all multiple selectors ordered alphabetically (aids merging).
* Thus 'p,a{}' becomes 'a,p{}' which is semantically equivalent.
GoalSmashers [Mon, 28 Oct 2013 11:43:05 +0000 (12:43 +0100)]
Changes behavior of `--keep-line-breaks`/`keepBreaks` option to keep breaks after trailing braces only.
* Old behavior allowed line breaks within selector, like 'a\np{}'.
GoalSmashers [Mon, 28 Oct 2013 10:28:44 +0000 (11:28 +0100)]
Adds merging adjacent selectors within a scope (single and multiple ones).
* Merges properties inside merged selectors too.
* Adds merging two adjacent properties when merging selectors.
GoalSmashers [Mon, 28 Oct 2013 09:28:11 +0000 (10:28 +0100)]
Adds merging duplicate properties within a single selector's body.
* Skips merging if two properties declared one after another, e.g. display:inline-block;display:-moz-inline-box;
* Respects !important when merging.
GoalSmashers [Sun, 27 Oct 2013 09:50:59 +0000 (10:50 +0100)]
Adds removing duplicate selectors (same body) within the same scope.
* Always preserve the last one as it overrides previous ones and intermediate overriding.
GoalSmashers [Sun, 29 Sep 2013 10:32:05 +0000 (12:32 +0200)]
Adds basic optimizer removing duplicate selectors from a list.
GoalSmashers [Fri, 27 Sep 2013 14:03:08 +0000 (16:03 +0200)]
Adds CSS tokenizer which will make it possible to further optimize content by reordering and/or merging selectors.
GoalSmashers [Mon, 30 Sep 2013 14:58:34 +0000 (16:58 +0200)]
Adds longer escape markers to speed up searching.
GoalSmashers [Sun, 29 Sep 2013 07:34:28 +0000 (09:34 +0200)]
Fixes parsing expressions so it does not break selectors parsing.
GoalSmashers [Sat, 2 Nov 2013 16:26:44 +0000 (17:26 +0100)]
Fixes #162 - strips quotes from base64 encoded URLs.
GoalSmashers [Sat, 2 Nov 2013 09:07:04 +0000 (10:07 +0100)]
Fixes #159 - escaped quotes inside content property.
GoalSmashers [Fri, 27 Sep 2013 13:48:10 +0000 (15:48 +0200)]
Fixes invalid selectors in unit-test.js.
GoalSmashers [Thu, 31 Oct 2013 18:31:41 +0000 (19:31 +0100)]
Fixes #157 - gets rid of `removeEmpty` option.
Goal Smashers Dev Team [Thu, 31 Oct 2013 18:12:51 +0000 (19:12 +0100)]
Adds 2.0 docs notice with link to 1.1 branch.
GoalSmashers [Mon, 28 Oct 2013 21:26:51 +0000 (22:26 +0100)]
Adds an acknowledgement for @altschuler.
GoalSmashers [Mon, 28 Oct 2013 21:21:37 +0000 (22:21 +0100)]
Version 1.1.7.
Goal Smashers Dev Team [Mon, 28 Oct 2013 21:18:38 +0000 (14:18 -0700)]
Merge pull request #156 from altschuler/master
Ignore arbitrary @import in comments.
Simon Altschuler [Mon, 28 Oct 2013 20:17:21 +0000 (21:17 +0100)]
Fixes #156 - makes inliner ignore @import inside comments
GoalSmashers [Mon, 28 Oct 2013 07:59:53 +0000 (08:59 +0100)]
Adds missing `@import` processing to our benchmark (run via `npm run bench`)
GoalSmashers [Sat, 26 Oct 2013 22:09:55 +0000 (00:09 +0200)]
Adds much faster removal of empty selectors & @media elements.
* Adds supports for removing empty nested @media elements.
GoalSmashers [Sat, 26 Oct 2013 09:16:07 +0000 (11:16 +0200)]
Version 1.1.6.
GoalSmashers [Sat, 26 Oct 2013 09:12:22 +0000 (11:12 +0200)]
Fixes #155 - broken irregular CSS content.
* ["content"] is an invalid CSS but it was matched as an attribute.
* If placed inside content property value it was matched BEFORE we escape all free text.
GoalSmashers [Thu, 24 Oct 2013 16:20:38 +0000 (18:20 +0200)]
Version 1.1.5.
Goal Smashers Dev Team [Thu, 24 Oct 2013 15:49:50 +0000 (08:49 -0700)]
Merge pull request #153 from shama/keepSpecialComments
Allow keepSpecialComments value of 0 and 1 to be set as a string.
Goal Smashers Dev Team [Thu, 24 Oct 2013 15:46:12 +0000 (08:46 -0700)]
Merge pull request #154 from XhmikosR/master
Updates JSHint dependency and switches to david-dm for deps management.
XhmikosR [Thu, 24 Oct 2013 05:48:15 +0000 (08:48 +0300)]
README.md: Switch to david-dm for the dependencies.
XhmikosR [Thu, 24 Oct 2013 05:45:12 +0000 (08:45 +0300)]
Update JSHint dependency.
Kyle Robinson Young [Wed, 23 Oct 2013 21:08:11 +0000 (14:08 -0700)]
Allow keepSpecialComments to be set as a string
GoalSmashers [Wed, 23 Oct 2013 14:26:41 +0000 (16:26 +0200)]
Merge branch 'master' of github-gs:GoalSmashers/clean-css
GoalSmashers [Wed, 23 Oct 2013 14:22:15 +0000 (16:22 +0200)]
Version 1.1.4.
GoalSmashers [Wed, 23 Oct 2013 14:19:33 +0000 (16:19 +0200)]
Fixes #152 - adds a `--skip-rebase` / noRebase option to disable URL rebasing altogether.
Goal Smashers Dev Team [Sat, 19 Oct 2013 12:51:53 +0000 (05:51 -0700)]
Merge pull request #151 from XhmikosR/master
Updates JSHint version and cleans up History.md.
XhmikosR [Sat, 19 Oct 2013 08:05:38 +0000 (11:05 +0300)]
Update JSHint dependency.
XhmikosR [Fri, 4 Oct 2013 09:25:47 +0000 (12:25 +0300)]
Update package.json
XhmikosR [Fri, 4 Oct 2013 09:25:39 +0000 (12:25 +0300)]
Update History.md.
GoalSmashers [Fri, 4 Oct 2013 08:14:35 +0000 (10:14 +0200)]
Version 1.1.3.
GoalSmashers [Fri, 4 Oct 2013 08:11:43 +0000 (10:11 +0200)]
Fixes #150 - minifying background:none shorthand.
* Apparently background:0 does not set y position to 0 but 50%.
GoalSmashers [Sun, 29 Sep 2013 11:05:55 +0000 (13:05 +0200)]
Version 1.1.2.
GoalSmashers [Fri, 27 Sep 2013 15:36:53 +0000 (17:36 +0200)]
Fixes #149 - shorthand font property with optional styles.
* It does not offer optimal minification by not handling 'font:normal normal normal <size> <font-family' case.
* Will be further improved to support mentioned case.
GoalSmashers [Fri, 27 Sep 2013 10:50:34 +0000 (12:50 +0200)]
Replaces basic escaping of special data with one based on hashes.
* Adds EscapeStore helper class to aid escaping and restoring.
* Necessary for selector- and property-level optimizations.
GoalSmashers [Fri, 6 Sep 2013 22:12:48 +0000 (00:12 +0200)]
Version 1.1.1.
GoalSmashers [Fri, 6 Sep 2013 22:09:19 +0000 (00:09 +0200)]
Fixes #144 - skip URLs rebasing by default.
GoalSmashers [Fri, 6 Sep 2013 07:45:33 +0000 (09:45 +0200)]
Version 1.1.0.
GoalSmashers [Fri, 6 Sep 2013 07:31:52 +0000 (09:31 +0200)]
Fixes compression efficiency for stylesheets with @import statements.
GoalSmashers [Fri, 6 Sep 2013 07:24:27 +0000 (09:24 +0200)]
Adds simplified comments processing & imports.
Goal Smashers Dev Team [Thu, 5 Sep 2013 19:45:11 +0000 (12:45 -0700)]
Merge pull request #142 from XhmikosR/master
Documentation & code cleanup.
XhmikosR [Thu, 5 Sep 2013 10:52:55 +0000 (13:52 +0300)]
Move `-debug` lower in options.
Also, update the help screen.
XhmikosR [Thu, 5 Sep 2013 10:02:39 +0000 (13:02 +0300)]
Remove unneeded parentheses.
GoalSmashers [Thu, 5 Sep 2013 10:44:20 +0000 (12:44 +0200)]
Fixes issue #141 - broken url rebasing on Windows.
GoalSmashers [Thu, 5 Sep 2013 08:50:36 +0000 (10:50 +0200)]
Renames `debug` into `benchmark` for transformation benchmarking to avoid confusion with new `-d/--debug` switch.
GoalSmashers [Thu, 5 Sep 2013 08:44:34 +0000 (10:44 +0200)]
Fixes #43 - adds debug switch showing compression efficiency and time taken to minify.
Goal Smashers Dev Team [Thu, 5 Sep 2013 07:31:16 +0000 (00:31 -0700)]
Merge pull request #140 from XhmikosR/master
Update docs.
XhmikosR [Fri, 30 Aug 2013 08:29:45 +0000 (11:29 +0300)]
Update docs.
GoalSmashers [Wed, 4 Sep 2013 12:44:27 +0000 (14:44 +0200)]
Updates documentation to reflect URLs rebasing.
GoalSmashers [Tue, 3 Sep 2013 09:12:17 +0000 (11:12 +0200)]
Fixes #129 - rebase urls relative to output file or to absolute path given by `root` option.
GoalSmashers [Tue, 3 Sep 2013 07:46:15 +0000 (09:46 +0200)]
Moves relative urls processing while importing to a separate module.
GoalSmashers [Fri, 30 Aug 2013 07:55:25 +0000 (09:55 +0200)]
Fixes #124 - throws exception on broken @import statements.
GoalSmashers [Fri, 30 Aug 2013 07:35:09 +0000 (09:35 +0200)]
Updates #84 - adds media processing to external files.
GoalSmashers [Fri, 30 Aug 2013 07:27:38 +0000 (09:27 +0200)]
Fixes #84 - adds support for @import with media queries.
Goal Smashers Dev Team [Fri, 30 Aug 2013 06:39:45 +0000 (23:39 -0700)]
Merge pull request #137 from XhmikosR/master
Improves code formatting and sorts issues in History.md.
XhmikosR [Thu, 29 Aug 2013 17:30:39 +0000 (20:30 +0300)]
Update History.md.
XhmikosR [Thu, 29 Aug 2013 17:28:51 +0000 (20:28 +0300)]
test/binary-test.js: use one var per line.
GoalSmashers [Thu, 29 Aug 2013 18:54:15 +0000 (20:54 +0200)]
Adds tentative node.js 0.11.x support.
GoalSmashers [Thu, 29 Aug 2013 17:05:30 +0000 (19:05 +0200)]
Fixes #135 - Changes required node.js required version from 0.6+ to 0.8+.
GoalSmashers [Thu, 29 Aug 2013 17:00:43 +0000 (19:00 +0200)]
Fixes #126 - adds proper handling of CSS expressions.
Goal Smashers Dev Team [Thu, 29 Aug 2013 16:55:27 +0000 (09:55 -0700)]
Merge pull request #136 from XhmikosR/master
Various tweaks.
XhmikosR [Thu, 29 Aug 2013 14:38:12 +0000 (17:38 +0300)]
Fix typos.
XhmikosR [Thu, 29 Aug 2013 14:37:32 +0000 (17:37 +0300)]
Update README.md.
XhmikosR [Thu, 29 Aug 2013 14:36:16 +0000 (17:36 +0300)]
Remove unneeded parentheses.
GoalSmashers [Wed, 28 Aug 2013 10:27:16 +0000 (12:27 +0200)]
Fixes #130 - better code modularity.
* Moves url, free text, and comments' processing out of the main module.
* Moves import inliner, and shorthand notations out of the main module.
* Moves color processing out of the main module.
GoalSmashers [Wed, 28 Aug 2013 09:40:32 +0000 (11:40 +0200)]
Fixes #65 - improve color name to hex and vice versa shortening.
Goal Smashers Dev Team [Sun, 25 Aug 2013 08:28:51 +0000 (01:28 -0700)]
Merge pull request #131 from hahnzhu/patch-1
Updates README.md
hahn [Sun, 25 Aug 2013 02:56:39 +0000 (10:56 +0800)]
Update README.md
Goal Smashers Dev Team [Sat, 17 Aug 2013 08:30:45 +0000 (01:30 -0700)]
Merge pull request #128 from XhmikosR/master
Removes .npmignore and adds whitelisting in package.json.
XhmikosR [Fri, 16 Aug 2013 06:45:41 +0000 (09:45 +0300)]
Explicitly specify the npm package contents.
Goal Smashers Dev Team [Fri, 16 Aug 2013 06:36:38 +0000 (23:36 -0700)]
Merge pull request #127 from XhmikosR/master
Moves .jshintrc to package.json.
XhmikosR [Mon, 5 Aug 2013 17:54:43 +0000 (20:54 +0300)]
Update History.md.