:root {
  --top-color: orange;
  --bottom-color: yellow;
  --my-gradient: linear-gradient(var(--top-color), var(--bottom-color));
}

body {
  height: 100vh;
  background-image: var(--my-gradient);
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.