JSFiddle - React, Tailwind, and code Playground

by Christian Sonne

HTML

<div class="xxx">
  <span class="yyy">foo</span>
</div>
<div class="xxx">
  <span class="yyy">bar</span>
</div>

CSS

.xxx:contains(foo) {
  background: red;
}