Identifies redundant CSS classes not used by the templates provided.
Project description
RedundantCSS
Contents:
Description:
This script analyzes a stylesheet and identifies redundant CSS classes not used by the templates provided. The script prints the names of all unused classes to the terminal, at which point you can go to the stylesheet and delete unused classes.
COMING IN V2: Remove the manual aspect of removing the CSS and give user the option for this process to be done automatically.
Installation:
pip install redundantcss
Usage:
redundantcss 'stylesheet_path' 'template_path_or_template_paths'
or
redundantcss 'stylesheet_path' 'template_path_or_template_paths'
Arguments:
-
'stylesheet_path': Path to the CSS stylesheet to be analyzed.
-
'template_path_or_template_paths': Path to a folder containing HTML templates or paths to individual template files.
Examples:
-
Analyze a single template:
python redundantcss.py 'styles.css' 'template.html'
-
Analyze multiple templates in a folder:
python redundantcss.py 'styles.css' 'templates/'
-
Analyze multiple templates provided as separate arguments:
python redundantcss.py 'styles.css' 'template1.html' 'template2.html' 'template3.html'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for redundantcss-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f954d92b4543f67ef46cea4faa04dafb3adcbc8cc9dbeb01ac30c40b9e9ddd62 |
|
MD5 | a655f98737f21ea8bb9e0fd634ad5cdd |
|
BLAKE2b-256 | 50d0e7c65b8594de3ac1b10d5e2ad5af6601cd79a50ef23b6ac8b41b3aa734a8 |