You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
<!-- .c-component rule would be removed, because uncss ignored the section -->
<div class="uncss-ignore c-component"></div>
<!-- .c-component rule would NOT be removed -->
<div class="c-component"></div>
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:
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: