clean-css.git
10 years agoVersion 2.0.2.
GoalSmashers [Mon, 18 Nov 2013 21:30:50 +0000 (22:30 +0100)]
Version 2.0.2.

10 years agoFixes #177 - processing incorrect content should not break CSS.
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.

10 years agoMoves grunt info after CLI and module use so the order is more logical.
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.

10 years agoFixes #180 - adds grunt info to readme.
Goal Smashers Dev Team [Mon, 18 Nov 2013 18:05:42 +0000 (19:05 +0100)]
Fixes #180 - adds grunt info to readme.

10 years agoFixes #160 - re-runs advanced optimizations until no changes are detected.
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.

10 years agoSkips empty removal if advanced processing is enabled.
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.

10 years agoAdds minor speeed optimizations to property & selector optimizers.
GoalSmashers [Sun, 17 Nov 2013 12:05:00 +0000 (13:05 +0100)]
Adds minor speeed optimizations to property & selector optimizers.

10 years agoFixes #161 - adds ~30x faster tokenizer.
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.

10 years agoFixes #163 - adds pixel rounding to 2nd decimal place.
GoalSmashers [Sat, 16 Nov 2013 12:01:14 +0000 (13:01 +0100)]
Fixes #163 - adds pixel rounding to 2nd decimal place.

10 years agoFixes #165 - adds removing extra space after rgba/hsla declarations.
GoalSmashers [Sat, 16 Nov 2013 09:59:18 +0000 (10:59 +0100)]
Fixes #165 - adds removing extra space after rgba/hsla declarations.

10 years agoVersion 2.0.1.
GoalSmashers [Thu, 14 Nov 2013 08:38:14 +0000 (09:38 +0100)]
Version 2.0.1.

10 years agoFixes #176 - hangs when `undefined` is used as a property value.
GoalSmashers [Thu, 14 Nov 2013 08:31:30 +0000 (09:31 +0100)]
Fixes #176 - hangs when `undefined` is used as a property value.

10 years agoMerge pull request #175 from XhmikosR/master
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.

10 years agoMinor style changes.
XhmikosR [Fri, 8 Nov 2013 16:39:54 +0000 (18:39 +0200)]
Minor style changes.

10 years agoMerge pull request #174 from XhmikosR/master
Goal Smashers Dev Team [Tue, 5 Nov 2013 13:39:01 +0000 (05:39 -0800)]
Merge pull request #174 from XhmikosR/master

Minor improvements.

10 years agoUpdate JSHint's options.
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.

10 years agoAdd "bin/cleancss" to the JSHint command and fix the warnings.
XhmikosR [Mon, 4 Nov 2013 09:51:56 +0000 (11:51 +0200)]
Add "bin/cleancss" to the JSHint command and fix the warnings.

10 years agoAdds a direct link to css-minification-benchmark results.
Goal Smashers Dev Team [Mon, 4 Nov 2013 16:21:11 +0000 (17:21 +0100)]
Adds a direct link to css-minification-benchmark results.

10 years agoVersion 2.0.0.
GoalSmashers [Mon, 4 Nov 2013 13:31:25 +0000 (14:31 +0100)]
Version 2.0.0.

10 years agoRenames test/custom-test.js to test/module-test.js.
GoalSmashers [Mon, 4 Nov 2013 12:29:44 +0000 (13:29 +0100)]
Renames test/custom-test.js to test/module-test.js.

10 years agoUpdates unit tests to allow flat arguments only in cssContext.
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.

10 years agoFixes #146 - moves benchmark out of the repository.
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.

10 years agoRearranges History.md a bit.
GoalSmashers [Mon, 4 Nov 2013 11:05:29 +0000 (12:05 +0100)]
Rearranges History.md a bit.

10 years agoFixes #139 - adds consistent error and warning handling for CLI and library.
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.

10 years agoMerge pull request #171 from XhmikosR/master
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.

10 years agoUpdate JSHint options.
XhmikosR [Mon, 4 Nov 2013 10:10:28 +0000 (12:10 +0200)]
Update JSHint options.

10 years agoStyle consistency changes.
XhmikosR [Mon, 4 Nov 2013 09:55:39 +0000 (11:55 +0200)]
Style consistency changes.

10 years agoForce usage of single quotes in JSHint.
XhmikosR [Mon, 4 Nov 2013 09:02:20 +0000 (11:02 +0200)]
Force usage of single quotes in JSHint.

10 years agoFixes #166 - output more info in CLI's `debug` mode.
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.

10 years agoFixes #145 - adds minifications stats when calling library with `debug: true` option.
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.

10 years agoMerge pull request #169 from XhmikosR/master
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.

10 years agoFixes #138 - makes CleanCSS interface fully object oriented.
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.

10 years agoUpdate docs.
XhmikosR [Sat, 2 Nov 2013 23:04:49 +0000 (01:04 +0200)]
Update docs.

10 years agoFixes #167 - `background:transparent` minification.
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`.

10 years agoImproves property overriding & redefining algorithm.
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.

10 years agoAdds reducing non-adjacent selectors when overridden by more complex selectors.
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.

10 years agoAdds ignoring misplaced top level curly braces.
GoalSmashers [Fri, 1 Nov 2013 17:14:41 +0000 (18:14 +0100)]
Adds ignoring misplaced top level curly braces.

10 years agoAdds `--skip-advanced`/`noAdvanced` switch to disable advanced optimizations.
GoalSmashers [Fri, 1 Nov 2013 14:11:25 +0000 (15:11 +0100)]
Adds `--skip-advanced`/`noAdvanced` switch to disable advanced optimizations.

10 years agoAdds reducing non-adjacent selectors.
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.

10 years agoAdds property overriding so more coarse properties override more granular ones.
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)'.

10 years agoRefactors property merging into a separate Optimizer singleton.
GoalSmashers [Wed, 30 Oct 2013 19:57:49 +0000 (20:57 +0100)]
Refactors property merging into a separate Optimizer singleton.

10 years agoAdds merging adjacent selectors if body is the same.
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.

10 years agoMakes all multiple selectors ordered alphabetically (aids merging).
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.

10 years agoChanges behavior of `--keep-line-breaks`/`keepBreaks` option to keep breaks after...
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{}'.

10 years agoAdds merging adjacent selectors within a scope (single and multiple ones).
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.

10 years agoAdds merging duplicate properties within a single selector's body.
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.

10 years agoAdds removing duplicate selectors (same body) within the same scope.
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.

10 years agoAdds basic optimizer removing duplicate selectors from a list.
GoalSmashers [Sun, 29 Sep 2013 10:32:05 +0000 (12:32 +0200)]
Adds basic optimizer removing duplicate selectors from a list.

10 years agoAdds CSS tokenizer which will make it possible to further optimize content by reorder...
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.

10 years agoAdds longer escape markers to speed up searching.
GoalSmashers [Mon, 30 Sep 2013 14:58:34 +0000 (16:58 +0200)]
Adds longer escape markers to speed up searching.

10 years agoFixes parsing expressions so it does not break selectors parsing.
GoalSmashers [Sun, 29 Sep 2013 07:34:28 +0000 (09:34 +0200)]
Fixes parsing expressions so it does not break selectors parsing.

10 years agoFixes #162 - strips quotes from base64 encoded URLs.
GoalSmashers [Sat, 2 Nov 2013 16:26:44 +0000 (17:26 +0100)]
Fixes #162 - strips quotes from base64 encoded URLs.

10 years agoFixes #159 - escaped quotes inside content property.
GoalSmashers [Sat, 2 Nov 2013 09:07:04 +0000 (10:07 +0100)]
Fixes #159 - escaped quotes inside content property.

10 years agoFixes invalid selectors in unit-test.js.
GoalSmashers [Fri, 27 Sep 2013 13:48:10 +0000 (15:48 +0200)]
Fixes invalid selectors in unit-test.js.

10 years agoFixes #157 - gets rid of `removeEmpty` option.
GoalSmashers [Thu, 31 Oct 2013 18:31:41 +0000 (19:31 +0100)]
Fixes #157 - gets rid of `removeEmpty` option.

10 years agoAdds 2.0 docs notice with link to 1.1 branch.
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.

10 years agoAdds an acknowledgement for @altschuler.
GoalSmashers [Mon, 28 Oct 2013 21:26:51 +0000 (22:26 +0100)]
Adds an acknowledgement for @altschuler.

10 years agoVersion 1.1.7.
GoalSmashers [Mon, 28 Oct 2013 21:21:37 +0000 (22:21 +0100)]
Version 1.1.7.

10 years agoMerge pull request #156 from altschuler/master
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.

10 years agoFixes #156 - makes inliner ignore @import inside comments
Simon Altschuler [Mon, 28 Oct 2013 20:17:21 +0000 (21:17 +0100)]
Fixes #156 - makes inliner ignore @import inside comments

10 years agoAdds missing `@import` processing to our benchmark (run via `npm run bench`)
GoalSmashers [Mon, 28 Oct 2013 07:59:53 +0000 (08:59 +0100)]
Adds missing `@import` processing to our benchmark (run via `npm run bench`)

10 years agoAdds much faster removal of empty selectors & @media elements.
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.

10 years agoVersion 1.1.6.
GoalSmashers [Sat, 26 Oct 2013 09:16:07 +0000 (11:16 +0200)]
Version 1.1.6.

10 years agoFixes #155 - broken irregular CSS content.
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.

10 years agoVersion 1.1.5.
GoalSmashers [Thu, 24 Oct 2013 16:20:38 +0000 (18:20 +0200)]
Version 1.1.5.

10 years agoMerge pull request #153 from shama/keepSpecialComments
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.

10 years agoMerge pull request #154 from XhmikosR/master
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.

10 years agoREADME.md: Switch to david-dm for the dependencies.
XhmikosR [Thu, 24 Oct 2013 05:48:15 +0000 (08:48 +0300)]
README.md: Switch to david-dm for the dependencies.

10 years agoUpdate JSHint dependency.
XhmikosR [Thu, 24 Oct 2013 05:45:12 +0000 (08:45 +0300)]
Update JSHint dependency.

10 years agoAllow keepSpecialComments to be set as a string
Kyle Robinson Young [Wed, 23 Oct 2013 21:08:11 +0000 (14:08 -0700)]
Allow keepSpecialComments to be set as a string

10 years agoMerge branch 'master' of github-gs:GoalSmashers/clean-css
GoalSmashers [Wed, 23 Oct 2013 14:26:41 +0000 (16:26 +0200)]
Merge branch 'master' of github-gs:GoalSmashers/clean-css

10 years agoVersion 1.1.4.
GoalSmashers [Wed, 23 Oct 2013 14:22:15 +0000 (16:22 +0200)]
Version 1.1.4.

10 years agoFixes #152 - adds a `--skip-rebase` / noRebase option to disable URL rebasing altogether.
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.

10 years agoMerge pull request #151 from XhmikosR/master
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.

10 years agoUpdate JSHint dependency.
XhmikosR [Sat, 19 Oct 2013 08:05:38 +0000 (11:05 +0300)]
Update JSHint dependency.

10 years agoUpdate package.json
XhmikosR [Fri, 4 Oct 2013 09:25:47 +0000 (12:25 +0300)]
Update package.json

10 years agoUpdate History.md.
XhmikosR [Fri, 4 Oct 2013 09:25:39 +0000 (12:25 +0300)]
Update History.md.

10 years agoVersion 1.1.3.
GoalSmashers [Fri, 4 Oct 2013 08:14:35 +0000 (10:14 +0200)]
Version 1.1.3.

10 years agoFixes #150 - minifying background:none shorthand.
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%.

10 years agoVersion 1.1.2.
GoalSmashers [Sun, 29 Sep 2013 11:05:55 +0000 (13:05 +0200)]
Version 1.1.2.

10 years agoFixes #149 - shorthand font property with optional styles.
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.

10 years agoReplaces basic escaping of special data with one based on hashes.
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.

11 years agoVersion 1.1.1.
GoalSmashers [Fri, 6 Sep 2013 22:12:48 +0000 (00:12 +0200)]
Version 1.1.1.

11 years agoFixes #144 - skip URLs rebasing by default.
GoalSmashers [Fri, 6 Sep 2013 22:09:19 +0000 (00:09 +0200)]
Fixes #144 - skip URLs rebasing by default.

11 years agoVersion 1.1.0.
GoalSmashers [Fri, 6 Sep 2013 07:45:33 +0000 (09:45 +0200)]
Version 1.1.0.

11 years agoFixes compression efficiency for stylesheets with @import statements.
GoalSmashers [Fri, 6 Sep 2013 07:31:52 +0000 (09:31 +0200)]
Fixes compression efficiency for stylesheets with @import statements.

11 years agoAdds simplified comments processing & imports.
GoalSmashers [Fri, 6 Sep 2013 07:24:27 +0000 (09:24 +0200)]
Adds simplified comments processing & imports.

11 years agoMerge pull request #142 from XhmikosR/master
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.

11 years agoMove `-debug` lower in options.
XhmikosR [Thu, 5 Sep 2013 10:52:55 +0000 (13:52 +0300)]
Move `-debug` lower in options.

Also, update the help screen.

11 years agoRemove unneeded parentheses.
XhmikosR [Thu, 5 Sep 2013 10:02:39 +0000 (13:02 +0300)]
Remove unneeded parentheses.

11 years agoFixes issue #141 - broken url rebasing on Windows.
GoalSmashers [Thu, 5 Sep 2013 10:44:20 +0000 (12:44 +0200)]
Fixes issue #141 - broken url rebasing on Windows.

11 years agoRenames `debug` into `benchmark` for transformation benchmarking to avoid confusion...
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.

11 years agoFixes #43 - adds debug switch showing compression efficiency and time taken to minify.
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.

11 years agoMerge pull request #140 from XhmikosR/master
Goal Smashers Dev Team [Thu, 5 Sep 2013 07:31:16 +0000 (00:31 -0700)]
Merge pull request #140 from XhmikosR/master

Update docs.

11 years agoUpdate docs.
XhmikosR [Fri, 30 Aug 2013 08:29:45 +0000 (11:29 +0300)]
Update docs.

11 years agoUpdates documentation to reflect URLs rebasing.
GoalSmashers [Wed, 4 Sep 2013 12:44:27 +0000 (14:44 +0200)]
Updates documentation to reflect URLs rebasing.

11 years agoFixes #129 - rebase urls relative to output file or to absolute path given by `root...
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.

11 years agoMoves relative urls processing while importing to a separate module.
GoalSmashers [Tue, 3 Sep 2013 07:46:15 +0000 (09:46 +0200)]
Moves relative urls processing while importing to a separate module.

11 years agoFixes #124 - throws exception on broken @import statements.
GoalSmashers [Fri, 30 Aug 2013 07:55:25 +0000 (09:55 +0200)]
Fixes #124 - throws exception on broken @import statements.

11 years agoUpdates #84 - adds media processing to external files.
GoalSmashers [Fri, 30 Aug 2013 07:35:09 +0000 (09:35 +0200)]
Updates #84 - adds media processing to external files.