JSFiddle - React, Tailwind, and code Playground

HTML

<html>
<body>
  <div class="a">
    Sample Text
    <div class="b">
      Sample Text
    </div>
    <p>
      Sample Text
    </p>
  </div>
  <div class="a b">
    Sample Text
  </div>
</body>
</html>

CSS

body {
  background-color: gray;
}

.a {
  background-color: white
}

.b {
  background-color: black;
  color: white;
}