i'm styling a React component with css modules.
there's a part where i insert html code using dangerouslySetInnerHTML
<div className={styles.article_text} dangerouslySetInnerHTML={{__html: props.text}} />
i have no control over this html code but i want to style it. i can style the html by using tag rules like this:
.article_text {
h2 {
@apply text-3xl mt-6 mb-4; /* this is applied to headings ... */
}
p {
@apply mb-3; /* and paragraphs */
}
...
what's not working is styling css classes this way:
.article_text {
.listblock {
@apply bg-white; /* this doesnt apply to the div.listblock inside the html code*/
}
is there a way i can get this to work?