Skip to content


Subversion checkout URL

You can clone with
Download ZIP
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 authored
    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 authored committed
    * 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 authored Jakub Pawlowicz committed
Commits on Jun 8, 2014
  1. @GoalSmashers

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

    GoalSmashers authored
    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 authored
Commits on Feb 25, 2014
  1. @GoalSmashers
Commits on Feb 10, 2014
  1. @GoalSmashers

    Fixes #235 - adds IE7 compatibility mode.

    GoalSmashers authored
    :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 authored
    * 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 authored
    …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 authored
    * 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 authored
    * Show efficiency with up to two decimal places.
  3. @GoalSmashers

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

    GoalSmashers authored
    …g: true` option.
    * Refactors CLI `--debug` to use these stats too.
    * Moves `originalSize` field into `stats` one.
Commits on Nov 3, 2013
  1. @GoalSmashers

    Fixes #138 - makes CleanCSS interface fully object oriented.

    GoalSmashers authored
    * use `new CleanCSS(options).minify(css)` to minify CSS.
    * adds 1.x -> 2.x migration guide.
  2. @GoalSmashers
  3. @GoalSmashers

    Adds merging adjacent selectors if body is the same.

    GoalSmashers authored
    * 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.
Something went wrong with that request. Please try again.