New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Ignore HTML sections #380
Projects
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a bit of an edge case, but it would be great to be able to have uncss ignore sections/elements within the html. My thought is that it'd be nice to add a class (eg. ".uncss-ignore") to an element and have uncss not include it in its processing.
Our use case is that we're using the html our pattern library exports for uncss' reference. The html includes a lot of examples and reference components that may or may not end up being used in an actual pattern.
Example use:
I have a POC working. It works by removing elements with the 'uncss-ignore' class from the DOM before the call to findAll in getUsedSelectors. I'll submit a PR soon for you to take a look at.
The text was updated successfully, but these errors were encountered: