CSS authoring guides

Compare grab, zoom and resize cursors in the browser

·

A pointer can tell the reader whether a region is draggable, zoomable or resizable. Compare the native pointer shapes on the same sample before setting the declaration in your component.

CSS Cursor Tester

Compare three native cursor keywords

Choose grab and move the pointer over the preview. The computed cursor reads grab. This is the state before dragging a movable item.

Choose zoom-in and inspect the same preview again. Then choose col-resize for a divider that changes the relative widths of adjacent columns.

CSS Basic User Interface Level 4 cursor

Check the computed value on a second device

The preview reports the CSS keyword the browser computes for the sample. Compare that value on a touch device while keeping the same selected option.

Use a mouse or trackpad for the visual comparison. The exact rendered pointer image comes from the browser and operating system.

CSS Basic User Interface Level 4 cursor

Export the rule for the intended control

Select col-resize and download the CSS. Confirm that the .cursor-sample rule contains cursor: col-resize.

Use the declaration on the divider or target control. Keep the keyboard and pointer behavior consistent with the underlying action.

CSS Basic User Interface Level 4 cursor

Common questions

When is zoom-in a good choice?

Use it on a region that becomes larger when activated. The cursor describes an action available at that control.

What does the auto keyword do?

The browser chooses a cursor appropriate to the context. A text field can therefore present a different pointer from a button or plain region.

Sources

Put it into practice.

Related guides