* 'selectorsMergeMode' option to library is also renamed to 'compatibility'.
[2.1.0 / 2013-xx-xx (UNRELEASED)](https://github.com/GoalSmashers/clean-css/compare/v2.0.0...HEAD)
==================
+* Deprecates --selectors-merge-mode / selectorsMergeMode in favor to --compatibility / compatibility.
* Skips empty removal if advanced processing is enabled.
* Fixed issue [#160](https://github.com/GoalSmashers/clean-css/issues/160) - re-runs optimizer until a clean pass.
* Fixed issue [#161](https://github.com/GoalSmashers/clean-css/issues/161) - improves tokenizer performance.
--skip-rebase Disable URLs rebasing
--skip-advanced Disable advanced optimizations - selector & property merging,
reduction, etc.
---selectors-merge-mode [ie8|*] Use `ie8` for compatibility mode, `*` for merge all (default)
+--selectors-merge-mode [ie8|*] DEPRECATED: Use --compatibility switch
+-c, --compatibility [ie8] Force compatibility mode
-d, --debug Shows debug information (minification time & compression efficiency)
```
.option('-s, --skip-import', 'Disable @import processing')
.option('--skip-rebase', 'Disable URLs rebasing')
.option('--skip-advanced', 'Disable advanced optimizations - selector & property merging, reduction, etc.')
- .option('--selectors-merge-mode [ie8|*]', 'Use `ie8` for compatibility mode, `*` for merge all (default).')
+ .option('--selectors-merge-mode [ie8|*]', 'DEPRECATED: Use --compatibility switch')
+ .option('-c, --compatibility [ie8]', 'Force compatibility mode')
.option('-d, --debug', 'Shows debug information (minification time & compression efficiency)');
commands.on('--help', function() {
cleanOptions.noRebase = true;
if (commands.skipAdvanced)
cleanOptions.noAdvanced = true;
-if (commands.selectorsMergeMode)
- cleanOptions.selectorsMergeMode = commands.selectorsMergeMode;
+if (commands.compatibility)
+ cleanOptions.compatibility = commands.compatibility;
+if (commands.selectorsMergeMode) {
+ console.warn('--selectors-merge-mode is deprecated and will be removed in clean-css 2.2. Please use --compatibility %s switch instead.', commands.selectorsMergeMode);
+ cleanOptions.compatibility = commands.selectorsMergeMode;
+}
if (commands.debug)
cleanOptions.debug = true;
if (commands.args.length > 0) {
if (undefined === options.processImport)
options.processImport = true;
+ if (options.selectorsMergeMode) {
+ console.warn('selectorsMergeMode is deprecated and will be removed in clean-css 2.2. Please use compatibility: \'%s\' option instead.', options.selectorsMergeMode);
+ options.compatibility = options.selectorsMergeMode;
+ }
+
this.options = options;
this.stats = {};
this.context = {
data = new SelectorsOptimizer(data, context, {
keepBreaks: options.keepBreaks,
lineBreak: lineBreak,
- selectorsMergeMode: options.selectorsMergeMode
+ selectorsMergeMode: options.compatibility == 'ie8' ? 'ie8' : '*'
}).process();
});
}
],
'of supported and unsupported selector': '.one:first-child{color:red}.two:last-child{color:red}',
'of two unsupported selectors': '.one:nth-child(5){color:red}.two:last-child{color:red}'
- }, { selectorsMergeMode: 'ie8' }),
+ }, { compatibility: 'ie8' }),
'redefined more granular properties': redefineContext({
'animation-delay': ['animation'],
'animation-direction': ['animation'],