pub fn remove_unused_css(css: &str, used_selectors: &[&str]) -> StringExpand description
Remove unused CSS rules (tree shaking)
This function analyzes CSS and removes rules that don’t match any of the provided used selectors. This is useful for eliminating dead CSS code.
§Arguments
css- The CSS stylesheet to analyzeused_selectors- A list of selectors that are actually used in the application
§Returns
The CSS with unused rules removed