position-try-order

Determines the order in which the browser tries the fallback positions defined in 'position-try-fallbacks'. You can tell the browser to prioritize the position with the most available space.

It is documented as part of the CSS Anchor Positioning specification.

/* Usage Example */
.popup {
  position-try-fallbacks: flip-block, flip-inline;
  /* Prioritize the fallback that has the most visible area on screen */
  position-try-order: most-width;
}

/* Syntax */
position-try-order: normal;

/* Global values */
position-try-order: inherit;
position-try-order: initial;
position-try-order: revert;
position-try-order: revert-layer;
position-try-order: unset;
Limited availability Since 2020 76% global usage

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

125+
125+
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