Skip to content
Commits on Aug 25, 2015
  1. Fixes #632 - adds disabling remote imports.

    So far we only had an option to skip inlining of all imports, but
    with this commit a fine-grained control is added, e.g. import from
    all but
    API: `new CleanCSS({ processImportFrom: ['!'] })`
    CLI: `cleancss --skip-import-from`
    To skip all local imports:
    API: `new CleanCSS({ processImportFrom: ['remote'] })`
    CLI: `cleancss --skip-import-from local`
    To skip all remote and certain local imports:
    API: `new CleanCSS({ processImportFrom: ['local', '!path/to/file'] })`
    CLI: `cleancss --skip-import-from remote,path/to/file`
Commits on Aug 21, 2015
  1. Orders CLI options.

Commits on Aug 20, 2015
Commits on Jun 15, 2015
  1. Normalizes anonymous function declarations.

    the `function ()` with a space is more readable.
Commits on May 31, 2015
  1. Adds semantic merging (off by default).

    The main obstacle on reordering and merging declarations is a fact that
    arbitrary classes can be applied to an element and at CSS level we don't
    know if that's the case or not.
    However with semantic merging mode on we trust CSS author knows what she is doing.
    This commit is just a start (see #588) of a journey. It is and will always
    be turned off by default as it requires certain effort from stylesheets'
    So far plain class selectors and some BEM basics are supported.
Commits on Mar 16, 2015
  1. Fixes #397 - support for source map's sourcesContent property.

    When handling input source map it checks whether sourcesContent is present
    and if it is so then it's reused in the output source map.
    Adds `sourceMapInlineSources` / `--source-map-inline-source` switches to
    control whether an inlined source map is created or not.
    In case an input source map with a `sourcesContent` field is provided
    then all sources from that source map are carried over to the output source map.
Commits on Mar 1, 2015
  1. @XhmikosR

    bin/cleancss: use `console.log` instead of `util.puts`.

    XhmikosR committed
    Fixes warning with node.js 0.12.
Commits on Feb 25, 2015
  1. Adds `--skip-restructuring` / `restructuring` switches.

    Adds a CLI & API switches to turn off restructuring, which is on
    by default.
Commits on Feb 10, 2015
  1. Adds a way to switch off `@media` merging.

    * In API mode, set `mediaMerging` option to false.
    * In CLI mode, add `--skip-media-merging` switch.
Commits on Dec 14, 2014
  1. Fixes #400 - CleanCSS#minify accepts an array of filenames.

    * Both relative and absolute paths are supported - see test/module-test.js.
Commits on Dec 13, 2014
Commits on Dec 8, 2014
  1. Adds `--source-map` switch for building input's source map.

    * It's enabled in CLI only if output file is given.
  2. Adds `--skip-shorthand-compacting`/`shorthandComacting` option for di…

    …sabling shorthand compacting.
    * Also disables shorthand compacting for source maps as it is not defined well enough, yet.
Commits on Oct 19, 2014
  1. @superlukas

    Allows disabling rounding precision.

    superlukas committed with
    * Use `roundingPrecision: -1` or `--rounding-precision \\-1`.
Commits on Oct 15, 2014
  1. Adds more granular control over compatibility settings.

    * Manages compatibility options as a hash of options.
    * Handles fallback to previous compatibility options.
Commits on Oct 10, 2014
Commits on Aug 27, 2014
  1. @maranomynet

    Clarify that rounding-precision only applies to px values

    maranomynet committed with Jakub Pawlowicz
Commits on Jun 8, 2014
  1. @GoalSmashers

    Fixes #210 - adds temporary workaround for aggressive property merging.

    GoalSmashers committed
    Using `--skip-aggressive-merging` / `noAggressiveMerging` switch skips property merging based on order.
    Will be fixed in #290.
Commits on Jun 5, 2014
  1. @GoalSmashers
  2. @GoalSmashers
  3. @GoalSmashers
Commits on Mar 20, 2014
  1. @XhmikosR

    Clean up .jshintrc.

    XhmikosR committed
Commits on Feb 25, 2014
  1. @GoalSmashers
Commits on Feb 10, 2014
  1. @GoalSmashers

    Fixes #235 - adds IE7 compatibility mode.

    GoalSmashers committed
    :focus, :after, and :before selectors are not supported in IE7 so we can't
    merge selectors using them.
Commits on Jan 6, 2014
  1. @GoalSmashers

    Fixes #85 - adds resolving protocol @import statements.

    GoalSmashers committed
    * Rewrote inliner to process data asynchronously.
    * Supports 2xx responses, redirects, errors, and timeouts.
    * Supports cyclical references.
    * Supports protocol-less requests (defaults to HTTP).
    * Supports overriding request options - see
    * Supports timeout in ./bin/cleancss via --timeout / -t switches.
    * Supports inlining local resources only without a callback.
    * Supports rebasing URLs in remote @imports.
    * Always triggers a callback asynchronously.
Commits on Dec 11, 2013
  1. @GoalSmashers

    Deprecates '--selectors-merge-mode' in favor of a more generic '--com…

    GoalSmashers committed
    …patibility' switch.
    * 'selectorsMergeMode' option to library is also renamed to 'compatibility'.
Commits on Nov 5, 2013
  1. @XhmikosR
Commits on Nov 4, 2013
  1. @GoalSmashers

    Fixes #139 - adds consistent error and warning handling for CLI and l…

    GoalSmashers committed
    * 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.
  2. @GoalSmashers

    Fixes #166 - output more info in CLI's `debug` mode.

    GoalSmashers committed
    * Show efficiency with up to two decimal places.
  3. @GoalSmashers

    Fixes #145 - adds minifications stats when calling library with `debu…

    GoalSmashers committed
    …g: true` option.
    * Refactors CLI `--debug` to use these stats too.
    * Moves `originalSize` field into `stats` one.
Something went wrong with that request. Please try again.