PostCSS plugin to instruct angular emulated encapsulation with tailwind @apply function
npm install postcss-ng-tailwind-in-componentsjs
plugins: [
require('postcss-ng-tailwind-in-components')({ parentSelector: '.dark'});
]
`
result:
`css
.dark .test {
color: red;
}
`
transforms to:
`css
.dark .test, :host-context(.dark) .test {
color: red;
}
``