Using this technique but purge seems to not preserve the body background css
damianof opened this issue · 1 comments
damianof commented
My configuration:
options: {
whitelist: [
'theme-default',
'theme-dark-bg',
'theme-navy-bg',
'theme-pink',
'--color-bg-primary',
'color-bg-primary'
],
},
content: [
'./src/**/*.html',
'./src/**/*.vue'
],
}```
damianof commented
Ok i seems to have foudn the issue. I was doing it wrong. I need to white list by classes like this:
whitelist: [
'theme-default',
'theme-dark-bg',
'theme-navy-bg',
'theme-pink',
'text-primary',
'text-primary-soft',
'text-secondary',
'text-danger',
'text-inverse',
'text-inverse-soft',
'text-nav-primary',
'text-nav-primary-soft',
'bg-primary',
'bg-primary-soft',
'bg-danger',
'bg-nav-primary',
'bg-nav-secondary'
],
I hope maybe in the future there will be a better way to whitelist the entire extended custom css variables without having to remember to add them there. But i have to say, so far working with TailwindCSS has been a blast.