skillfed

rcssmin

CSS Minifier

rcssmin v1.2.2 2.9M downloads/30d#2,854 on PyPI
Permissive license Apache License, Version 2.0 AGING released

What it is and what it does

RCSSmin is a CSS minifier that reduces CSS file size by removing whitespace, comments, and optional semicolons while preserving the stylesheet's functionality. It performs syntactical compression only—it strips unnecessary characters but does not restructure or optimize CSS rules semantically. The package is implemented in C for speed, making it suitable for runtime use rather than just build-time preprocessing, though it also supports Python 2.7 and Python 3.6 and later.

The minifier recognizes CSS syntax quirks including the nesting selector (&), unicode escapes, data URLs, and several browser-specific hacks (IE7, Mac-IE5, and IE6 workarounds). It keeps CSS strings intact and can optionally preserve comments marked with an exclamation mark. With no runtime dependencies, it installs as a compiled extension across many Linux platforms and Python versions.

Use it for:

  • Minify CSS at runtime in web applications to reduce bandwidth and improve page load times without a separate build step.
  • Process user-uploaded or dynamically generated CSS stylesheets before serving them to clients.
  • Integrate CSS compression into a Python-based static site generator or template system.
  • Reduce CSS file size in embedded or IoT applications where storage and transmission are constrained.
  • Preprocess CSS in a web framework middleware to automatically compress stylesheets on the fly.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

RCSSmin minifies CSS by removing spaces, comments, and unnecessary characters while preserving CSS semantics and supporting common CSS hacks.

Yes, if you need runtime CSS minification in Python and are comfortable with a C-compiled dependency. The package is stable (Production/Stable status), has no known vulnerabilities, and is well-established (in top 5000 PyPI packages by downloads). However, the 306-day gap since the last release and aging maintenance status suggest limited active development; verify that the package still meets your platform and Python version requirements before relying on it for new projects.

Install

rcssmin on PyPI

pip

pip install rcssmin

uv

uv add rcssmin

poetry

poetry add rcssmin

Installing rcssmin

Before you install

Medium install friction due to compiled C extensions across multiple platform wheels (manylinux, musllinux, aarch64). No runtime dependencies. Last release was 306 days ago; maintenance status is aging.

License in practice

Licensed under Apache License Version 2.0, a permissive open-source license. You may use, modify, and distribute the package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install rcssmin

import rcssmin
minified = rcssmin.cssmin('body { color: red; /* comment */ }')

Verify before relying

  • Whether the C extension is reliably built and tested on all advertised platforms (manylinux, musllinux, aarch64)
  • Current maintenance status and whether the 306-day gap since last release indicates active or dormant development
  • Performance improvement claims ('factor 100 or so') and whether they hold on modern Python versions

Package facts

License Apache License, Version 2.0 (permissive)
Python support not specified
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance aging — 306 days since the last release
First released
Downloads 2,864,217/month — #2,854 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: rcssmin-1.2.2-cp27-cp27m-manylinux1_i686.whl; rcssmin-1.2.2-cp27-cp27m-manylinux1_x86_64.whl; rcssmin-1.2.2-cp27-cp27mu-manylinux1_i686.whl; rcssmin-1.2.2-cp27-cp27mu-manylinux1_x86_64.whl; rcssmin-1.2.2-cp310-cp310-manylinux1_i686.whl; rcssmin-1.2.2-cp310-cp310-manylinux1_x86_64.whl; rcssmin-1.2.2-cp310-cp310-manylinux2014_aarch64.whl; rcssmin-1.2.2-cp310-cp310-musllinux_1_1_aarch64.whl; rcssmin-1.2.2-cp310-cp310-musllinux_1_1_i686.whl; rcssmin-1.2.2-cp310-cp310-musllinux_1_1_x86_64.whl; rcssmin-1.2.2-cp311-cp311-manylinux1_i686.whl; rcssmin-1.2.2-cp311-cp311-manylinux1_x86_64.whl; rcssmin-1.2.2-cp311-cp311-manylinux2014_aarch64.whl; rcssmin-1.2.2-cp311-cp311-musllinux_1_1_aarch64.whl; rcssmin-1.2.2-cp311-cp311-musllinux_1_1_i686.whl; rcssmin-1.2.2-cp311-cp311-musllinux_1_1_x86_64.whl; rcssmin-1.2.2-cp312-cp312-manylinux1_i686.whl; rcssmin-1.2.2-cp312-cp312-manylinux1_x86_64.whl; rcssmin-1.2.2-cp312-cp312-manylinux2014_aarch64.whl; rcssmin-1.2.2-cp312-cp312-musllinux_1_1_aarch64.whl

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI ApprovedOperating System :: OS IndependentProgramming Language :: CProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: JythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: Text ProcessingTopic :: Text Processing :: FiltersTopic :: Utilities

Tags

css minifiercss compressionremove css whitespacecss optimizerlightweight css minificationruntime css minifiercss syntax compressor
css-optimizationweb-performance

More Libraries packages