Dev Helpers

CSS / Forms and controls

Make a text cursor easier to see

Dev Helpers · December 27, 2025

Caret colour is a small edit with a large effect on dark inputs. Check the insertion point against normal, focused and selected backgrounds.

Worked example

<style>
  .demo {
    caret-color: #be123c;
  }
</style>
<input class="demo" aria-label="Edit title" value="Edit description" />

Implementation notes

A transparent caret can make an editable field look disabled. Check the focus outline and selection styling independently of the insertion point.

Try it yourself

Move the caret across a filled input using the arrow keys.

Open the CSS example →

Editorial date December 27, 2025 · Published December 6, 2026

Related articles

Fluid width with a maximum

A fluid container needs a small-screen width and a large-screen maximum. Outer gutters should remain visible at both extremes.

Square aspect ratio

A square ratio reserves equal sides even before media loads. Fit rules decide whether rectangular content is cropped or letterboxed.