Skip to content

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

License

Notifications You must be signed in to change notification settings

qyful/CSSMinifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

License: MIT PyPI - Python Version PyPI - Implementation

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:

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