A color stop is just a color paired with a position — but dragging stops around freely while designing a gradient means they don't always get added in left-to-right order. What ends up in the final CSS handles that automatically, and understanding how reveals a genuinely useful trick along the way.
Stops Always Render in Position Order
Regardless of the order stops were added or dragged into place, they're sorted by position before being written into the final gradient — so a stop added last but placed at 0% still appears first in the CSS output:
Added in this order: 100%, 0%, 50% Output CSS: #f97316 0%, #db2777 50%, #7c3aed 100%
This matters because a gradient's visual result depends entirely on position order, not creation order — writing stops out of position order would produce a genuinely broken or unpredictable gradient, so this sorting step isn't optional.
The Hard-Edge Trick: Two Stops, Same Position
Placing two color stops at the exact same position doesn't cause an error — it creates a sharp, hard edge between two flat colors instead of a smooth blend:
background: linear-gradient(90deg, #ffffff 50%, #000000 50%);
This produces a gradient that's actually just two solid color blocks split cleanly down the middle — useful for split-color backgrounds, flag-style designs, or any layout that wants a gradient's flexibility (angle, easy color changes) without an actual blended transition.
Combining Both
A gradient can mix smooth transitions and hard edges freely — three or more stops where some share a position and others don't produces a design with both blended sections and sharp divisions in the same background, all from the same property.
Place and drag your own color stops visually
Try the Color Gradient Creator