Skip to content

Python tool to remove unused CSS and decrease file size.

Notifications You must be signed in to change notification settings

hamzaehsan97/CSS-optomizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSS-optomizer

Python tool to remove unused CSS and decrease file size.

Link

This tool has been converted to a flask app. The client side can be accessed at the following link: https://skinny-css.netlify.app/

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

1) Make sure python 3.x is installed on your device before going to next steps.
2) Add an HTML file named 'index.html' and 'styling.CSS' to the main folder. Sample files are available in the folder attached.
3) Use the following commands in your terminal to install requirements and run the script.
    - pip install -r requirements.txt
    - python3 main.py

Upcoming changes

  • Creating custom CSS file with the filtered CSS rules
  • Read CSS and HTML from links instead of files
  • Changing script to an object oriented approach
  • Logging unused script as a seperate CSS file
  • Creating a simple web UI to make the tool accessible
  • Scan site map for pages and CSS to automate optomization

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Feel free to play with the script or make pull requests

About

Python tool to remove unused CSS and decrease file size.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages