I incorporate 2 nebulous motifs: one light and one dark. A component that binds the HTML output from a library to the innerHtml looks like this:
<div [innerHtml]="songHtml"></div>
To style this content with custom CSS, I added the following:
@Component({
[...]
encapsulation: ViewEncapsulation.ShadowDom,
})
Now, I am trying to apply theme colors like this:
@include nb-install-component() {
.chords-color-red {
color: nb-theme(text-color-red)
}
}
Unfortunately, this method is not effective... I have learned that it does not work with ViewEncapsulation.
Here are some unsuccessful attempts I made:
- ::ng-deep .nb-theme-dark
- Using the safeHtml pipe (with sanitizer) and removing ViewEncapsulation
Is there a way to make this work? Thank you!