To filter your global CSS file for styles used in a specific HTML file in VS Code:
- Use a CSS Purge Tool : Install and configure a tool like PurgeCSS or
UnCSS to analyze your HTML and remove unused CSS.
- Manual Filtering : Open the HTML file, inspect elements in the
browser's developer tools, and manually copy relevant CSS selectors
and properties from your global CSS.
- Extensions : Use VS Code extensions like CSS Peek to help identify and
manage styles.
For the most efficient method, use a CSS purge tool.