Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 26, 2024 via pnpm

csso 2.1.0

CSSO (CSS Optimizer) is a CSS minifier with structural optimisations
Package summary
Share
0
issues
2
licenses
9
MIT
1
BSD-3-Clause
Package created
31 Aug 2011
Version published
8 May 2016
Maintainers
3
Total deps
10
Direct deps
2
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
9 Packages, Including:
ansi-regex@2.1.1
ansi-styles@2.2.1
chalk@1.1.3
clap@1.2.3
csso@2.1.0
escape-string-regexp@1.0.5
has-ansi@2.0.0
strip-ansi@3.0.1
supports-color@2.0.0

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
source-map@0.5.7
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of csso 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
clap1.2.37.49 kBMIT
prod
source-map0.5.7185.31 kBBSD-3-Clause
prod

Visualizations

Frequently Asked Questions

What does csso do?

CSSO, or CSS Optimizer, is an npm package used to minify CSS. Minification is performed through three types of transformations: cleaning (removal of redundants), compression (replacement with shorter forms), and restructuring (merging of declarations, rules, etc.). As a result, the output CSS is significantly reduced in size, enhancing web page load speeds and overall performance.

How do you use csso?

Using CSSO is fairly straightforward. First, you need to install the package via npm using the command npm install csso. Once installed, you can implement CSSO in your JavaScript files. Here's an example of how it's typically used:

import { minify } from 'csso';

const minifiedCss = minify('.test { color: #ff0000; }').css;
console.log(minifiedCss);
// Output: .test{color:red}

You can also import CSSO using CommonJS:

const { minify } = require('csso');

const minifiedCss = minify('.test { color: #ff0000; }').css;
console.log(minifiedCss);
// Output: .test{color:red}

CSSO can also be used to minify CSS step by step:

import { syntax } from 'csso';

const ast = syntax.parse('.test { color: #ff0000; }');
const compressedAst = syntax.compress(ast).ast;
const minifiedCss = syntax.generate(compressedAst);

console.log(minifiedCss);
// Output: .test{color:red}

Where are the csso docs?

Detailed documentation for CSSO, including various functions, options, and usage examples, can be found on the CSSTree GitHub repository. The documentation provides insight into how the package parses CSS into AST, performs AST traversal, and generates AST back to CSS. The repository also contains information on related projects, APIs, source maps, usage data, and more.