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).
- Host: GitHub
- URL: https://github.com/qyful/cssminifier
- Owner: qyful
- License: mit
- Created: 2023-12-27T23:18:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-28T01:32:35.000Z (over 2 years ago)
- Last Synced: 2025-04-23T06:08:59.674Z (about 1 year ago)
- Topics: css, css3, minification, minifier, minify, minify-css
- Language: Python
- Homepage: https://oliwiersporny.com
- Size: 8.79 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
██████╗███████╗███████╗███╗ ███╗██╗███╗ ██╗██╗███████╗██╗███████╗██████╗
██╔════╝██╔════╝██╔════╝████╗ ████║██║████╗ ██║██║██╔════╝██║██╔════╝██╔══██╗
██║ ███████╗███████╗██╔████╔██║██║██╔██╗ ██║██║█████╗ ██║█████╗ ██████╔╝
██║ ╚════██║╚════██║██║╚██╔╝██║██║██║╚██╗██║██║██╔══╝ ██║██╔══╝ ██╔══██╗
╚██████╗███████║███████║██║ ╚═╝ ██║██║██║ ╚████║██║██║ ██║███████╗██║ ██║
╚═════╝╚══════╝╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
------------------------------------------------------------------------------
An open source Python minification package
for Cascading Style Sheets (CSS).
[](https://opensource.org/licenses/MIT)


## 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()
```