Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

add ability to whitelist selectors #3

Closed
nellyk opened this issue Feb 13, 2020 · 1 comment · Fixed by #9
Closed

add ability to whitelist selectors #3

nellyk opened this issue Feb 13, 2020 · 1 comment · Fixed by #9
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed released

Comments

@nellyk
Copy link
Contributor

nellyk commented Feb 13, 2020

Currently we do not have an option to whitelist certain selectors if you do not want them removed by PurgeCSS using this library.
This feature would be to add support for whitelisting selectors.

PurgeCSS supports whitelisting https://purgecss.com/whitelisting.html.

Through these three options:

  • Using specific selectors:
    whitelist: ['random', 'yep', 'button']
  • Using a regular expression:
whitelistPatterns: [/red$/],
whitelistPatternsChildren: [/blue$/]
  • In the CSS directly by adding this line to your css file.
    /* purgecss ignore */
@nellyk nellyk added enhancement New feature or request help wanted Extra attention is needed labels Feb 13, 2020
@oneamexbot
Copy link
Contributor

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants