Anchor positioning syntax changes
Stay organized with collections
Save and categorize content based on your preferences.
CSS anchor positioning was released in Chrome 125. This first publicly-available version of the API triggered additional discussions about the syntax . As a result of that discussion, there have been some slight changes since the feature launch. If you've already tried out CSS anchor positioning, this post explains the changes you need to make to your code, or content about anchor positioning.
There are two primary property renames that you should be aware of:
inset-area
is renamed to position-area
. This rename was preferred by the CSS Working Group because the phrasing position-
helps you remember that this property is applied to the positioned element, not the anchor element. This change will start in Chrome 129, and inset-area
is supported until Chrome 131 to give you time to update any demos or articles you have.
position-try-options
is renamed to position-try-fallbacks
. This rename helps you remember that these are just fallbacks to the primary position, which is determined by the base styles. This change shipped with Chrome 128, and position-try-options
no longer works as of version 128. We'd recommend you use the shorthand (changing it to position-try
), which works from Chrome 125, and has not changed.
There is also one additional behavioral change:
- The
inset-area()
functional syntax is being removed from position-try
. Therefore use position-try-fallbacks: top
instead of position-try-fallbacks: inset-area(top)
. This change will also begin in Chrome 129.
Learn more about using anchor positioning here:
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-04 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-09-04 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-04 UTC."]]