I am trying to add uncss for my gulp workflow.
To ignore some classes, which are added via javascript for example, i am declaring these classes with "ignore" (in my case, i am trying to uncss the css from the jquery plugin magnific-popup).
my workflow looks like this and uses regex to match all magnific-popup css:
gulp.task("uncsstask", () => {
gulp.src('original-mfp.css')
.pipe(uncss({
html:
[
'page.html',
],
ignore: [
/\.mfp-*.*/g,
]
}))
.pipe(gulp.dest('new'));
});
What happen´s is that the class
.mfp-container
makes it to the new css file, but the class
.mfp-content
does not.
I checked the regex statement with various regex checkers.