body { position: relative; min-height: 100vh; margin: 0; background-color: #eee; } @media (prefers-color-scheme: dark) { body { background-color: #222; } } body::before { content: ""; display: block; position: absolute; inset: 0; background: conic-gradient( red, orange, gold, yellow, lime, aqua, dodgerblue, blue, indigo, purple, deeppink, red ); /* ↓ This makes the checkerboard pattern ↓ */ mask-image: repeating-conic-gradient(#0000 0% 25%, #000 0% 50%); mask-size: 2vmax 2vmax; }