CSSO (CSS Optimizer) - structural CSS minimization

    CSSO (CSS Optimizer) is a CSS minimizer that performs both minimization without changing the structure and structural minimization in order to get the smallest text possible.
    CSSO is written in Javascript, executed both in the browser and on the command line (using NodeJS).
    Distributed under the MIT license.

    What can


    Minimization without changing the structure:
    • Whitespace removal
    • Removing trailing ';'
    • Removing Comments
    • Removing the wrong charset and import
    • Delete erroneous items
    • Color minimization
    • Minimization 0
    • Minimizing margin and padding
    • Merge multi-line strings into single-line
    • Font-weight minimization
    Minimization with a change in structure:
    • Merging blocks with the same selectors
    • Removing overlapping properties
    • Partial allocation of properties in a separate block
    • Partial Block Merge

    Where to find


    References:Attention : the project is in beta status and may contain flaws and errors. Most likely, in the future, the addresses of the repository and hosting for the web interface will change. The announcement aims to familiarize the public with the new CSS minimizer at an early stage, collect feedback, fix missing errors and make CSSO more convenient for the user.

    Why another minimizer


    Most of today's popular minimizers ( YUICompressor and the like) are minimization without analysis and structure analysis. Roughly speaking, the set of regexp is replaced by X with a smaller Y.

    Example: Processing by regexp: Processing with minimizing the structure: This is the difference. And if on small and manually minimized CSS the benefits are not so obvious, then on automatically created style sheets the gain can be kilobytes. PS. Documentation and even JsDoc in Russian. There will be English.
    .test { color: red }
    .test { color: green }


    .test{color:red}.test{color:green}


    .test{color:green}




    Also popular now: