p:has({text*="Bad word"}) { ... }
The p:has({text*="mytext"}) { ... } selector selects the paragraph containing “Bad word” phrase.
p:has({text*="Bad word"}) { ... }
The p:has({text*="mytext"}) { ... } selector selects the paragraph containing “Bad word” phrase.