An open API service indexing awesome lists of open source software.

https://github.com/qyful/cssminifier

An open source Python minification package for Cascading Style Sheets (CSS).
https://github.com/qyful/cssminifier

css css3 minification minifier minify minify-css

Last synced: about 1 year ago
JSON representation

An open source Python minification package for Cascading Style Sheets (CSS).

Awesome Lists containing this project

README

          

██████╗███████╗███████╗███╗ ███╗██╗███╗ ██╗██╗███████╗██╗███████╗██████╗
██╔════╝██╔════╝██╔════╝████╗ ████║██║████╗ ██║██║██╔════╝██║██╔════╝██╔══██╗
██║ ███████╗███████╗██╔████╔██║██║██╔██╗ ██║██║█████╗ ██║█████╗ ██████╔╝
██║ ╚════██║╚════██║██║╚██╔╝██║██║██║╚██╗██║██║██╔══╝ ██║██╔══╝ ██╔══██╗
╚██████╗███████║███████║██║ ╚═╝ ██║██║██║ ╚████║██║██║ ██║███████╗██║ ██║
╚═════╝╚══════╝╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝

------------------------------------------------------------------------------

An open source Python minification package
for Cascading Style Sheets (CSS).

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cssminifier)
![PyPI - Implementation](https://img.shields.io/pypi/implementation/cssminifier)

## Installation & Basic Usage
To install the package, you should use the PIP package manager:

```
pip install cssminifier
```

After that, you can import it into a Python script and use it as you desire. For example:

```py
from cssminifier import Minifier

def main():
with open("tests/media_queries.css", 'r') as fp:
minifier = Minifier(fp.read())

print(minifier())

fp.close()

if __name__ == '__main__':
main()
```