CSSO (CSS Optimizer) is a CSS minifier. It performs three sorts of transformations: cleaning (removing redundant), compression (replacement for the shorter forms), and restructuring (merge of declarations, rules, and so on). As a result, an output CSS becomes much smaller in size. One of CDN services like unpkg or jsDelivr can be used. By default (for short path) the ESM version is exposed. For IIFE version a full path to a bundle should be specified. CSSO is based on CSSTree to parse CSS into AST, AST traversal and to generate AST back to CSS. All CSSTree API is available behind syntax field extended with compress() method. You may minify CSS step by step. CSSO can use data about how CSS is used in the markup for better compression. File with this data (JSON) can be set using the usage option.

Features

  • Bundles are available for use in a browser
  • Minified IIFE with csso as global
  • One of CDN services like unpkg or jsDelivr can be used
  • Also syntax can be imported using csso/syntax entry point
  • Minify source CSS passed as String
  • Generate source map with respect of source map from input CSS

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow CSSO

CSSO Web Site

Other Useful Business Software
$300 in Free Credit Towards Top Cloud Services Icon
$300 in Free Credit Towards Top Cloud Services

Build VMs, containers, AI, databases, storage—all in one place.

Start your project in minutes. After credits run out, 20+ products include free monthly usage. Only pay when you're ready to scale.
Get Started
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of CSSO!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Software Development Software

Registered

2022-06-17