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 1, 2024 via pnpm

csso 5.0.5

CSS minifier with structural optimisations
Package summary
Share
1
issue
1
low severity
license
1
3
licenses
2
MIT
1
CC0-1.0
1
BSD-3-Clause
Package created
31 Aug 2011
Version published
10 Aug 2022
Maintainers
3
Total deps
4
Direct deps
1
License
MIT

Issues

1

1 low severity issue

low
Recommendation: Read and validate the license terms
via: css-tree@2.2.1
Collapse
Expand

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
2 Packages, Including:
css-tree@2.2.1
csso@5.0.5

Creative Commons Zero v1.0 Universal

Public Domain
Not OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
Cannot
Must
1 Packages, Including:
mdn-data@2.0.28

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-js@1.2.0
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

1
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
css-tree2.2.1266.42 kBMIT
prod
1

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.