scroll-target-group

A new property that allows you to group multiple targets in a scroll container together. This helps the browser decide which element should be 'snapped' to when there are multiple potential choices.

It is documented as part of the CSS Overflow specification. This is an experimental technology. The syntax and behavior are still subject to change.

/* Usage Example */
.group-container {
  /* Automatically group targets inside this container */
  scroll-target-group: auto;
}

/* Syntax */
scroll-target-group: none;
scroll-target-group: auto;

/* Global values */
scroll-target-group: inherit;
scroll-target-group: initial;
scroll-target-group: revert;
scroll-target-group: revert-layer;
scroll-target-group: unset;
Limited availability Since 2020 63% global usage

This feature is not Baseline because it does not work in some of the most widely-used browsers.

140+
140+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC