title: CSS background-clip: text from parent element background
body: <p>I'm trying to get a <code>background-clip: text</code> on a child div to get its background from the parent div. Basically it should look like the text is cut out.</p>
  
  <p>It's easy to do when the background is on the same element, but I can't seem to figure out when the background is on a different div.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.background {
      width: 100%;
      height: 700px;
      background: url('http://bgfons.com/uploads/gold/gold_texture464.jpg');
      background-size: cover;
      display: flex;
      justify-content: center;
      align-items: center;
  }
  
  .background &gt; div {
      flex: 1;
      font-size: 5em;
      font-weight: bold;
      text-align: center;
  }
  
  .foreground1 {
      background-clip: text;
      -webkit-background-clip: text;
      color: transparent;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="background"&gt;
      &lt;div class="foreground1"&gt;This is some text&lt;/div&gt;
      &lt;div class="foreground2"&gt;This is some text&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have the following in Plunkr (The text should get its color from the background image):</p>
  
  <p><a href="https://next.plnkr.co/edit/4lGVXnfvex9Q6mmY?open=lib%2Fscript.js" rel="nofollow noreferrer">https://next.plnkr.co/edit/4lGVXnfvex9Q6mmY?open=lib%2Fscript.js</a></p>
  
  <p>Is this possible, and if so, how? Any help is appreciated. </p>