@position-try

An at-rule that allows you to define custom named sets of positioning properties. These can then be used as fallbacks in the 'position-try-fallbacks' property.

/* Usage Example */
@position-try --custom-bottom {
  position-area: bottom;
  margin-top: 10px;
}
.popover{
  position-try-fallbacks: --custom-bottom;
}
Limited availability Since 2020 77% 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