letpurge=require('gulp-purgecss');gulp.src('bootstrap.min.css').pipe(purge({content: [...],// glob of my files, including the said CSS filesafelist: {standard: [/backdrop/]// for Bootstrap Modal},fontFace: true,variables: true}))...
But the resulting Bootstrap doesn't keep the variable --bs-primary, and for now I need to add --bs-primary to safelist.variables to make it work correctly.
Expected behavior
I expect any variable that is used in the content will be kept.
Environment (please complete the following information):
OS: Windows 10
Package gulp-purgecss
Version 4.0.2
The text was updated successfully, but these errors were encountered:
I'm having the same issue with bootstrap 5, and it only affects the var(--bs-font-sans-serif) statement. Tried to set safelist: ['--bs-font-sans-serif'], following @MuTsunTsai 's suggestion, but it didn't work.
Describe the bug
I'm trying to purge Bootstrap (v.5 in particular), and in my website I have another CSS file that contains the following rule:
Then I run
gulp-purgecssas follows:But the resulting Bootstrap doesn't keep the variable
--bs-primary, and for now I need to add--bs-primarytosafelist.variablesto make it work correctly.Expected behavior
I expect any variable that is used in the content will be kept.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: