clean-css.git
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.

11 years agoFixes #84 - adds support for @import with media queries.
GoalSmashers [Fri, 30 Aug 2013 07:27:38 +0000 (09:27 +0200)]
Fixes #84 - adds support for @import with media queries.

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

11 years agoUpdate History.md.
XhmikosR [Thu, 29 Aug 2013 17:30:39 +0000 (20:30 +0300)]
Update History.md.

11 years agotest/binary-test.js: use one var per line.
XhmikosR [Thu, 29 Aug 2013 17:28:51 +0000 (20:28 +0300)]
test/binary-test.js: use one var per line.

11 years agoAdds tentative node.js 0.11.x support.
GoalSmashers [Thu, 29 Aug 2013 18:54:15 +0000 (20:54 +0200)]
Adds tentative node.js 0.11.x support.

11 years agoFixes #135 - Changes required node.js required version from 0.6+ to 0.8+.
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+.

11 years agoFixes #126 - adds proper handling of CSS expressions.
GoalSmashers [Thu, 29 Aug 2013 17:00:43 +0000 (19:00 +0200)]
Fixes #126 - adds proper handling of CSS expressions.

11 years agoMerge pull request #136 from XhmikosR/master
Goal Smashers Dev Team [Thu, 29 Aug 2013 16:55:27 +0000 (09:55 -0700)]
Merge pull request #136 from XhmikosR/master

Various tweaks.

11 years agoFix typos.
XhmikosR [Thu, 29 Aug 2013 14:38:12 +0000 (17:38 +0300)]
Fix typos.

11 years agoUpdate README.md.
XhmikosR [Thu, 29 Aug 2013 14:37:32 +0000 (17:37 +0300)]
Update README.md.

11 years agoRemove unneeded parentheses.
XhmikosR [Thu, 29 Aug 2013 14:36:16 +0000 (17:36 +0300)]
Remove unneeded parentheses.

11 years agoFixes #130 - better code modularity.
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.

11 years agoFixes #65 - improve color name to hex and vice versa shortening.
GoalSmashers [Wed, 28 Aug 2013 09:40:32 +0000 (11:40 +0200)]
Fixes #65 - improve color name to hex and vice versa shortening.

11 years agoMerge pull request #131 from hahnzhu/patch-1
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

11 years agoUpdate README.md
hahn [Sun, 25 Aug 2013 02:56:39 +0000 (10:56 +0800)]
Update README.md

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

11 years agoExplicitly specify the npm package contents.
XhmikosR [Fri, 16 Aug 2013 06:45:41 +0000 (09:45 +0300)]
Explicitly specify the npm package contents.

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

11 years agoUpdate History.md.
XhmikosR [Mon, 5 Aug 2013 17:54:43 +0000 (20:54 +0300)]
Update History.md.

11 years agoMove .jshintrc to package.json.
XhmikosR [Sun, 4 Aug 2013 10:37:30 +0000 (13:37 +0300)]
Move .jshintrc to package.json.

Requires JSHint 2.1.9.

11 years agoAdds kudos to @abarre in Readme.md.
Goal Smashers Dev Team [Sun, 21 Jul 2013 08:54:51 +0000 (10:54 +0200)]
Adds kudos to @abarre in Readme.md.

11 years agoMerge pull request #123 from XhmikosR/master
Goal Smashers Dev Team [Sun, 21 Jul 2013 08:50:14 +0000 (01:50 -0700)]
Merge pull request #123 from XhmikosR/master

Readme, .(git|npm)ignore updates.

11 years agoUpdate README.md.
XhmikosR [Sat, 20 Jul 2013 11:09:50 +0000 (14:09 +0300)]
Update README.md.

* remove stray comma from README.md
* use single quotes

11 years agoREADME.md: switch to the full URLs.
XhmikosR [Sat, 20 Jul 2013 11:07:03 +0000 (14:07 +0300)]
README.md: switch to the full URLs.

This fixes the URLs on npm.

11 years agoUse relative paths in .gitignore and .npmignore.
XhmikosR [Sat, 20 Jul 2013 10:55:48 +0000 (13:55 +0300)]
Use relative paths in .gitignore and .npmignore.

11 years agoMerge pull request #122 from XhmikosR/master
Goal Smashers Dev Team [Sat, 20 Jul 2013 09:22:11 +0000 (02:22 -0700)]
Merge pull request #122 from XhmikosR/master

Update commander.js dependency.

11 years agoUpdate README.md with the new `-s` switch.
XhmikosR [Fri, 19 Jul 2013 17:32:55 +0000 (20:32 +0300)]
Update README.md with the new `-s` switch.

11 years agoUpdate commander.js dependency.
XhmikosR [Fri, 19 Jul 2013 07:31:50 +0000 (10:31 +0300)]
Update commander.js dependency.

11 years agoVersion 1.0.12.
GoalSmashers [Fri, 19 Jul 2013 16:06:50 +0000 (18:06 +0200)]
Version 1.0.12.

11 years agoMerge pull request #121 from fasterize/master
Goal Smashers Dev Team [Fri, 19 Jul 2013 15:58:24 +0000 (08:58 -0700)]
Merge pull request #121 from fasterize/master

Adds processImport / --skip-import option for avoiding @import statement processing.

11 years agoCode convention.
abarre [Fri, 19 Jul 2013 13:54:12 +0000 (15:54 +0200)]
Code convention.

11 years agoAdd option -s --skip-import
abarre [Fri, 19 Jul 2013 12:34:15 +0000 (14:34 +0200)]
Add option -s --skip-import

11 years agoAdd option processImport set to true by default.
abarre [Fri, 19 Jul 2013 10:01:09 +0000 (12:01 +0200)]
Add option processImport set to true by default.

11 years agoMerge pull request #119 from XhmikosR/master
Goal Smashers Dev Team [Tue, 9 Jul 2013 16:03:11 +0000 (09:03 -0700)]
Merge pull request #119 from XhmikosR/master

Update History.md and dep.

11 years agoUpdate commander.js dependency.
XhmikosR [Tue, 9 Jul 2013 15:28:32 +0000 (18:28 +0300)]
Update commander.js dependency.

11 years agoUpdate History.md.
XhmikosR [Tue, 18 Jun 2013 18:31:45 +0000 (21:31 +0300)]
Update History.md.
Use code syntax for CSS keywords and use the same case for "URLs".

11 years agoAdds tests for removing empty @media queries.
GoalSmashers [Mon, 8 Jul 2013 14:39:15 +0000 (16:39 +0200)]
Adds tests for removing empty @media queries.