A graph-paper background for a whiteboard app
Say you are building a simple whiteboard and the canvas area needs a faint grid, like graph paper, so people can line things up. An image would work, but it would need a version for each theme and would blur on a high-density screen. A CSS gradient grid needs neither.
Choose Grid, set the shape colour to a light grey such as #e3e6ef and the background to white. Set Repeats every to 24 pixels and Line thickness to 1. The CSS comes out as a white background-color and a background-image of two linear gradients: one draws a 1 pixel line at the top of each tile, and the other, at 90 degrees, draws one down its left side. With background-size: 24px 24px, the lines meet in a grid of 24 pixel squares. Swap the colours for a dark theme, or put the line colour in a custom property and switch it with the theme.
Other patterns follow the same idea. Stripes at 45 degrees, repeating every 16 pixels with a 6 pixel stripe, make the familiar warning band for an area that is still loading or not available. Dots with a 4 pixel dot every 20 pixels make a soft texture for an empty state. Checks every 20 pixels give the grey and white board that design tools show behind transparent images.
Because the output is only background properties, it can be combined with anything else on the element. Put a solid colour or a gradient from the Gradient Generator in a second background layer, or add border-radius and the pattern clips to the corners. The preview here draws the exact CSS you copy, so what you see is what the browser will draw.
There are limits. Very small tiles, under about 4 pixels, can shimmer or blur when the page is zoomed, because the browser has to blend edges between device pixels. Hard-edged diagonal shapes, such as triangles and zigzags, show slight jagged steps on low-density screens. These patterns are backgrounds, so assistive technology ignores them and printers skip them unless background graphics are turned on. And the generator makes two-colour patterns only: for more colours, layer two patterns or edit the gradient stops by hand.