<h1>Hello<br/> World</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Velit <span>asperiores</span> cupiditate dolor quo iste animi, eveniet in inventore <span>obcaecati</span> quisquam architecto pariatur et perspiciatis, deleniti voluptatum consequuntur <span>voluptas</span> voluptatibus repellat!</p>

<!-- This is where we include the worklet -->
<script src='https://unpkg.com/extra.css/crossOut.js'></script>
// This is where we use the custom properties

@supports (background: paint(something)) {
  h1 {
    /* 
      Optionally set property values. 
      This can be done at root or local scope 
    */
    --extra-crossColor: #fc0; /* default: black */
    --extra-crossWidth: 3; /* default: 1 */

    background: paint(extra-crossOut);
    line-height: 1.5;
  }

  h2 {
    margin: 10rem auto;
    display: block;
    width: 80vw;
    max-width: 900px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  span {
    --extra-crossColor: #d4f;/* default: black */

    background: paint(extra-crossOut);
  }
}

// Additional Styling

body {
  font-family: monospace;
  text-align: center;
  padding: 1rem;
  margin: 0;
}

p {
  max-width: 660px;
  margin: 0 auto;
  font-weight: 300;
  font-size: 1.2rem;
  line-height: 1.5;
  text-align: left;
}

h1 {
  font-size: 4rem;
  display: inline-block;
  font-weight: 100;
  margin: 1rem auto;
  width: 100%;
  max-width: 760px;
  position: relative;
}

h2 {
  font-size: 2.5rem;
  font-weight: 100;
  display: inline-block;
  position: relative;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.