Example: unset on undeclared custom porperty

An example for the result of an unset custom property assignment.

by Sebastian

HTML

<style>
  :root {
    --button-background: green;
  }

</style>
<button type="button">
  A button styled by your browser
</button>
<button type="button" style="background: var(--not-declared)">
  A button with background: unset
</button>
<button type="button" style="background: var(--button-background)">
  A button with background: green
</button>