purgecss-docs icon indicating copy to clipboard operation
purgecss-docs copied to clipboard

Add more information about whitelisting.

Open Mighty683 opened this issue 5 years ago • 1 comments

Is your feature request related to a problem? Please describe.

pseudo-elements like :before are considered as children e.g selector: i.flag.us:before

When I wanted whitelist selectors connected with flag icons which are build like one above I used whitelistPatterns: [/flag/] pattern but it didn't work.

i.flag - selector passed test i.flag.us:before - selector was purged

I had to use: whitelistPatternsChildren: [/flag/]

Describe the solution you'd like It would be good if such information would be added in documentation, maybe add an example?

Mighty683 avatar Jul 29 '19 11:07 Mighty683

yes, it makes sense to add additional information or an example as it is not obvious

Ffloriel avatar Sep 01 '19 09:09 Ffloriel