Hello,
- I encountered a problem using PurgeCCS when my css has some pattern selector like
[class^="tf-"], [class*=" tf-"]
.
They where removed. - After debugging a lot, it is a bug upstream in PurgeCSS. See this issue.
- Using regular expressions in
whitelistPatterns
do not work (see this issue), and as a workaround someone suggested to add the style list instead of the pattern selector.
As there can be a lot of (and changing/adding/removing) styles really used, and as Hugo already does this job by producing hugo_stats.json
I was wondering if I could reuse this in the Hugo process.
I doubt it because this file is produced at the end of the Hugo build process.
I understand that I can post process this file and then reinject a part in my css, but I would avoid to break the beautiful Hugo worlflow by adding this hack.
Any idea, or solution waiting for (and if) upstream correcting this problem ??