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.
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.